Documentation ¶
Index ¶
- func ArefString(array string, idx int) rune
- func Aset(array Object, idx int, newElt any)
- func Concat(sequences ...any) string
- func Eq(obj1 any, obj2 any) bool
- func Error(format string, args ...any)
- func IsBool(object Object) bool
- func IsFloat(object Object) bool
- func IsInt(object Object) bool
- func IsMultibyteString(object string) bool
- func IsString(object Object) bool
- func IsSymbol(object Object) bool
- func Length(sequence any) int
- func MapConcat(function any, sequence Object, separator string) string
- func MinInt(xs ...int) int
- func Not(object any) bool
- func Prin1ToString(object Object) string
- func StringBytes(s string) int
- type Object
- type Symbol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArefString ¶
ArefString = Return the element of ARRAY at index IDX. ARRAY may be a vector, a string, a char-table, a bool-vector, or a byte-code object. IDX starts at 0.
goism:"ArefString"->"aref"
func Aset ¶
Aset = Store into the element of ARRAY at index IDX the value NEWELT. Return NEWELT. ARRAY may be a vector, a string, a char-table or a bool-vector. IDX starts at 0.
goism:"Aset"->"aset"
func Concat ¶
func Concat(sequences ...any) string
Concat = Concatenate all the arguments and make the result a string. The result is a string whose elements are the elements of all the arguments. Each argument may be a string or a list or vector of characters (integers).
goism:"Concat"->"concat"
func Eq ¶
func Eq(obj1 any, obj2 any) bool
Eq = Return t if the two args are the same Lisp object.
goism:"Eq"->"eq"
func Error ¶
func Error(format string, args ...any)
Error = Signal an error, making a message by passing args to ‘format-message’. In Emacs, the convention is that error messages start with a capital letter but *do not* end with a period. Please follow this convention for the sake of consistency.
Note: (error "%s" VALUE) makes the message VALUE without interpreting format characters like ‘%’, ‘`’, and ‘'’.
goism:"Error"->"error"
func IsBool ¶
IsBool = Return t if OBJECT is one of the two canonical boolean values: t or nil. Otherwise, return nil.
goism:"IsBool"->"booleanp"
func IsMultibyteString ¶
IsMultibyteString = Return t if OBJECT is a multibyte string. Return nil if OBJECT is either a unibyte string, or not a string.
goism:"IsMultibyteString"->"multibyte-string-p"
func Length ¶
func Length(sequence any) int
Length = Return the length of vector, list or string SEQUENCE. A byte-code function object is also allowed. If the string contains multibyte characters, this is not necessarily the number of bytes in the string; it is the number of characters. To get the number of bytes, use ‘string-bytes’.
goism:"Length"->"length"
func MapConcat ¶
MapConcat = Apply FUNCTION to each element of SEQUENCE, and concat the results as strings. In between each pair of results, stick in SEPARATOR. Thus, " " as SEPARATOR results in spaces between the values returned by FUNCTION. SEQUENCE may be a list, a vector, a bool-vector, or a string.
goism:"MapConcat"->"mapconcat"
func MinInt ¶
MinInt = Return smallest of all the arguments (which must be numbers or markers). The value is always a number; markers are converted to numbers.
goism:"MinInt"->"min"
func Not ¶
func Not(object any) bool
Not = Return t if OBJECT is nil, and return nil otherwise.
goism:"Not"->"not"
func Prin1ToString ¶
Prin1ToString = Return a string containing the printed representation of OBJECT. OBJECT can be any Lisp object. This function outputs quoting characters when necessary to make output that ‘read’ can handle, whenever possible, unless the optional second argument NOESCAPE is non-nil. For complex objects, the behavior is controlled by ‘print-level’ and ‘print-length’, which see.
OBJECT is any of the Lisp data types: a number, a string, a symbol, a list, a buffer, a window, a frame, etc.
A printed representation of an object is text which describes that object.
goism:"Prin1ToString"->"prin1-to-string"
func StringBytes ¶
StringBytes = Return the number of bytes in STRING. If STRING is multibyte, this may be greater than the length of STRING.
goism:"StringBytes"->"string-bytes"
Types ¶
type Object ¶
type Object interface { // Bool returns underlying bool. Panics when booleanp(val) is false. Bool() bool // Int returns underlying integer. Panics when integerp(val) is false. Int() int // Float returns underlying integer. Panics when floatp(val) is false. Float() float64 // String returns underlying integer. Panics when stringp(val) is false. String() string // Symbol returns underlying symbol. Panics when symbolp(val) is false. Symbol() Symbol // contains filtered or unexported methods }
Object is unboxed Emacs Lisp object. Go-compatible value can be extracted by Object methods.
Analogy can be taken with Go "reflect.Value".