xtodo emacs site
- 2023-09-01
- write about
identity
ignore
always
- ELisp: Apply Function (List to Args)
- Calling Functions (ELISP Manual)
put to tutorial
(defun xah-random-int (Min Max) "version 2022-08-26" (+ Min (random (- (1+ Max) Min))))
merge Emacs Lisp Examples to Xah Emacs Commands
- add missing buffer function in the emacs manual windows chapter
- ELisp: Buffer Functions
- in tutorial, mention when calling
write-region
orwith-temp-buffer
, it depends on file coding system. set it usinglet
e.g.(coding-system-for-write 'utf-8-unix)
. important if you are writing a emacs lisp script to be run in terminal
- 2022-05-07 fully document these functions Elisp: String Functions
- 2022-05-07 fully document these functions Elisp: Sequence Functions
looking-back
is slow.
here's a typical usage:
(looking-back "[ \t\n]" (1- (point)) )
you can change it to:
;; warning. error if at point min (prog2 (backward-char) (looking-at "[ \t\n]") (forward-char))
assoc-string
string-search
If the length of a list is being computed to compare to a (small)
number, the length<
, length>
and length=
functions may be more
efficient.