comparison lisp/emacs-lisp/lisp-mode.el @ 12701:c50826e44362

(lisp-imenu-generic-expression): Var defined. (lisp-mode-variables): Set imenu-generic-expression.
author Karl Heuer <kwzh@gnu.org>
date Fri, 28 Jul 1995 00:14:15 +0000
parents 66b3d052d4fe
children 1319330ca7ff
comparison
equal deleted inserted replaced
12700:b3a8ee2da96a 12701:c50826e44362
76 (modify-syntax-entry ?\[ "_ " lisp-mode-syntax-table) 76 (modify-syntax-entry ?\[ "_ " lisp-mode-syntax-table)
77 (modify-syntax-entry ?\] "_ " lisp-mode-syntax-table))) 77 (modify-syntax-entry ?\] "_ " lisp-mode-syntax-table)))
78 78
79 (define-abbrev-table 'lisp-mode-abbrev-table ()) 79 (define-abbrev-table 'lisp-mode-abbrev-table ())
80 80
81 (defvar lisp-imenu-generic-expression
82 '(
83 (nil
84 "^\\s-*(def\\(un\\|subst\\|macro\\|advice\\)\\s-+\\([-A-Za-z0-9+]+\\)" 2)
85 ("Variables"
86 "^\\s-*(def\\(var\\|const\\)\\s-+\\([-A-Za-z0-9+]+\\)" 2)
87 ("Types"
88 "^\\s-*(def\\(type\\|struct\\|class\\|ine-condition\\)\\s-+\\([-A-Za-z0-9+]+\\)"
89 2))
90
91 "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.")
92
81 (defun lisp-mode-variables (lisp-syntax) 93 (defun lisp-mode-variables (lisp-syntax)
82 (cond (lisp-syntax 94 (cond (lisp-syntax
83 (set-syntax-table lisp-mode-syntax-table))) 95 (set-syntax-table lisp-mode-syntax-table)))
84 (setq local-abbrev-table lisp-mode-abbrev-table) 96 (setq local-abbrev-table lisp-mode-abbrev-table)
85 (make-local-variable 'paragraph-start) 97 (make-local-variable 'paragraph-start)
103 (make-local-variable 'comment-start-skip) 115 (make-local-variable 'comment-start-skip)
104 (setq comment-start-skip ";+ *") 116 (setq comment-start-skip ";+ *")
105 (make-local-variable 'comment-column) 117 (make-local-variable 'comment-column)
106 (setq comment-column 40) 118 (setq comment-column 40)
107 (make-local-variable 'comment-indent-function) 119 (make-local-variable 'comment-indent-function)
108 (setq comment-indent-function 'lisp-comment-indent)) 120 (setq comment-indent-function 'lisp-comment-indent)
121 (make-local-variable 'imenu-generic-expression)
122 (setq imenu-generic-expression lisp-imenu-generic-expression))
109 123
110 (defvar shared-lisp-mode-map () 124 (defvar shared-lisp-mode-map ()
111 "Keymap for commands shared by all sorts of Lisp modes.") 125 "Keymap for commands shared by all sorts of Lisp modes.")
112 126
113 (if shared-lisp-mode-map 127 (if shared-lisp-mode-map