(defvar lisp-mode-syntax-table nil "\ ") (defvar emacs-lisp-mode-syntax-table nil "\ ") (defvar lisp-mode-abbrev-table nil "\ ") (if (not emacs-lisp-mode-syntax-table) (let ((i 0)) (setq emacs-lisp-mode-syntax-table (make-syntax-table)) (while (< i 48) (modify-syntax-entry i "_ " emacs-lisp-mode-syntax-table) (setq i (1+ i))) (setq i (1+ 57)) (while (< i 65) (modify-syntax-entry i "_ " emacs-lisp-mode-syntax-table) (setq i (1+ i))) (setq i (1+ 90)) (while (< i 97) (modify-syntax-entry i "_ " emacs-lisp-mode-syntax-table) (setq i (1+ i))) (setq i (1+ 122)) (while (< i 128) (modify-syntax-entry i "_ " emacs-lisp-mode-syntax-table) (setq i (1+ i))) (modify-syntax-entry 32 " " emacs-lisp-mode-syntax-table) (modify-syntax-entry 9 " " emacs-lisp-mode-syntax-table) (modify-syntax-entry 10 "> " emacs-lisp-mode-syntax-table) (modify-syntax-entry 12 "> " emacs-lisp-mode-syntax-table) (modify-syntax-entry 59 "< " emacs-lisp-mode-syntax-table) (modify-syntax-entry 96 "' " emacs-lisp-mode-syntax-table) (modify-syntax-entry 39 "' " emacs-lisp-mode-syntax-table) (modify-syntax-entry 44 "' " emacs-lisp-mode-syntax-table) (mo dify-syntax-entry 46 "' " emacs-lisp-mode-syntax-table) (modify-syntax-entry 35 "' " emacs-lisp-mode-syntax-table) (modify-syntax-entry 34 "\" " emacs-lisp-mode-syntax-table) (modify-syntax-entry 92 "\\ " emacs-lisp-mode-syntax-table) (modify-syntax-entry 40 "() " emacs-lisp-mode-syntax-table) (modify-syntax-entry 41 ")( " emacs-lisp-mode-syntax-table) (modify-syntax-entry 91 "(] " emacs-lisp-mode-syntax-table) (modify-syntax-entry 93 ")[ " emacs-lisp-mode-syntax-table))) (define-abbrev-table (quote lisp-mode-abbrev-table) nil) (defun lisp-mode-variables (lisp-syntax) (byte-code ".$ !%^DNO #^DOO #^DOO #^O !^ %^*A!^OP%^*C!^ ^*E!^? ^*I!^? ^*I!^? (defun lisp-mode-commands (map) (byte-code "AAA#^AAA#^AAC#+" [map define-key "" indent-sexp "" backward-delete-char-untabify " " lisp-indent-line] 6)) (defvar emacs-lisp-mode-map nil "\ ") (if emacs-lisp-mode-map nil (setq emacs-lisp-mode-map (make-sparse-keymap)) (define-key emacs-lisp-mode-map "" (quote eval-defun)) (lisp-mode-commands emacs-lisp-mode-map)) (defun emacs-lisp-mode nil "\ Major mode for editing Lisp code to run in Emacs. Commands: Delete converts tabs to spaces as it moves back. Blank lines separate paragraphs. Semicolons start comments. \\{emacs-lisp-mode-map} Entry to this mode calls the value of emacs-lisp-mode-hook if that value is non-nil." (interactive) (byte-code "?A ^A!^C !^?^?^EA!^EI!+" [emacs-lisp-mode-map emacs-lisp-mode-syntax-table major-mode mode-name nil kill-all-local-variables use-local-map set-syntax-table emacs-lisp-mode "Emacs-Lisp" lisp-mode-variables run-hooks emacs-lisp-mode-hook] 6)) (defvar lisp-mode-map nil) (if lisp-mode-map nil (setq lisp-mode-map (make-sparse-keymap)) (define-key lisp-mode-map "" (quote lisp-send-defun)) (define-key lisp-mode-map " " (quote run-lisp)) (lisp-mode-commands lisp-mode-map)) (defun lisp-mode nil "\ Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. Commands: Delete converts tabs to spaces as it moves back. Blank lines separate paragraphs. Semicolons start comments. \\{lisp-mode-map} Note that `run-lisp' may be used either to start an inferior Lisp job or to switch back to an existing one. Entry to this mode calls the value of lisp-mode-hook if that value is non-nil." (interactive) (byte-code "?A ^C!^?^?^EA!^E !^II!+" [lisp-mode-map major-mode mode-name t lisp-mode-syntax-table nil kill-all-local-variables use-local-map lisp-mode "Lisp" lisp-mode-variables set-syntax-table run-hooks lisp-mode-hook] 6)) (defun lisp-send-defun nil "\ Send the current defun to the Lisp process made by M-x run-lisp." (interactive) (byte-code "?AA!+" [nil error "Process lisp does not exist"] 2)) (defvar lisp-interaction-mode-map nil) (if lisp-interaction-mode-map nil (setq lisp-interaction-mode-map (make-sparse-keymap)) (lisp-mode-commands lisp-interaction-mode-map) (define-key lisp-interaction-mode-map "" (quote eval-defun)) (define-key lisp-interaction-mode-map " " (quote eval-print-last-sexp))) (defun lisp-interaction-mode nil "\ Major mode for typing and evaluating Lisp forms. Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression before point, and prints its value into the buffer, advancing point. Commands: Delete converts tabs to spaces as it moves back. Paragraphs are separated only by blank lines. Semicolons start comments. \\{lisp-interaction-mode-map} Entry to this mode calls the value of lisp-interaction-mode-hook if that value is non-nil." (interactive) (byte-code "?A ^A!^C !^?^?^EA!^EI!+" [lisp-interaction-mode-map emacs-lisp-mode-syntax-table major-mode mode-name nil kill-all-local-variables use-local-map set-syntax-table lisp-interaction-mode "Lisp Interaction" lisp-mode-variables run-hooks lisp-interaction-mode-hook] 6)) (defun eval-print-last-sexp (arg) "\ Evaluate sexp before point; print value into current buffer." (interactive "P") (byte-code "^AA ?SA !^CE!^`)))`p#+" [stab emacs-lisp-mode-syntax-table nil eval-region syntax-table ((byte-code "A!+" [stab set-syntax-table] 2)) set-syntax-table forward-sexp -1] 7)) (defun eval-last-sexp (arg) "\ Evaluate sexp before point; print value in minibuffer. With argument, print output into current buffer." (interactive "P") (byte-code "?AA ?SE !^EE!^`)))` f (defun eval-defun (arg) "\ Evaluate defun that point is in or before. Print value in minibuffer. With argument, insert value in current buffer after the defun." (interactive "P") (byte-code "ESA ^`A ^A` f (defun lisp-comment-indent nil (byte-code "AA!f (defconst lisp-indent-offset nil "\ ") (defconst lisp-indent-hook (quote lisp-indent-hook) "\ ") (defun lisp-indent-line (&optional whole-exp) "\ Indent current line as Lisp code. With argument, indent any additional lines of the same expression rigidly along with this one." (interactive "P") (byte-code "?C AAAd`ZE ^`%^EE!^EI!f$ `\"^j^d Z`V.h b^OO!^`%^ b^OO!^`%^ V).~ #-+" [indent shift-amt beg end pos nil whole-exp calculate-lisp-indent beginning-of-line skip-chars-forward " " looking-at ";;;" ";" ";;" indent-for-comment forward-char -1 zerop delete-region forward-sexp 1 forward-line indent-code-rigidly] 17)) (defun calculate-lisp-indent (&optional parse-start) "\ Return appropriate indentation for current line as Lisp code. In usual case returns an integer: the column to indent to. Can instead return a list, whose car is the column to indent to. This means that following lines at the same level of indentation should not necessarily be indented the same way. The second element of the list is the buffer position of the start of the containing expression." (byte-code "SI ^`AAAAAA f  A@%.? %)^,4 (defun lisp-indent-hook (indent-point state) (byte-code "iC E\"Tb^E` EA$^C E\". V?.7 b^I ^E` EA$^D ^i,Z (defconst lisp-body-indent 2 "\ ") (defun lisp-indent-specform (count state indent-point normal-indent) (byte-code "E E\" IIb^i%^ ZEXfW OU.g (defun lisp-indent-defform (state indent-point) (byte-code "A@b^AA!^`AA@V. (put (quote lambda) (quote lisp-indent-hook) (quote defun)) (put (quote progn) (quote lisp-indent-hook) 0) (put (quote prog1) (quote lisp-indent-hook) 1) (put (quote save-excursion) (quote lisp-indent-hook) 0) (put (quote save-window-excursion) (quote lisp-indent-hook) 0) (put (quote save-restriction) (quote lisp-indent-hook) 0) (put (quote let) (quote lisp-indent-hook) 1) (put (quote let*) (quote lisp-indent-hook) 1) (put (quote while) (quote lisp-indent-hook) 1) (put (quote if) (quote lisp-indent-hook) 2) (put (quote catch) (quote lisp-indent-hook) 1) (put (quote condition-case) (quote lisp-indent-hook) 2) (put (quote unwind-protect) (quote lisp-indent-hook) 1) (put (quote with-output-to-temp-buffer) (quote lisp-indent-hook) 1) (defun indent-sexp nil "\ Indent each line of the list starting just after point." (interactive) (byte-code "?ACEAAAAASII!)^S?^ ?./ ?^ EX%f" V.$ W.? U !f O %\",O A@[\"^ @%)^Yi\".+T `\"^j^, ]" calculate-lisp-indent integerp /= delete-region] 24)) (defun indent-code-rigidly (start end arg &optional nochange-regexp) "\ Indent all lines of code, starting in the region, sideways by ARG columns. Does not affect lines starting inside comments or strings, assuming that the start of the region is not inside them. Called from a program, takes args START, END, COLUMNS and NOCHANGE-REGEXP. The last is a regexp which, if matched at the beginning of a line, means don't indent that line." (interactive "r p") (byte-code "EAS b^C %^ b^n+! .