Commit 99ec65b3 authored by Dave Love's avatar Dave Love
Browse files

(lisp-imenu-generic-expression): Don't

insist on symbols starting with word syntax.
(lisp-mode-shared-map): Renamed from shared-lisp-mode-map.
(eval-defun-1): Doc fix.
(indent-sexp): Use nconc to build up indent-stack.
parent 968f7c4a
...@@ -149,24 +149,24 @@ ine-condition\\|ine-widget\\|face\\)\\s-+'?\\(\\sw\\(\\sw\\|\\s_\\)+\\)") ...@@ -149,24 +149,24 @@ ine-condition\\|ine-widget\\|face\\)\\s-+'?\\(\\sw\\(\\sw\\|\\s_\\)+\\)")
(- (match-end 0) (match-beginning 0)))) (- (match-end 0) (match-beginning 0))))
(defvar shared-lisp-mode-map () (defvar lisp-mode-shared-map ()
"Keymap for commands shared by all sorts of Lisp modes.") "Keymap for commands shared by all sorts of Lisp modes.")
(if shared-lisp-mode-map (if lisp-mode-shared-map
() ()
(setq shared-lisp-mode-map (make-sparse-keymap)) (setq lisp-mode-shared-map (make-sparse-keymap))
(define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp) (define-key lisp-mode-shared-map "\e\C-q" 'indent-sexp)
(define-key shared-lisp-mode-map "\177" 'backward-delete-char-untabify)) (define-key lisp-mode-shared-map "\177" 'backward-delete-char-untabify))
(defvar emacs-lisp-mode-map () (defvar emacs-lisp-mode-map ()
"Keymap for Emacs Lisp mode. "Keymap for Emacs Lisp mode.
All commands in `shared-lisp-mode-map' are inherited by this map.") All commands in `lisp-mode-shared-map' are inherited by this map.")
(if emacs-lisp-mode-map (if emacs-lisp-mode-map
() ()
(let ((map (make-sparse-keymap "Emacs-Lisp"))) (let ((map (make-sparse-keymap "Emacs-Lisp")))
(setq emacs-lisp-mode-map (make-sparse-keymap)) (setq emacs-lisp-mode-map (make-sparse-keymap))
(set-keymap-parent emacs-lisp-mode-map shared-lisp-mode-map) (set-keymap-parent emacs-lisp-mode-map lisp-mode-shared-map)
(define-key emacs-lisp-mode-map "\e\t" 'lisp-complete-symbol) (define-key emacs-lisp-mode-map "\e\t" 'lisp-complete-symbol)
(define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun) (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)
(define-key emacs-lisp-mode-map [menu-bar] (make-sparse-keymap)) (define-key emacs-lisp-mode-map [menu-bar] (make-sparse-keymap))
...@@ -252,12 +252,12 @@ if that value is non-nil." ...@@ -252,12 +252,12 @@ if that value is non-nil."
(defvar lisp-mode-map (defvar lisp-mode-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
(set-keymap-parent map shared-lisp-mode-map) (set-keymap-parent map lisp-mode-shared-map)
(define-key map "\e\C-x" 'lisp-eval-defun) (define-key map "\e\C-x" 'lisp-eval-defun)
(define-key map "\C-c\C-z" 'run-lisp) (define-key map "\C-c\C-z" 'run-lisp)
map) map)
"Keymap for ordinary Lisp mode. "Keymap for ordinary Lisp mode.
All commands in `shared-lisp-mode-map' are inherited by this map.") All commands in `lisp-mode-shared-map' are inherited by this map.")
(defun lisp-mode () (defun lisp-mode ()
"Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
...@@ -288,13 +288,13 @@ if that value is non-nil." ...@@ -288,13 +288,13 @@ if that value is non-nil."
(defvar lisp-interaction-mode-map (defvar lisp-interaction-mode-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
(set-keymap-parent map shared-lisp-mode-map) (set-keymap-parent map lisp-mode-shared-map)
(define-key map "\e\C-x" 'eval-defun) (define-key map "\e\C-x" 'eval-defun)
(define-key map "\e\t" 'lisp-complete-symbol) (define-key map "\e\t" 'lisp-complete-symbol)
(define-key map "\n" 'eval-print-last-sexp) (define-key map "\n" 'eval-print-last-sexp)
map) map)
"Keymap for Lisp Interaction mode. "Keymap for Lisp Interaction mode.
All commands in `shared-lisp-mode-map' are inherited by this map.") All commands in `lisp-mode-shared-map' are inherited by this map.")
(defun lisp-interaction-mode () (defun lisp-interaction-mode ()
"Major mode for typing and evaluating Lisp forms. "Major mode for typing and evaluating Lisp forms.
...@@ -400,9 +400,11 @@ With argument, print output into current buffer." ...@@ -400,9 +400,11 @@ With argument, print output into current buffer."
(setq debug-on-error new-value)) (setq debug-on-error new-value))
value))) value)))
;; Change defvar into defconst within FORM,
;; and likewise for other constructs as necessary.
(defun eval-defun-1 (form) (defun eval-defun-1 (form)
"Change defvar into defconst within FORM.
Likewise for other constructs as necessary."
;; The code in edebug-defun should be consistent with this, but not
;; the same, since this gets a macroexpended form.
(cond ((and (eq (car form) 'defvar) (cond ((and (eq (car form) 'defvar)
(cdr-safe (cdr-safe form))) (cdr-safe (cdr-safe form)))
;; Force variable to be bound. ;; Force variable to be bound.
...@@ -840,8 +842,8 @@ ENDPOS is encountered." ...@@ -840,8 +842,8 @@ ENDPOS is encountered."
(and endpos (and endpos
(<= next-depth 0) (<= next-depth 0)
(progn (progn
(setq indent-stack (append indent-stack (setq indent-stack (nconc indent-stack
(make-list (- next-depth) nil)) (make-list (- next-depth) nil))
last-depth (- last-depth next-depth) last-depth (- last-depth next-depth)
next-depth 0))) next-depth 0)))
(or outer-loop-done endpos (or outer-loop-done endpos
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment