summaryrefslogtreecommitdiff
path: root/.dir-locals.el
blob: 8a00736f6acfa8702b25eb7753c234dc9b873942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
((nil . ((fill-column . 80)
         (project-vc-ignores . ("./_build"))))
 (org-mode . ((org-edit-src-content-indentation 0)))
 (lisp-mode
  . ((eval . (cl-flet ((enhance-imenu-lisp
                        (&rest keywords)
                        (dolist (keyword keywords)
                          (let ((prefix (when (listp keyword) (cl-second keyword)))
                                (keyword (if (listp keyword)
                                             (cl-first keyword)
                                           keyword)))
                            (add-to-list
                             'lisp-imenu-generic-expression
                             (list (purecopy (concat (capitalize keyword)
                                                     (if (string= (substring-no-properties keyword -1) "s")
                                                         "es"
                                                       "s")))
                                   (purecopy (concat "^\\s-*("
                                                     (regexp-opt
                                                      (list (if prefix
                                                                (concat prefix "-" keyword)
                                                              keyword)
                                                            (concat prefix "-" keyword))
                                                      t)
                                                     "\\s-+\\(" lisp-mode-symbol-regexp "\\)"))
                                   2))))))
               ;; This adds the argument to the list of imenu known keywords.
               (enhance-imenu-lisp
                '("bookmarklet-command" "define")
                '("class" "define")
                '("command" "define")
                '("ffi-method" "define")
                '("ffi-generic" "define")
                '("function" "define")
                '("internal-page-command" "define")
                '("internal-page-command-global" "define")
                '("mode" "define")
                '("parenscript" "define")
                "defpsmacro"))))))