emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116762: * lisp/finder.el (finder--builtins-descript


From: Glenn Morris
Subject: [Emacs-diffs] trunk r116762: * lisp/finder.el (finder--builtins-descriptions): New constant.
Date: Fri, 14 Mar 2014 19:24:07 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116762
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2014-03-14 15:24:04 -0400
message:
  * 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"])
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/finder.el                 finder.el-20091113204419-o5vbwnq5f7feedwu-499
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-03-14 18:01:39 +0000
+++ b/lisp/ChangeLog    2014-03-14 19:24:04 +0000
@@ -1,3 +1,8 @@
+2014-03-14  Glenn Morris  <address@hidden>
+
+       * finder.el (finder--builtins-descriptions): New constant.
+       (finder-compile-keywords): Use finder--builtins-descriptions.
+
 2014-03-14  Dmitry Gutov  <address@hidden>
 
        * simple.el (blink-matching-paren): Describe the new value,

=== modified file 'lisp/finder.el'
--- a/lisp/finder.el    2014-03-14 18:00:08 +0000
+++ b/lisp/finder.el    2014-03-14 19:24:04 +0000
@@ -140,6 +140,17 @@
 
 (autoload 'autoload-rubric "autoload")
 
+(defconst finder--builtins-descriptions
+  ;; I have no idea whether these are supposed to be capitalized
+  ;; and/or end in a full-stop.  Existing file headers are inconsistent,
+  ;; but mainly seem to not do so.
+  '((emacs . "the extensible text editor")
+    (nxml . "a new XML mode"))
+  "Alist of built-in package descriptions.
+Entries have the form (PACKAGE-SYMBOL . DESCRIPTION).
+When generating `package--builtins', this overrides what the description
+would otherwise be.")
+
 (defvar finder--builtins-alist
   '(("calc" . calc)
     ("ede"  . ede)
@@ -155,6 +166,10 @@
     ("decorate" . semantic)
     ("symref" . semantic)
     ("wisent" . semantic)
+    ;; This should really be ("nxml" . nxml-mode), because nxml-mode.el
+    ;; is the main file for the package.  Then we would not need an
+    ;; entry in finder--builtins-descriptions.  But I do not know if
+    ;; it is safe to change this, in case it is already in use.
     ("nxml" . nxml)
     ("org"  . org)
     ("srecode" . srecode)
@@ -202,16 +217,19 @@
 ;; but it does not, because the duplicates are (at time of writing)
 ;; all due to files in cedet, which end up with package-override set.
 ;; FIXME this is obviously fragile.
-;; Make the (eq base-name package) case below issue a warning?
+;; Make the (eq base-name package) case below issue a warning if
+;; package-override is nil?
 ;;         (push base-name processed)
            (with-temp-buffer
              (insert-file-contents (expand-file-name f d))
-             (setq summary  (lm-synopsis)
-                   keywords (mapcar 'intern (lm-keywords-list))
+             (setq keywords (mapcar 'intern (lm-keywords-list))
                    package  (or package-override
                                 (let ((str (lm-header "package")))
                                   (if str (intern str)))
                                 base-name)
+                   summary  (or (cdr
+                                 (assq package finder--builtins-descriptions))
+                                (lm-synopsis))
                    version  (lm-header "version")))
            (when summary
              (setq version (ignore-errors (version-to-list version)))
@@ -220,6 +238,9 @@
                     (push (cons package
                                  (package-make-builtin version summary))
                           package--builtins))
+                   ;; The idea here is that eg calc.el gets to define
+                   ;; the description of the calc package.
+                   ;; This does not work for eg nxml-mode.el.
                    ((eq base-name package)
                     (setq desc (cdr entry))
                     (aset desc 0 version)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]