]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/lisp-mode.el
(lisp-imenu-generic-expression): Recognize`defcustom' and `defgroup".
[gnu-emacs] / lisp / emacs-lisp / lisp-mode.el
index be328b30329ab0b7c3e8b1e5c8e6b9001ce45ff7..ad4a1f5dc656d3274de662ab1981f27814028ba2 100644 (file)
@@ -53,6 +53,7 @@
        (setq i (1+ i)))
       (modify-syntax-entry ?  "    " emacs-lisp-mode-syntax-table)
       (modify-syntax-entry ?\t "    " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\f "    " emacs-lisp-mode-syntax-table)
       (modify-syntax-entry ?\n ">   " emacs-lisp-mode-syntax-table)
       ;; Give CR the same syntax as newline, for selective-display.
       (modify-syntax-entry ?\^m ">   " emacs-lisp-mode-syntax-table)
@@ -84,9 +85,9 @@
        (nil 
         "^\\s-*(def\\(un\\|subst\\|macro\\|advice\\)\\s-+\\([-A-Za-z0-9+*|:]+\\)" 2)
        ("Variables" 
-        "^\\s-*(def\\(var\\|const\\)\\s-+\\([-A-Za-z0-9+*|:]+\\)" 2)
+        "^\\s-*(def\\(var\\|const\\|custom\\)\\s-+\\([-A-Za-z0-9+*|:]+\\)" 2)
        ("Types" 
-        "^\\s-*(def\\(type\\|struct\\|class\\|ine-condition\\)\\s-+\\([-A-Za-z0-9+*|:]+\\)" 
+        "^\\s-*(def\\(group\\|type\\|struct\\|class\\|ine-condition\\)\\s-+\\([-A-Za-z0-9+*|:]+\\)" 
         2))
 
   "Imenu generic expression for Lisp mode.  See `imenu-generic-expression'.")
@@ -296,12 +297,24 @@ With argument, print output into current buffer."
   (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)))
     (prin1 (eval (let ((stab (syntax-table))
                       (opoint (point))
+                      ignore-quotes
                       expr)
                   (unwind-protect
                       (save-excursion
                         (set-syntax-table emacs-lisp-mode-syntax-table)
+                        ;; If this sexp appears to be enclosed in `...'
+                        ;; then ignore the surrounding quotes.
+                        (setq ignore-quotes
+                              (or (eq (following-char) ?\')
+                                  (eq (preceding-char) ?\')))
                         (forward-sexp -1)
                         (save-restriction
+                          ;; vladimir@cs.ualberta.ca 30-Jul-1997: skip ` in
+                          ;; `variable' so that the value is returned, not the
+                          ;; name 
+                          (if (and ignore-quotes
+                                   (eq (following-char) ?`))
+                              (forward-char))
                           (narrow-to-region (point-min) opoint)
                           (setq expr (read (current-buffer)))
                           ;; If it's an (interactive ...) form, it's more