4.4BSD/usr/src/contrib/emacs-18.57/lisp/lisp-mode.elc


(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) (modify-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 "$	? 
!	#	#	#	!!P!
!ɉ!ى
!ډ!ۉ!܉
!݉" [lisp-syntax lisp-mode-syntax-table emacs-lisp-mode-syntax-table local-abbrev-table lisp-mode-abbrev-table paragraph-start page-delimiter paragraph-separate paragraph-ignore-fill-prefix t indent-line-function comment-start comment-start-skip comment-column comment-indent-hook copy-syntax-table modify-syntax-entry 124 "\"   " 91 "_   " 93 set-syntax-table make-local-variable "^$\\|" lisp-indent-line ";" ";+ *" 40 lisp-comment-indent] 15))

(defun lisp-mode-commands (map) (byte-code "###" [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 "Ĉ !	!ȉɉ!!" [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 "ň !ȉɉ!!!" [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 "!" [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 "Ĉ !	!ȉɉ!!" [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 "ˆ Ŏ	!!`)))`p#" [stab emacs-lisp-mode-syntax-table nil eval-region syntax-table ((byte-code "!" [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 "Ĉ ǎ	!!`)))`
p#" [stab emacs-lisp-mode-syntax-table arg t nil eval-region syntax-table ((byte-code "!" [stab set-syntax-table] 2)) set-syntax-table forward-sexp -1] 7))

(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 "È ` `	p#))" [end arg t nil end-of-defun beginning-of-defun eval-region] 6))

(defun lisp-comment-indent nil (byte-code "!
i2!\" <@)2!n.Ȃ0iT	]" [tem comment-column looking-at ";;;" ";;" calculate-lisp-indent skip-chars-backward " 	" 0] 6))

(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 "ň d`Z `!!$ł!.!?: ![<C@iZ	!Tł[
`\"jdZ`VhdZb	!?
b!`
b!`
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 " `		b! `W3`#\"
D	D	\"Vĉ	\"	\"Tbi`V#

A@
)4
ĂTb?i`$!!`)V`UĂ!`$ b `$ i	\"b!i:!b\\::!'
'
?8
	#5:).)" [indent-point state paren-depth desired-indent nil retry t last-sexp containing-sexp parse-start peek normal-indent lisp-indent-offset lisp-indent-hook beginning-of-line beginning-of-defun parse-partial-sexp 0 elt 2 1 looking-at "\\s(" forward-line forward-sexp backward-prefix-chars 3 skip-chars-forward " 	" integerp boundp funcall] 24))

(defun lisp-indent-hook (indent-point state) (byte-code "i	\"Tb`
$	\"!??!`)
V?7
b `
$ i`!`\"!N
=h
?hGVh\"s	\"
!
	$

	#*)" [normal-indent state last-sexp t function method indent-point elt 1 parse-partial-sexp 0 2 looking-at "\\sw\\|\\s_" forward-line beginning-of-line backward-prefix-chars buffer-substring forward-sexp nil intern-soft lisp-indent-hook defun 3 string-match "\\`def" lisp-indent-defform integerp lisp-indent-specform funcall] 19))

(defconst lisp-body-indent 2 "\
")

(defun lisp-indent-specform (count state indent-point normal-indent) (byte-code "	\"bi
\\!!`$`W4я<̈)V^
ZXW
\"\\D[	D}
UgUtUt	X{}	," [containing-form-start state i count body-indent containing-form-column lisp-body-indent indent-point t normal-indent elt 1 nil forward-char forward-sexp parse-partial-sexp (byte-code "S!`	$" [count indent-point t forward-sexp 1 parse-partial-sexp] 6) ((error (byte-code "" [nil] 1))) 0 * 2] 8))

(defun lisp-indent-defform (state indent-point) (byte-code "A@b!`AA@VA@b	i\\" [state lisp-body-indent forward-line 1] 3))

(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 "C!)?/

?3m?` `%@\"@b  \"\"\"@{!\"\"~ɉ*
X+
VAS
WBT!`!m!+@@Y@@@[!

!

\"
A@[\"
@)i\"+`\"j)." [indent-stack nil next-depth bol outer-loop-done inner-loop-done state this-indent last-depth t val 0 forward-sexp 1 parse-partial-sexp end-of-line nthcdr 4 indent-for-comment setcar 3 forward-line 5 skip-chars-forward " 	" looking-at "[;
]" 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 "È	b 
bn!`!`%`	Wf\"@T7!T `!`\"lS
\\]\")`!`%\"))" [state end start nil nochange-regexp indent arg point-marker parse-partial-sexp forward-line 1 nthcdr 3 looking-at current-indentation delete-region skip-chars-forward " 	" indent-to 0] 17))