diff options
| author | Glenn Morris | 2014-03-14 15:24:04 -0400 |
|---|---|---|
| committer | Glenn Morris | 2014-03-14 15:24:04 -0400 |
| commit | e94807f07a14f548cc390d86fcab0ade07739cf2 (patch) | |
| tree | 6055a9208e629ac7cc4ef2bfcd7dde2411d307c1 | |
| parent | 291acb0bf9c9415bae074116ed0b3f20ea665c11 (diff) | |
| download | emacs-e94807f07a14f548cc390d86fcab0ade07739cf2.tar.gz emacs-e94807f07a14f548cc390d86fcab0ade07739cf2.zip | |
* lisp/finder.el (finder--builtins-descriptions): New constant.
(finder-compile-keywords): Use finder--builtins-descriptions.
This avoids us getting silly descriptions in finder-inf.el like
(emacs . [nil nil "abbrev mode commands for Emacs"])
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/finder.el | 27 |
2 files changed, 29 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 769b77809bc..9b8ec690c71 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-14 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * finder.el (finder--builtins-descriptions): New constant. | ||
| 4 | (finder-compile-keywords): Use finder--builtins-descriptions. | ||
| 5 | |||
| 1 | 2014-03-14 Dmitry Gutov <dgutov@yandex.ru> | 6 | 2014-03-14 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 7 | ||
| 3 | * simple.el (blink-matching-paren): Describe the new value, | 8 | * simple.el (blink-matching-paren): Describe the new value, |
diff --git a/lisp/finder.el b/lisp/finder.el index 85db692f87e..a7ddaa333b7 100644 --- a/lisp/finder.el +++ b/lisp/finder.el | |||
| @@ -140,6 +140,17 @@ cus-load\\|finder-inf\\|esh-groups\\|subdirs\\|leim-list\\)\\.el$\\)" | |||
| 140 | 140 | ||
| 141 | (autoload 'autoload-rubric "autoload") | 141 | (autoload 'autoload-rubric "autoload") |
| 142 | 142 | ||
| 143 | (defconst finder--builtins-descriptions | ||
| 144 | ;; I have no idea whether these are supposed to be capitalized | ||
| 145 | ;; and/or end in a full-stop. Existing file headers are inconsistent, | ||
| 146 | ;; but mainly seem to not do so. | ||
| 147 | '((emacs . "the extensible text editor") | ||
| 148 | (nxml . "a new XML mode")) | ||
| 149 | "Alist of built-in package descriptions. | ||
| 150 | Entries have the form (PACKAGE-SYMBOL . DESCRIPTION). | ||
| 151 | When generating `package--builtins', this overrides what the description | ||
| 152 | would otherwise be.") | ||
| 153 | |||
| 143 | (defvar finder--builtins-alist | 154 | (defvar finder--builtins-alist |
| 144 | '(("calc" . calc) | 155 | '(("calc" . calc) |
| 145 | ("ede" . ede) | 156 | ("ede" . ede) |
| @@ -155,6 +166,10 @@ cus-load\\|finder-inf\\|esh-groups\\|subdirs\\|leim-list\\)\\.el$\\)" | |||
| 155 | ("decorate" . semantic) | 166 | ("decorate" . semantic) |
| 156 | ("symref" . semantic) | 167 | ("symref" . semantic) |
| 157 | ("wisent" . semantic) | 168 | ("wisent" . semantic) |
| 169 | ;; This should really be ("nxml" . nxml-mode), because nxml-mode.el | ||
| 170 | ;; is the main file for the package. Then we would not need an | ||
| 171 | ;; entry in finder--builtins-descriptions. But I do not know if | ||
| 172 | ;; it is safe to change this, in case it is already in use. | ||
| 158 | ("nxml" . nxml) | 173 | ("nxml" . nxml) |
| 159 | ("org" . org) | 174 | ("org" . org) |
| 160 | ("srecode" . srecode) | 175 | ("srecode" . srecode) |
| @@ -202,16 +217,19 @@ from; the default is `load-path'." | |||
| 202 | ;; but it does not, because the duplicates are (at time of writing) | 217 | ;; but it does not, because the duplicates are (at time of writing) |
| 203 | ;; all due to files in cedet, which end up with package-override set. | 218 | ;; all due to files in cedet, which end up with package-override set. |
| 204 | ;; FIXME this is obviously fragile. | 219 | ;; FIXME this is obviously fragile. |
| 205 | ;; Make the (eq base-name package) case below issue a warning? | 220 | ;; Make the (eq base-name package) case below issue a warning if |
| 221 | ;; package-override is nil? | ||
| 206 | ;; (push base-name processed) | 222 | ;; (push base-name processed) |
| 207 | (with-temp-buffer | 223 | (with-temp-buffer |
| 208 | (insert-file-contents (expand-file-name f d)) | 224 | (insert-file-contents (expand-file-name f d)) |
| 209 | (setq summary (lm-synopsis) | 225 | (setq keywords (mapcar 'intern (lm-keywords-list)) |
| 210 | keywords (mapcar 'intern (lm-keywords-list)) | ||
| 211 | package (or package-override | 226 | package (or package-override |
| 212 | (let ((str (lm-header "package"))) | 227 | (let ((str (lm-header "package"))) |
| 213 | (if str (intern str))) | 228 | (if str (intern str))) |
| 214 | base-name) | 229 | base-name) |
| 230 | summary (or (cdr | ||
| 231 | (assq package finder--builtins-descriptions)) | ||
| 232 | (lm-synopsis)) | ||
| 215 | version (lm-header "version"))) | 233 | version (lm-header "version"))) |
| 216 | (when summary | 234 | (when summary |
| 217 | (setq version (ignore-errors (version-to-list version))) | 235 | (setq version (ignore-errors (version-to-list version))) |
| @@ -220,6 +238,9 @@ from; the default is `load-path'." | |||
| 220 | (push (cons package | 238 | (push (cons package |
| 221 | (package-make-builtin version summary)) | 239 | (package-make-builtin version summary)) |
| 222 | package--builtins)) | 240 | package--builtins)) |
| 241 | ;; The idea here is that eg calc.el gets to define | ||
| 242 | ;; the description of the calc package. | ||
| 243 | ;; This does not work for eg nxml-mode.el. | ||
| 223 | ((eq base-name package) | 244 | ((eq base-name package) |
| 224 | (setq desc (cdr entry)) | 245 | (setq desc (cdr entry)) |
| 225 | (aset desc 0 version) | 246 | (aset desc 0 version) |