4.3BSD/usr/contrib/emacs/lisp/lisp-mode.elc


(defvar lisp-mode-syntax-table nil "")

(defvar lisp-mode-abbrev-table nil "")

(if (not lisp-mode-syntax-table) (let ((i 0)) (setq lisp-mode-syntax-table (make-syntax-table)) (set-syntax-table lisp-mode-syntax-table) (while (< i 48) (modify-syntax-entry i "_   ") (setq i (1+ i))) (setq i (1+ 57)) (while (< i 65) (modify-syntax-entry i "_   ") (setq i (1+ i))) (setq i (1+ 90)) (while (< i 97) (modify-syntax-entry i "_   ") (setq i (1+ i))) (setq i (1+ 122)) (while (< i 128) (modify-syntax-entry i "_   ") (setq i (1+ i))) (modify-syntax-entry 32 "    ") (modify-syntax-entry 9 "    ") (modify-syntax-entry 10 ">   ") (modify-syntax-entry 12 ">   ") (modify-syntax-entry 59 "<   ") (modify-syntax-entry 96 "'   ") (modify-syntax-entry 39 "'   ") (modify-syntax-entry 44 "'   ") (modify-syntax-entry 46 "'   ") (modify-syntax-entry 35 "'   ") (modify-syntax-entry 34 "\"    ") (modify-syntax-entry 92 "\\   ") (modify-syntax-entry 40 "()  ") (modify-syntax-entry 41 ")(  ")))

(define-abbrev-table (quote lisp-mode-abbrev-table) nil)

(defun lisp-mode-variables nil (byte-code "!
!P!!Ή!ω!Љ!щ	!҉
" [lisp-mode-syntax-table local-abbrev-table lisp-mode-abbrev-table paragraph-start page-delimiter paragraph-separate indent-line-function comment-start comment-start-skip comment-column comment-indent-hook set-syntax-table make-local-variable "^$\\|" lisp-indent-line ";" ";+ *" 40 lisp-comment-indent] 10))

(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 (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 "È !Ɖlj !" [emacs-lisp-mode-map major-mode mode-name nil kill-all-local-variables use-local-map emacs-lisp-mode "Emacs-Lisp" lisp-mode-variables run-hooks emacs-lisp-mode-hook] 5))

(defvar lisp-mode-map (make-sparse-keymap))

(define-key lisp-mode-map "" (quote lisp-send-defun))

(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}
Entry to this mode calls the value of lisp-mode-hook
if that value is non-nil." (interactive) (byte-code "È !Ɖlj !" [lisp-mode-map major-mode mode-name nil kill-all-local-variables use-local-map lisp-mode "Lisp" lisp-mode-variables run-hooks lisp-mode-hook] 5))

(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 (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 "È !Ɖlj !" [lisp-interaction-mode-map major-mode mode-name nil kill-all-local-variables use-local-map lisp-interaction-mode "Lisp Interaction" lisp-mode-variables run-hooks lisp-interaction-mode-hook] 5))

(defun eval-print-last-sexp (arg) "\
Evaluate sexp before point; print value into current buffer." (interactive "P") (byte-code "ˆ Ŏ	!!`)))`p#" [stab 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 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 `!!$
<0@1ňiZ	!B
I
`\"jdZ`VYdZbZň	!?
b!`
b!`
V)
	#-" [indent shift-amt beg end pos nil whole-exp calculate-lisp-indent beginning-of-line skip-chars-forward " 	" looking-at "[ 	]*;;;" zerop delete-region forward-sexp 1 forward-line indent-code-rigidly] 13))

(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`#\"B	@B
V%		8	A@Tbf`V#

A@
)Ɉ? Tb?i`
$!!`)V?b `
$Ɉ i!`)V`
$`\"!`
$Ɉ 
b `
$ !Ɉ4	\"@;b!iw!DTbi\\wp!pp?p	#?wi.)" [indent-point state paren-depth desired-indent retry t last-sexp containing-sexp parse-start nil peek lisp-indent-offset lisp-indent-hook beginning-of-line beginning-of-defun parse-partial-sexp 0 2 looking-at "\\s(" forward-line 1 backward-prefix-chars /= forward-sexp nthcdr 3 skip-chars-forward " 	" integerp boundp funcall] 27))

(defun lisp-indent-hook (indent-point state) (byte-code "i	A@Tb!`	A@\"o!`!`\"
!N=F?F
GVF
O\"P	\"k!^	#kj	#k*p))" [normal-indent state function method indent-point re-search-forward "\\sw\\|\\s_" /= buffer-substring forward-char -1 forward-sexp 1 nil intern-soft lisp-indent-hook defun 3 string-equal 0 "def" lisp-indent-defform integerp lisp-indent-specform funcall] 14))

(defconst lisp-body-indent 2 "")

(defun lisp-indent-specform (count state indent-point) (byte-code "	A@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 nil normal-indent forward-char 1 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] 7))

(defun lisp-indent-defform (state indent-point) (byte-code "A@b!`AA@VA@b	i\\ć" [state lisp-body-indent forward-line 1 nil] 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!)	?;
			?5m?` `		%@\"@g  \"	\"h\"@!\"	\"
	+
X	7
VAS
WBT!`!m!	7@@Y@\"@@[!!\"!A@[\"@)i\"6`\"j7)." [indent-stack nil next-depth bol outer-loop-done inner-loop-done state this-indent last-depth innerloop-done 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))