Language Specifications

Table of Contents

set, setq, setq-default reference

(setq-local xxx ...)

is equivalent to:

(defvar xxx ...)             ;; declare xxx with global scope
(make-local-variable 'xxx)   ;; make xxx local in this buffer only

If a variable is buffer-local:

?<character> reference

?Q ⇒ 81     ?q ⇒ 113
?\a ⇒ 7                 ; control-g, C-g
?\b ⇒ 8                 ; backspace, BS, C-h
?\t ⇒ 9                 ; tab, TAB, C-i
?\n ⇒ 10                ; newline, C-j
?\v ⇒ 11                ; vertical tab, C-k
?\f ⇒ 12                ; formfeed character, C-l
?\r ⇒ 13                ; carriage return, RET, C-m
?\e ⇒ 27                ; escape character, ESC, C-[
?\s ⇒ 32                ; space character, SPC
?\\ ⇒ 92                ; backslash character, \
?\d ⇒ 127               ; delete character, DEL
?Q
81

let reference

(setq y 2)
2

(let ((y 1)
      (z y)) ; 'z' is bound to the old value of 'y'
  (list y z))
⇒ (1 2)

(let* ((y 1)
       (z y)) ; Use the just-established value of y.
  (list y z))
⇒ (1 1)

(interactive) reference

Argument-List(&optional, &rest) discussion

(a b &optional c d &rest e)
(funcall (lambda (n) (1+ n))        ; One required:
         1)                         ; requires exactly one argument.
2
(funcall (lambda (n &optional n1)   ; One required and one optional:
           (if n1 (+ n n1) (1+ n))) ; 1 or 2 arguments.
         1 2)
3
(funcall (lambda (n &rest ns)       ; One required and one rest:
           (+ n (apply '+ ns)))     ; 1 or more arguments.
         1 2 3 4 5)
15