1 ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands
3 ;; Copyright (C) 1985, 1986, 1999, 2000, 2001, 2003, 2004, 2005
4 ;; Free Software Foundation, Inc.
7 ;; Keywords: lisp, languages
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
28 ;; The base major mode for editing Lisp code (used also for Emacs Lisp).
29 ;; This mode is documented in the Emacs manual.
33 (defvar lisp-mode-abbrev-table nil
)
35 (defvar emacs-lisp-mode-syntax-table
36 (let ((table (make-syntax-table)))
39 (modify-syntax-entry i
"_ " table
)
43 (modify-syntax-entry i
"_ " table
)
47 (modify-syntax-entry i
"_ " table
)
51 (modify-syntax-entry i
"_ " table
)
53 (modify-syntax-entry ?
" " table
)
54 (modify-syntax-entry ?
\t " " table
)
55 (modify-syntax-entry ?
\f " " table
)
56 (modify-syntax-entry ?
\n "> " table
)
57 ;; Give CR the same syntax as newline, for selective-display.
58 (modify-syntax-entry ?\^m
"> " table
)
59 (modify-syntax-entry ?\
; "< " table)
60 (modify-syntax-entry ?
` "' " table
)
61 (modify-syntax-entry ?
' "' " table
)
62 (modify-syntax-entry ?
, "' " table
)
63 (modify-syntax-entry ?
@ "' " table
)
64 ;; Used to be singlequote; changed for flonums.
65 (modify-syntax-entry ?.
"_ " table
)
66 (modify-syntax-entry ?
# "' " table
)
67 (modify-syntax-entry ?
\" "\" " table
)
68 (modify-syntax-entry ?
\\ "\\ " table
)
69 (modify-syntax-entry ?\
( "() " table
)
70 (modify-syntax-entry ?\
) ")( " table
)
71 (modify-syntax-entry ?\
[ "(] " table
)
72 (modify-syntax-entry ?\
] ")[ " table
))
75 (defvar lisp-mode-syntax-table
76 (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table
)))
77 (modify-syntax-entry ?\
[ "_ " table
)
78 (modify-syntax-entry ?\
] "_ " table
)
79 (modify-syntax-entry ?
# "' 14bn" table
)
80 (modify-syntax-entry ?|
"\" 23b" table
)
83 (define-abbrev-table 'lisp-mode-abbrev-table
())
85 (defvar lisp-imenu-generic-expression
88 (purecopy (concat "^\\s-*("
91 '("defun" "defun*" "defsubst" "defmacro"
92 "defadvice" "define-skeleton"
93 "define-minor-mode" "define-derived-mode"
95 "define-compiler-macro" "define-modify-macro"
96 "defsetf" "define-setf-expander"
97 "define-method-combination"
98 "defgeneric" "defmethod") t
))
99 "\\s-+\\(\\sw\\(\\sw\\|\\s_\\)+\\)"))
101 (list (purecopy "Variables")
102 (purecopy (concat "^\\s-*("
105 '("defvar" "defconst" "defconstant" "defcustom"
106 "defparameter" "define-symbol-macro") t
))
107 "\\s-+\\(\\sw\\(\\sw\\|\\s_\\)+\\)"))
109 (list (purecopy "Types")
110 (purecopy (concat "^\\s-*("
113 '("defgroup" "deftheme" "deftype" "defstruct"
114 "defclass" "define-condition" "define-widget"
115 "defface" "defpackage") t
))
116 "\\s-+'?\\(\\sw\\(\\sw\\|\\s_\\)+\\)"))
119 "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.")
121 ;; This was originally in autoload.el and is still used there.
122 (put 'autoload
'doc-string-elt
3)
123 (put 'defun
'doc-string-elt
3)
124 (put 'defun
* 'doc-string-elt
3)
125 (put 'defvar
'doc-string-elt
3)
126 (put 'defcustom
'doc-string-elt
3)
127 (put 'deftheme
'doc-string-elt
2)
128 (put 'defconst
'doc-string-elt
3)
129 (put 'defmacro
'doc-string-elt
3)
130 (put 'defmacro
* 'doc-string-elt
3)
131 (put 'defsubst
'doc-string-elt
3)
132 (put 'defstruct
'doc-string-elt
2)
133 (put 'define-skeleton
'doc-string-elt
2)
134 (put 'define-derived-mode
'doc-string-elt
4)
135 (put 'define-compilation-mode
'doc-string-elt
3)
136 (put 'easy-mmode-define-minor-mode
'doc-string-elt
2)
137 (put 'define-minor-mode
'doc-string-elt
2)
138 (put 'define-generic-mode
'doc-string-elt
7)
139 ;; define-global-mode has no explicit docstring.
140 (put 'easy-mmode-define-global-mode
'doc-string-elt
0)
141 (put 'define-ibuffer-filter
'doc-string-elt
2)
142 (put 'define-ibuffer-op
'doc-string-elt
3)
143 (put 'define-ibuffer-sorter
'doc-string-elt
2)
145 (defun lisp-font-lock-syntactic-face-function (state)
147 (if (and (eq (nth 0 state
) 1)
148 ;; This might be a docstring.
151 (goto-char (nth 8 state
))
153 (while (and (not (bobp))
154 (progn (backward-sexp 1) (setq n
(1+ n
)))))
157 (let ((sym (intern-soft
159 (point) (progn (forward-sexp 1) (point))))))
160 (eq n
(or (get sym
'doc-string-elt
) 3)))))))
162 font-lock-string-face
)
163 font-lock-comment-face
))
165 ;; The LISP-SYNTAX argument is used by code in inf-lisp.el and is
166 ;; (uselessly) passed from pp.el, chistory.el, gnus-kill.el and score-mode.el
167 (defun lisp-mode-variables (&optional lisp-syntax
)
169 (set-syntax-table lisp-mode-syntax-table
))
170 (setq local-abbrev-table lisp-mode-abbrev-table
)
171 (make-local-variable 'paragraph-ignore-fill-prefix
)
172 (setq paragraph-ignore-fill-prefix t
)
173 (make-local-variable 'fill-paragraph-function
)
174 (setq fill-paragraph-function
'lisp-fill-paragraph
)
175 ;; Adaptive fill mode gets the fill wrong for a one-line paragraph made of
176 ;; a single docstring. Let's fix it here.
177 (set (make-local-variable 'adaptive-fill-function
)
178 (lambda () (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")))
179 ;; Adaptive fill mode gets in the way of auto-fill,
180 ;; and should make no difference for explicit fill
181 ;; because lisp-fill-paragraph should do the job.
182 ;; I believe that newcomment's auto-fill code properly deals with it -stef
183 ;;(set (make-local-variable 'adaptive-fill-mode) nil)
184 (make-local-variable 'indent-line-function
)
185 (setq indent-line-function
'lisp-indent-line
)
186 (make-local-variable 'indent-region-function
)
187 (setq indent-region-function
'lisp-indent-region
)
188 (make-local-variable 'parse-sexp-ignore-comments
)
189 (setq parse-sexp-ignore-comments t
)
190 (make-local-variable 'outline-regexp
)
191 (setq outline-regexp
";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(")
192 (make-local-variable 'outline-level
)
193 (setq outline-level
'lisp-outline-level
)
194 (make-local-variable 'comment-start
)
195 (setq comment-start
";")
196 (make-local-variable 'comment-start-skip
)
197 ;; Look within the line for a ; following an even number of backslashes
198 ;; after either a non-backslash or the line beginning.
199 (setq comment-start-skip
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
200 (make-local-variable 'font-lock-comment-start-skip
)
201 ;; Font lock mode uses this only when it KNOWS a comment is starting.
202 (setq font-lock-comment-start-skip
";+ *")
203 (make-local-variable 'comment-add
)
204 (setq comment-add
1) ;default to `;;' in comment-region
205 (make-local-variable 'comment-column
)
206 (setq comment-column
40)
207 ;; Don't get confused by `;' in doc strings when paragraph-filling.
208 (set (make-local-variable 'comment-use-global-state
) t
)
209 (make-local-variable 'comment-indent-function
)
210 (setq comment-indent-function
'lisp-comment-indent
)
211 (make-local-variable 'imenu-generic-expression
)
212 (setq imenu-generic-expression lisp-imenu-generic-expression
)
213 (make-local-variable 'multibyte-syntax-as-symbol
)
214 (setq multibyte-syntax-as-symbol t
)
215 (set (make-local-variable 'syntax-begin-function
) 'beginning-of-defun
)
216 (setq font-lock-defaults
217 '((lisp-font-lock-keywords
218 lisp-font-lock-keywords-1 lisp-font-lock-keywords-2
)
219 nil nil
(("+-*/.<>=!?$%_&~^:@" .
"w")) nil
220 (font-lock-mark-block-function . mark-defun
)
221 (font-lock-syntactic-face-function
222 . lisp-font-lock-syntactic-face-function
))))
224 (defun lisp-outline-level ()
225 "Lisp mode `outline-level' function."
226 (let ((len (- (match-end 0) (match-beginning 0))))
227 (if (looking-at "(\\|;;;###autoload")
231 (defvar lisp-mode-shared-map
232 (let ((map (make-sparse-keymap)))
233 (define-key map
"\t" 'lisp-indent-line
)
234 (define-key map
"\e\C-q" 'indent-sexp
)
235 (define-key map
"\177" 'backward-delete-char-untabify
)
236 ;; This gets in the way when viewing a Lisp file in view-mode. As
237 ;; long as [backspace] is mapped into DEL via the
238 ;; function-key-map, this should remain disabled!!
239 ;;;(define-key map [backspace] 'backward-delete-char-untabify)
241 "Keymap for commands shared by all sorts of Lisp modes.")
243 (defvar emacs-lisp-mode-map
()
244 "Keymap for Emacs Lisp mode.
245 All commands in `lisp-mode-shared-map' are inherited by this map.")
247 (if emacs-lisp-mode-map
249 (let ((map (make-sparse-keymap "Emacs-Lisp")))
250 (setq emacs-lisp-mode-map
(make-sparse-keymap))
251 (set-keymap-parent emacs-lisp-mode-map lisp-mode-shared-map
)
252 (define-key emacs-lisp-mode-map
"\e\t" 'lisp-complete-symbol
)
253 (define-key emacs-lisp-mode-map
"\e\C-x" 'eval-defun
)
254 (define-key emacs-lisp-mode-map
"\e\C-q" 'indent-pp-sexp
)
255 (define-key emacs-lisp-mode-map
[menu-bar
] (make-sparse-keymap))
256 (define-key emacs-lisp-mode-map
[menu-bar emacs-lisp
]
257 (cons "Emacs-Lisp" map
))
258 (define-key map
[edebug-defun
]
259 '("Instrument Function for Debugging" . edebug-defun
))
260 (define-key map
[byte-recompile
]
261 '("Byte-recompile Directory..." . byte-recompile-directory
))
262 (define-key map
[emacs-byte-compile-and-load
]
263 '("Byte-compile And Load" . emacs-lisp-byte-compile-and-load
))
264 (define-key map
[byte-compile
]
265 '("Byte-compile This File" . emacs-lisp-byte-compile
))
266 (define-key map
[separator-eval
] '("--"))
267 (define-key map
[eval-buffer
] '("Evaluate Buffer" . eval-current-buffer
))
268 (define-key map
[eval-region
] '("Evaluate Region" . eval-region
))
269 (define-key map
[eval-sexp
] '("Evaluate Last S-expression" . eval-last-sexp
))
270 (define-key map
[separator-format
] '("--"))
271 (define-key map
[comment-region
] '("Comment Out Region" . comment-region
))
272 (define-key map
[indent-region
] '("Indent Region" . indent-region
))
273 (define-key map
[indent-line
] '("Indent Line" . lisp-indent-line
))
274 (put 'eval-region
'menu-enable
'mark-active
)
275 (put 'comment-region
'menu-enable
'mark-active
)
276 (put 'indent-region
'menu-enable
'mark-active
)))
278 (defun emacs-lisp-byte-compile ()
279 "Byte compile the file containing the current buffer."
282 (byte-compile-file buffer-file-name
)
283 (error "The buffer must be saved in a file first")))
285 (defun emacs-lisp-byte-compile-and-load ()
286 "Byte-compile the current file (if it has changed), then load compiled code."
289 (error "The buffer must be saved in a file first"))
291 ;; Recompile if file or buffer has changed since last compilation.
292 (if (and (buffer-modified-p)
293 (y-or-n-p (format "Save buffer %s first? " (buffer-name))))
295 (let ((compiled-file-name (byte-compile-dest-file buffer-file-name
)))
296 (if (file-newer-than-file-p compiled-file-name buffer-file-name
)
297 (load-file compiled-file-name
)
298 (byte-compile-file buffer-file-name t
))))
300 (defcustom emacs-lisp-mode-hook nil
301 "Hook run when entering Emacs Lisp mode."
302 :options
'(turn-on-eldoc-mode imenu-add-menubar-index checkdoc-minor-mode
)
306 (defcustom lisp-mode-hook nil
307 "Hook run when entering Lisp mode."
308 :options
'(imenu-add-menubar-index)
312 (defcustom lisp-interaction-mode-hook nil
313 "Hook run when entering Lisp Interaction mode."
314 :options
'(turn-on-eldoc-mode)
318 (defun emacs-lisp-mode ()
319 "Major mode for editing Lisp code to run in Emacs.
321 Delete converts tabs to spaces as it moves back.
322 Blank lines separate paragraphs. Semicolons start comments.
323 \\{emacs-lisp-mode-map}
324 Entry to this mode calls the value of `emacs-lisp-mode-hook'
325 if that value is non-nil."
327 (kill-all-local-variables)
328 (use-local-map emacs-lisp-mode-map
)
329 (set-syntax-table emacs-lisp-mode-syntax-table
)
330 (setq major-mode
'emacs-lisp-mode
)
331 (setq mode-name
"Emacs-Lisp")
332 (lisp-mode-variables)
333 (setq imenu-case-fold-search nil
)
334 (run-mode-hooks 'emacs-lisp-mode-hook
))
335 (put 'emacs-lisp-mode
'custom-mode-group
'lisp
)
337 (defvar lisp-mode-map
338 (let ((map (make-sparse-keymap)))
339 (set-keymap-parent map lisp-mode-shared-map
)
340 (define-key map
"\e\C-x" 'lisp-eval-defun
)
341 (define-key map
"\C-c\C-z" 'run-lisp
)
343 "Keymap for ordinary Lisp mode.
344 All commands in `lisp-mode-shared-map' are inherited by this map.")
347 "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
349 Delete converts tabs to spaces as it moves back.
350 Blank lines separate paragraphs. Semicolons start comments.
352 Note that `run-lisp' may be used either to start an inferior Lisp job
353 or to switch back to an existing one.
355 Entry to this mode calls the value of `lisp-mode-hook'
356 if that value is non-nil."
358 (kill-all-local-variables)
359 (use-local-map lisp-mode-map
)
360 (setq major-mode
'lisp-mode
)
361 (setq mode-name
"Lisp")
362 (lisp-mode-variables)
363 (make-local-variable 'comment-start-skip
)
364 (setq comment-start-skip
365 "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
366 (make-local-variable 'font-lock-keywords-case-fold-search
)
367 (setq font-lock-keywords-case-fold-search t
)
368 (setq imenu-case-fold-search t
)
369 (set-syntax-table lisp-mode-syntax-table
)
370 (run-mode-hooks 'lisp-mode-hook
))
371 (put 'lisp-mode
'find-tag-default-function
'lisp-find-tag-default
)
373 (defun lisp-find-tag-default ()
374 (let ((default (find-tag-default)))
375 (when (stringp default
)
376 (if (string-match ":+" default
)
377 (substring default
(match-end 0))
380 ;; Used in old LispM code.
381 (defalias 'common-lisp-mode
'lisp-mode
)
383 ;; This will do unless inf-lisp.el is loaded.
384 (defun lisp-eval-defun (&optional and-go
)
385 "Send the current defun to the Lisp process made by \\[run-lisp]."
387 (error "Process lisp does not exist"))
389 (defvar lisp-interaction-mode-map
390 (let ((map (make-sparse-keymap)))
391 (set-keymap-parent map lisp-mode-shared-map
)
392 (define-key map
"\e\C-x" 'eval-defun
)
393 (define-key map
"\e\C-q" 'indent-pp-sexp
)
394 (define-key map
"\e\t" 'lisp-complete-symbol
)
395 (define-key map
"\n" 'eval-print-last-sexp
)
397 "Keymap for Lisp Interaction mode.
398 All commands in `lisp-mode-shared-map' are inherited by this map.")
400 (defvar lisp-interaction-mode-abbrev-table lisp-mode-abbrev-table
)
401 (define-derived-mode lisp-interaction-mode emacs-lisp-mode
"Lisp Interaction"
402 "Major mode for typing and evaluating Lisp forms.
403 Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression
404 before point, and prints its value into the buffer, advancing point.
405 Note that printing is controlled by `eval-expression-print-length'
406 and `eval-expression-print-level'.
409 Delete converts tabs to spaces as it moves back.
410 Paragraphs are separated only by blank lines.
411 Semicolons start comments.
412 \\{lisp-interaction-mode-map}
413 Entry to this mode calls the value of `lisp-interaction-mode-hook'
414 if that value is non-nil.")
416 (defun eval-print-last-sexp ()
417 "Evaluate sexp before point; print value into current buffer.
419 Note that printing the result is controlled by the variables
420 `eval-expression-print-length' and `eval-expression-print-level',
423 (let ((standard-output (current-buffer)))
429 (defun last-sexp-setup-props (beg end value alt1 alt2
)
430 "Set up text properties for the output of `eval-last-sexp-1'.
431 BEG and END are the start and end of the output in current-buffer.
432 VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the
433 alternative printed representations that can be displayed."
434 (let ((map (make-sparse-keymap)))
435 (define-key map
"\C-m" 'last-sexp-toggle-display
)
436 (define-key map
[down-mouse-2
] 'mouse-set-point
)
437 (define-key map
[mouse-2
] 'last-sexp-toggle-display
)
440 `(printed-value (,value
,alt1
,alt2
)
443 help-echo
"RET, mouse-2: toggle abbreviated display"
444 rear-nonsticky
(mouse-face keymap help-echo
448 (defun last-sexp-toggle-display (&optional arg
)
449 "Toggle between abbreviated and unabbreviated printed representations."
453 (let ((value (get-text-property (point) 'printed-value
)))
455 (let ((beg (or (previous-single-property-change (min (point-max) (1+ (point)))
458 (end (or (next-single-char-property-change (point) 'printed-value
) (point)))
459 (standard-output (current-buffer))
461 (delete-region beg end
)
462 (insert (nth 1 value
))
463 (last-sexp-setup-props beg
(point)
467 (goto-char (min (point-max) point
)))))))
469 (defun prin1-char (char)
470 "Return a string representing CHAR as a character rather than as an integer.
471 If CHAR is not a character, return nil."
474 (let ((c (event-basic-type char
))
475 (mods (event-modifiers char
))
477 ;; Prevent ?A from turning into ?\S-a.
478 (if (and (memq 'shift mods
)
479 (zerop (logand char ?\S-\^
@))
480 (not (let ((case-fold-search nil
))
481 (char-equal c
(upcase c
)))))
482 (setq c
(upcase c
) mods nil
))
483 ;; What string are we considering using?
490 (cond ((eq modif
'super
) "\\s-")
491 (t (string ?
\\ (upcase (aref (symbol-name modif
) 0)) ?-
))))
494 ((memq c
'(?\
; ?\( ?\) ?\{ ?\} ?\[ ?\] ?\" ?\' ?\\)) (string ?\\ c))
499 ;; Verify the string reads a CHAR, not to some other character.
500 ;; If it doesn't, return nil instead.
502 (= (car (read-from-string string
)) char
)
506 (defun eval-last-sexp-1 (eval-last-sexp-arg-internal)
507 "Evaluate sexp before point; print value in minibuffer.
508 With argument, print output into current buffer."
509 (let ((standard-output (if eval-last-sexp-arg-internal
(current-buffer) t
)))
511 (eval (let ((stab (syntax-table))
516 (with-syntax-table emacs-lisp-mode-syntax-table
517 ;; If this sexp appears to be enclosed in `...'
518 ;; then ignore the surrounding quotes.
520 (or (eq (following-char) ?
\')
521 (eq (preceding-char) ?
\')))
523 ;; If we were after `?\e' (or similar case),
524 ;; use the whole thing, not just the `e'.
525 (when (eq (preceding-char) ?
\\)
527 (when (eq (preceding-char) ??
)
531 (when (eq (preceding-char) ?
=)
534 (skip-chars-backward "0-9#=")
535 (setq labeled-p
(looking-at "\\(#[0-9]+=\\)+")))
540 ;; vladimir@cs.ualberta.ca 30-Jul-1997: skip ` in
541 ;; `variable' so that the value is returned, not the
543 (if (and ignore-quotes
544 (eq (following-char) ?
`))
546 (narrow-to-region (point-min) opoint
)
547 (setq expr
(read (current-buffer)))
548 ;; If it's an (interactive ...) form, it's more
549 ;; useful to show how an interactive call would
552 (eq (car expr
) 'interactive
)
554 (list 'call-interactively
561 (eval-last-sexp-print-value value
))))
563 (defun eval-last-sexp-print-value (value)
564 (let ((unabbreviated (let ((print-length nil
) (print-level nil
))
565 (prin1-to-string value
)))
566 (print-length eval-expression-print-length
)
567 (print-level eval-expression-print-level
)
572 (let ((str (eval-expression-print-format value
)))
573 (if str
(princ str
)))
575 (when (and (bufferp standard-output
)
576 (or (not (null print-length
))
577 (not (null print-level
)))
578 (not (string= unabbreviated
579 (buffer-substring-no-properties beg end
))))
580 (last-sexp-setup-props beg end value
582 (buffer-substring-no-properties beg end
))
586 (defvar eval-last-sexp-fake-value
(make-symbol "t"))
588 (defun eval-last-sexp (eval-last-sexp-arg-internal)
589 "Evaluate sexp before point; print value in minibuffer.
590 Interactively, with prefix argument, print output into current buffer."
592 (if (null eval-expression-debug-on-error
)
593 (eval-last-sexp-1 eval-last-sexp-arg-internal
)
594 (let ((old-value eval-last-sexp-fake-value
) new-value value
)
595 (let ((debug-on-error old-value
))
596 (setq value
(eval-last-sexp-1 eval-last-sexp-arg-internal
))
597 (setq new-value debug-on-error
))
598 (unless (eq old-value new-value
)
599 (setq debug-on-error new-value
))
602 (defun eval-defun-1 (form)
603 "Treat some expressions specially.
604 Reset the `defvar' and `defcustom' variables to the initial value.
605 Reinitialize the face according to the `defface' specification."
606 ;; The code in edebug-defun should be consistent with this, but not
607 ;; the same, since this gets a macroexpended form.
608 (cond ((not (listp form
))
610 ((and (eq (car form
) 'defvar
)
611 (cdr-safe (cdr-safe form
))
612 (boundp (cadr form
)))
613 ;; Force variable to be re-set.
614 `(progn (defvar ,(nth 1 form
) nil
,@(nthcdr 3 form
))
615 (setq-default ,(nth 1 form
) ,(nth 2 form
))))
616 ;; `defcustom' is now macroexpanded to
617 ;; `custom-declare-variable' with a quoted value arg.
618 ((and (eq (car form
) 'custom-declare-variable
)
619 (default-boundp (eval (nth 1 form
))))
620 ;; Force variable to be bound.
621 (set-default (eval (nth 1 form
)) (eval (nth 1 (nth 2 form
))))
623 ;; `defface' is macroexpanded to `custom-declare-face'.
624 ((eq (car form
) 'custom-declare-face
)
626 (setq face-new-frame-defaults
627 (assq-delete-all (eval (nth 1 form
)) face-new-frame-defaults
))
628 (put (eval (nth 1 form
)) 'face-defface-spec nil
)
629 ;; Setting `customized-face' to the new spec after calling
630 ;; the form, but preserving the old saved spec in `saved-face',
631 ;; imitates the situation when the new face spec is set
632 ;; temporarily for the current session in the customize
633 ;; buffer, thus allowing `face-user-default-spec' to use the
634 ;; new customized spec instead of the saved spec.
635 ;; Resetting `saved-face' temporarily to nil is needed to let
636 ;; `defface' change the spec, regardless of a saved spec.
638 (put ,(nth 1 form
) 'saved-face
639 ',(get (eval (nth 1 form
)) 'saved-face
))
640 (put ,(nth 1 form
) 'customized-face
642 (put (eval (nth 1 form
)) 'saved-face nil
)))
643 ((eq (car form
) 'progn
)
644 (cons 'progn
(mapcar 'eval-defun-1
(cdr form
))))
647 (defun eval-defun-2 ()
648 "Evaluate defun that point is in or before.
649 The value is displayed in the minibuffer.
650 If the current defun is actually a call to `defvar',
651 then reset the variable using the initial value expression
652 even if the variable already has some other value.
653 \(Normally `defvar' does not change the variable's value
654 if it already has a value.\)
656 With argument, insert value in current buffer after the defun.
657 Return the result of evaluation."
659 (let ((debug-on-error eval-expression-debug-on-error
)
660 (print-length eval-expression-print-length
)
661 (print-level eval-expression-print-level
))
663 ;; Arrange for eval-region to "read" the (possibly) altered form.
664 ;; eval-region handles recording which file defines a function or
665 ;; variable. Re-written using `apply' to avoid capturing
666 ;; variables like `end'.
669 (let ((standard-output t
)
671 ;; Read the form from the buffer, and record where it ends.
676 (setq form
(read (current-buffer)))
678 ;; Alter the form if necessary.
679 (setq form
(eval-defun-1 (macroexpand form
)))
680 (list beg end standard-output
682 ;; Skipping to the end of the specified region
683 ;; will make eval-region return.
686 ;; The result of evaluation has been put onto VALUES. So return it.
689 (defun eval-defun (edebug-it)
690 "Evaluate the top-level form containing point, or after point.
692 If the current defun is actually a call to `defvar' or `defcustom',
693 evaluating it this way resets the variable using its initial value
694 expression even if the variable already has some other value.
695 \(Normally `defvar' and `defcustom' do not alter the value if there
698 With a prefix argument, instrument the code for Edebug.
700 If acting on a `defun' for FUNCTION, and the function was
701 instrumented, `Edebug: FUNCTION' is printed in the minibuffer. If not
702 instrumented, just FUNCTION is printed.
704 If not acting on a `defun', the result of evaluation is displayed in
705 the minibuffer. This display is controlled by the variables
706 `eval-expression-print-length' and `eval-expression-print-level',
711 (eval-defun (not edebug-all-defs
)))
713 (if (null eval-expression-debug-on-error
)
715 (let ((old-value (make-symbol "t")) new-value value
)
716 (let ((debug-on-error old-value
))
717 (setq value
(eval-defun-2))
718 (setq new-value debug-on-error
))
719 (unless (eq old-value new-value
)
720 (setq debug-on-error new-value
))
723 ;; Used for comment-indent-function in Lisp modes.
724 (defun lisp-comment-indent ()
725 (if (looking-at "\\s<\\s<\\s<")
727 (if (looking-at "\\s<\\s<")
728 (let ((tem (or (calculate-lisp-indent) (current-column))))
729 (if (listp tem
) (car tem
) tem
))
730 (skip-chars-backward " \t")
731 (max (if (bolp) 0 (1+ (current-column)))
734 ;; This function just forces a more costly detection of comments (using
735 ;; parse-partial-sexp from beginning-of-defun). I.e. It avoids the problem of
736 ;; taking a `;' inside a string started on another line for a comment starter.
737 ;; Note: `newcomment' gets it right now since we set comment-use-global-state
738 ;; so we could get rid of it. -stef
739 (defun lisp-mode-auto-fill ()
740 (if (> (current-column) (current-fill-column))
742 (nth 4 (syntax-ppss (point))))
744 (unless (and (boundp 'comment-auto-fill-only-comments
)
745 comment-auto-fill-only-comments
)
746 (let ((comment-start nil
) (comment-start-skip nil
))
749 (defvar lisp-indent-offset nil
750 "If non-nil, indent second line of expressions that many more columns.")
751 (defvar lisp-indent-function
'lisp-indent-function
)
753 (defun lisp-indent-line (&optional whole-exp
)
754 "Indent current line as Lisp code.
755 With argument, indent any additional lines of the same expression
756 rigidly along with this one."
758 (let ((indent (calculate-lisp-indent)) shift-amt end
759 (pos (- (point-max) (point)))
760 (beg (progn (beginning-of-line) (point))))
761 (skip-chars-forward " \t")
762 (if (or (null indent
) (looking-at "\\s<\\s<\\s<"))
763 ;; Don't alter indentation of a ;;; comment line
764 ;; or a line that starts in a string.
765 (goto-char (- (point-max) pos
))
766 (if (and (looking-at "\\s<") (not (looking-at "\\s<\\s<")))
767 ;; Single-semicolon comment lines should be indented
768 ;; as comment lines, not as code.
769 (progn (indent-for-comment) (forward-char -
1))
770 (if (listp indent
) (setq indent
(car indent
)))
771 (setq shift-amt
(- indent
(current-column)))
772 (if (zerop shift-amt
)
774 (delete-region beg
(point))
776 ;; If initial point was within line's indentation,
777 ;; position after the indentation. Else stay at same point in text.
778 (if (> (- (point-max) pos
) (point))
779 (goto-char (- (point-max) pos
)))
780 ;; If desired, shift remaining lines of expression the same amount.
781 (and whole-exp
(not (zerop shift-amt
))
790 (indent-code-rigidly beg end shift-amt
)))))
792 (defvar calculate-lisp-indent-last-sexp
)
794 (defun calculate-lisp-indent (&optional parse-start
)
795 "Return appropriate indentation for current line as Lisp code.
796 In usual case returns an integer: the column to indent to.
797 If the value is nil, that means don't change the indentation
798 because the line starts inside a string.
800 The value can also be a list of the form (COLUMN CONTAINING-SEXP-START).
801 This means that following lines at the same level of indentation
802 should not necessarily be indented the same as this line.
803 Then COLUMN is the column to indent to, and CONTAINING-SEXP-START
804 is the buffer position of the start of the containing expression."
807 (let ((indent-point (point))
809 ;; setting this to a number inhibits calling hook
812 calculate-lisp-indent-last-sexp containing-sexp
)
814 (goto-char parse-start
)
815 (beginning-of-defun))
816 ;; Find outermost containing sexp
817 (while (< (point) indent-point
)
818 (setq state
(parse-partial-sexp (point) indent-point
0)))
819 ;; Find innermost containing sexp
822 (> (setq paren-depth
(elt state
0)) 0))
824 (setq calculate-lisp-indent-last-sexp
(elt state
2))
825 (setq containing-sexp
(elt state
1))
826 ;; Position following last unclosed open.
827 (goto-char (1+ containing-sexp
))
828 ;; Is there a complete sexp since then?
829 (if (and calculate-lisp-indent-last-sexp
830 (> calculate-lisp-indent-last-sexp
(point)))
831 ;; Yes, but is there a containing sexp after that?
832 (let ((peek (parse-partial-sexp calculate-lisp-indent-last-sexp
834 (if (setq retry
(car (cdr peek
))) (setq state peek
)))))
837 ;; Innermost containing sexp found
838 (goto-char (1+ containing-sexp
))
839 (if (not calculate-lisp-indent-last-sexp
)
840 ;; indent-point immediately follows open paren.
842 (setq desired-indent
(current-column))
843 ;; Find the start of first element of containing sexp.
844 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp
0 t
)
845 (cond ((looking-at "\\s(")
846 ;; First element of containing sexp is a list.
847 ;; Indent under that list.
849 ((> (save-excursion (forward-line 1) (point))
850 calculate-lisp-indent-last-sexp
)
851 ;; This is the first line to start within the containing sexp.
852 ;; It's almost certainly a function call.
853 (if (= (point) calculate-lisp-indent-last-sexp
)
854 ;; Containing sexp has nothing before this line
855 ;; except the first element. Indent under that element.
857 ;; Skip the first element, find start of second (the first
858 ;; argument of the function call) and indent under.
859 (progn (forward-sexp 1)
860 (parse-partial-sexp (point)
861 calculate-lisp-indent-last-sexp
863 (backward-prefix-chars))
865 ;; Indent beneath first sexp on same line as
866 ;; `calculate-lisp-indent-last-sexp'. Again, it's
867 ;; almost certainly a function call.
868 (goto-char calculate-lisp-indent-last-sexp
)
870 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp
872 (backward-prefix-chars)))))
873 ;; Point is at the point to indent under unless we are inside a string.
874 ;; Call indentation hook except when overridden by lisp-indent-offset
875 ;; or if the desired indentation has already been computed.
876 (let ((normal-indent (current-column)))
878 ;; Inside a string, don't change indentation.
880 ((and (integerp lisp-indent-offset
) containing-sexp
)
881 ;; Indent by constant offset
882 (goto-char containing-sexp
)
883 (+ (current-column) lisp-indent-offset
))
885 ((and (boundp 'lisp-indent-function
)
888 (or (funcall lisp-indent-function indent-point state
)
893 (defun lisp-indent-function (indent-point state
)
894 "This function is the normal value of the variable `lisp-indent-function'.
895 It is used when indenting a line within a function call, to see if the
896 called function says anything special about how to indent the line.
898 INDENT-POINT is the position where the user typed TAB, or equivalent.
899 Point is located at the point to indent under (for default indentation);
900 STATE is the `parse-partial-sexp' state for that position.
902 If the current line is in a call to a Lisp function
903 which has a non-nil property `lisp-indent-function',
904 that specifies how to do the indentation. The property value can be
905 * `defun', meaning indent `defun'-style;
906 * an integer N, meaning indent the first N arguments specially
907 like ordinary function arguments and then indent any further
908 arguments like a body;
909 * a function to call just as this function was called.
910 If that function returns nil, that means it doesn't specify
913 This function also returns nil meaning don't specify the indentation."
914 (let ((normal-indent (current-column)))
915 (goto-char (1+ (elt state
1)))
916 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp
0 t
)
917 (if (and (elt state
2)
918 (not (looking-at "\\sw\\|\\s_")))
919 ;; car of form doesn't seem to be a symbol
921 (if (not (> (save-excursion (forward-line 1) (point))
922 calculate-lisp-indent-last-sexp
))
923 (progn (goto-char calculate-lisp-indent-last-sexp
)
925 (parse-partial-sexp (point)
926 calculate-lisp-indent-last-sexp
0 t
)))
927 ;; Indent under the list or under the first sexp on the same
928 ;; line as calculate-lisp-indent-last-sexp. Note that first
929 ;; thing on that line has to be complete sexp since we are
930 ;; inside the innermost containing sexp.
931 (backward-prefix-chars)
933 (let ((function (buffer-substring (point)
934 (progn (forward-sexp 1) (point))))
936 (setq method
(or (get (intern-soft function
) 'lisp-indent-function
)
937 (get (intern-soft function
) 'lisp-indent-hook
)))
938 (cond ((or (eq method
'defun
)
940 (> (length function
) 3)
941 (string-match "\\`def" function
)))
942 (lisp-indent-defform state indent-point
))
944 (lisp-indent-specform method state
945 indent-point normal-indent
))
947 (funcall method indent-point state
)))))))
949 (defvar lisp-body-indent
2
950 "Number of columns to indent the second line of a `(def...)' form.")
952 (defun lisp-indent-specform (count state indent-point normal-indent
)
953 (let ((containing-form-start (elt state
1))
955 body-indent containing-form-column
)
956 ;; Move to the start of containing form, calculate indentation
957 ;; to use for non-distinguished forms (> count), and move past the
958 ;; function symbol. lisp-indent-function guarantees that there is at
959 ;; least one word or symbol character following open paren of containing
961 (goto-char containing-form-start
)
962 (setq containing-form-column
(current-column))
963 (setq body-indent
(+ lisp-body-indent containing-form-column
))
966 ;; Now find the start of the last form.
967 (parse-partial-sexp (point) indent-point
1 t
)
968 (while (and (< (point) indent-point
)
971 (setq count
(1- count
))
973 (parse-partial-sexp (point) indent-point
1 t
))
975 ;; Point is sitting on first character of last (or count) sexp.
977 ;; A distinguished form. If it is the first or second form use double
978 ;; lisp-body-indent, else normal indent. With lisp-body-indent bound
979 ;; to 2 (the default), this just happens to work the same with if as
980 ;; the older code, but it makes unwind-protect, condition-case,
981 ;; with-output-to-temp-buffer, et. al. much more tasteful. The older,
982 ;; less hacked, behavior can be obtained by replacing below with
983 ;; (list normal-indent containing-form-start).
984 (if (<= (- i count
) 1)
985 (list (+ containing-form-column
(* 2 lisp-body-indent
))
986 containing-form-start
)
987 (list normal-indent containing-form-start
))
988 ;; A non-distinguished form. Use body-indent if there are no
989 ;; distinguished forms and this is the first undistinguished form,
990 ;; or if this is the first undistinguished form and the preceding
991 ;; distinguished form has indentation at least as great as body-indent.
992 (if (or (and (= i
0) (= count
0))
993 (and (= count
0) (<= body-indent normal-indent
)))
997 (defun lisp-indent-defform (state indent-point
)
998 (goto-char (car (cdr state
)))
1000 (if (> (point) (car (cdr (cdr state
))))
1002 (goto-char (car (cdr state
)))
1003 (+ lisp-body-indent
(current-column)))))
1006 ;; (put 'progn 'lisp-indent-function 0), say, causes progn to be indented
1007 ;; like defun if the first form is placed on the next line, otherwise
1008 ;; it is indented like any other form (i.e. forms line up under first).
1010 (put 'lambda
'lisp-indent-function
'defun
)
1011 (put 'autoload
'lisp-indent-function
'defun
)
1012 (put 'progn
'lisp-indent-function
0)
1013 (put 'prog1
'lisp-indent-function
1)
1014 (put 'prog2
'lisp-indent-function
2)
1015 (put 'save-excursion
'lisp-indent-function
0)
1016 (put 'save-window-excursion
'lisp-indent-function
0)
1017 (put 'save-selected-window
'lisp-indent-function
0)
1018 (put 'save-restriction
'lisp-indent-function
0)
1019 (put 'save-match-data
'lisp-indent-function
0)
1020 (put 'save-current-buffer
'lisp-indent-function
0)
1021 (put 'with-current-buffer
'lisp-indent-function
1)
1022 (put 'combine-after-change-calls
'lisp-indent-function
0)
1023 (put 'with-output-to-string
'lisp-indent-function
0)
1024 (put 'with-temp-file
'lisp-indent-function
1)
1025 (put 'with-temp-buffer
'lisp-indent-function
0)
1026 (put 'with-temp-message
'lisp-indent-function
1)
1027 (put 'with-syntax-table
'lisp-indent-function
1)
1028 (put 'let
'lisp-indent-function
1)
1029 (put 'let
* 'lisp-indent-function
1)
1030 (put 'while
'lisp-indent-function
1)
1031 (put 'if
'lisp-indent-function
2)
1032 (put 'read-if
'lisp-indent-function
2)
1033 (put 'catch
'lisp-indent-function
1)
1034 (put 'condition-case
'lisp-indent-function
2)
1035 (put 'unwind-protect
'lisp-indent-function
1)
1036 (put 'with-output-to-temp-buffer
'lisp-indent-function
1)
1037 (put 'eval-after-load
'lisp-indent-function
1)
1038 (put 'dolist
'lisp-indent-function
1)
1039 (put 'dotimes
'lisp-indent-function
1)
1040 (put 'when
'lisp-indent-function
1)
1041 (put 'unless
'lisp-indent-function
1)
1043 (defun indent-sexp (&optional endpos
)
1044 "Indent each line of the list starting just after point.
1045 If optional arg ENDPOS is given, indent each line, stopping when
1046 ENDPOS is encountered."
1048 (let ((indent-stack (list nil
))
1050 ;; If ENDPOS is non-nil, use nil as STARTING-POINT
1051 ;; so that calculate-lisp-indent will find the beginning of
1052 ;; the defun we are in.
1053 ;; If ENDPOS is nil, it is safe not to scan before point
1054 ;; since every line we indent is more deeply nested than point is.
1055 (starting-point (if endpos nil
(point)))
1056 (last-point (point))
1057 last-depth bol outer-loop-done inner-loop-done state this-indent
)
1059 ;; Get error now if we don't have a complete sexp after point.
1060 (save-excursion (forward-sexp 1)))
1062 (setq outer-loop-done nil
)
1063 (while (if endpos
(< (point) endpos
)
1064 (not outer-loop-done
))
1065 (setq last-depth next-depth
1066 inner-loop-done nil
)
1067 ;; Parse this line so we can learn the state
1068 ;; to indent the next line.
1069 ;; This inner loop goes through only once
1070 ;; unless a line ends inside a string.
1071 (while (and (not inner-loop-done
)
1072 (not (setq outer-loop-done
(eobp))))
1073 (setq state
(parse-partial-sexp (point) (progn (end-of-line) (point))
1075 (setq next-depth
(car state
))
1076 ;; If the line contains a comment other than the sort
1077 ;; that is indented like code,
1078 ;; indent it now with indent-for-comment.
1079 ;; Comments indented like code are right already.
1080 ;; In any case clear the in-comment flag in the state
1081 ;; because parse-partial-sexp never sees the newlines.
1082 (if (car (nthcdr 4 state
))
1083 (progn (indent-for-comment)
1085 (setcar (nthcdr 4 state
) nil
)))
1086 ;; If this line ends inside a string,
1087 ;; go straight to next line, remaining within the inner loop,
1088 ;; and turn off the \-flag.
1089 (if (car (nthcdr 3 state
))
1092 (setcar (nthcdr 5 state
) nil
))
1093 (setq inner-loop-done t
)))
1097 (setq indent-stack
(nconc indent-stack
1098 (make-list (- next-depth
) nil
))
1099 last-depth
(- last-depth next-depth
)
1101 (or outer-loop-done endpos
1102 (setq outer-loop-done
(<= next-depth
0)))
1105 (while (> last-depth next-depth
)
1106 (setq indent-stack
(cdr indent-stack
)
1107 last-depth
(1- last-depth
)))
1108 (while (< last-depth next-depth
)
1109 (setq indent-stack
(cons nil indent-stack
)
1110 last-depth
(1+ last-depth
)))
1111 ;; Now go to the next line and indent it according
1112 ;; to what we learned from parsing the previous one.
1115 (skip-chars-forward " \t")
1116 ;; But not if the line is blank, or just a comment
1117 ;; (except for double-semi comments; indent them as usual).
1118 (if (or (eobp) (looking-at "\\s<\\|\n"))
1120 (if (and (car indent-stack
)
1121 (>= (car indent-stack
) 0))
1122 (setq this-indent
(car indent-stack
))
1123 (let ((val (calculate-lisp-indent
1124 (if (car indent-stack
) (- (car indent-stack
))
1127 (setq this-indent val
)
1129 (setcar indent-stack
1130 (setq this-indent val
))
1131 (setcar indent-stack
(- (car (cdr val
))))
1132 (setq this-indent
(car val
))))))
1133 (if (and this-indent
(/= (current-column) this-indent
))
1134 (progn (delete-region bol
(point))
1135 (indent-to this-indent
)))))
1137 (setq outer-loop-done
(= (point) last-point
))
1138 (setq last-point
(point)))))))
1140 (defun lisp-indent-region (start end
)
1141 "Indent every line whose first char is between START and END inclusive."
1143 (let ((endmark (copy-marker end
)))
1145 (and (bolp) (not (eolp))
1147 (indent-sexp endmark
)
1148 (set-marker endmark nil
))))
1150 (defun indent-pp-sexp (&optional arg
)
1151 "Indent each line of the list starting just after point, or prettyprint it.
1152 A prefix argument specifies pretty-printing."
1157 (narrow-to-region (point) (progn (forward-sexp 1) (point)))
1159 (goto-char (point-max))
1160 (if (eq (char-before) ?
\n)
1161 (delete-char -
1)))))
1164 ;;;; Lisp paragraph filling commands.
1166 (defcustom emacs-lisp-docstring-fill-column
65
1167 "Value of `fill-column' to use when filling a docstring.
1168 Any non-integer value means do not use a different value of
1169 `fill-column' when filling docstrings."
1170 :type
'(choice (integer)
1171 (const :tag
"Use the current `fill-column'" t
))
1174 (defun lisp-fill-paragraph (&optional justify
)
1175 "Like \\[fill-paragraph], but handle Emacs Lisp comments and docstrings.
1176 If any of the current line is a comment, fill the comment or the
1177 paragraph of it that point is in, preserving the comment's indentation
1178 and initial semicolons."
1180 (or (fill-comment-paragraph justify
)
1181 ;; Since fill-comment-paragraph returned nil, that means we're not in
1182 ;; a comment: Point is on a program line; we are interested
1183 ;; particularly in docstring lines.
1185 ;; We bind `paragraph-start' and `paragraph-separate' temporarily. They
1186 ;; are buffer-local, but we avoid changing them so that they can be set
1187 ;; to make `forward-paragraph' and friends do something the user wants.
1189 ;; `paragraph-start': The `(' in the character alternative and the
1190 ;; left-singlequote plus `(' sequence after the \\| alternative prevent
1191 ;; sexps and backquoted sexps that follow a docstring from being filled
1192 ;; with the docstring. This setting has the consequence of inhibiting
1193 ;; filling many program lines that are not docstrings, which is sensible,
1194 ;; because the user probably asked to fill program lines by accident, or
1195 ;; expecting indentation (perhaps we should try to do indenting in that
1196 ;; case). The `;' and `:' stop the paragraph being filled at following
1197 ;; comment lines and at keywords (e.g., in `defcustom'). Left parens are
1198 ;; escaped to keep font-locking, filling, & paren matching in the source
1201 ;; `paragraph-separate': A clever regexp distinguishes the first line of
1202 ;; a docstring and identifies it as a paragraph separator, so that it
1203 ;; won't be filled. (Since the first line of documentation stands alone
1204 ;; in some contexts, filling should not alter the contents the author has
1205 ;; chosen.) Only the first line of a docstring begins with whitespace
1206 ;; and a quotation mark and ends with a period or (rarely) a comma.
1208 ;; The `fill-column' is temporarily bound to
1209 ;; `emacs-lisp-docstring-fill-column' if that value is an integer.
1210 (let ((paragraph-start (concat paragraph-start
1211 "\\|\\s-*\\([(;:\"]\\|`(\\|#'(\\)"))
1213 (concat paragraph-separate
"\\|\\s-*\".*[,\\.]$"))
1214 (fill-column (if (integerp emacs-lisp-docstring-fill-column
)
1215 emacs-lisp-docstring-fill-column
1217 (fill-paragraph justify
))
1218 ;; Never return nil.
1221 (defun indent-code-rigidly (start end arg
&optional nochange-regexp
)
1222 "Indent all lines of code, starting in the region, sideways by ARG columns.
1223 Does not affect lines starting inside comments or strings, assuming that
1224 the start of the region is not inside them.
1226 Called from a program, takes args START, END, COLUMNS and NOCHANGE-REGEXP.
1227 The last is a regexp which, if matched at the beginning of a line,
1228 means don't indent that line."
1229 (interactive "r\np")
1233 (setq end
(point-marker))
1236 (setq state
(parse-partial-sexp (point)
1238 (forward-line 1) (point))
1240 (while (< (point) end
)
1241 (or (car (nthcdr 3 state
))
1242 (and nochange-regexp
1243 (looking-at nochange-regexp
))
1244 ;; If line does not start in string, indent it
1245 (let ((indent (current-indentation)))
1246 (delete-region (point) (progn (skip-chars-forward " \t") (point)))
1248 (indent-to (max 0 (+ indent arg
)) 0))))
1249 (setq state
(parse-partial-sexp (point)
1251 (forward-line 1) (point))
1254 (provide 'lisp-mode
)
1256 ;; arch-tag: 414c7f93-c245-4b77-8ed5-ed05ef7ff1bf
1257 ;;; lisp-mode.el ends here