aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorPaul Eggert2012-02-24 22:41:40 -0800
committerPaul Eggert2012-02-24 22:41:40 -0800
commita89654f8f34114db543cb91363e8fded6d73e986 (patch)
tree5ac508597ef2aa460308b4b26c244779e48cdb40 /admin
parent6e6c82a4e687708d5a7a3887f92db45bd74da276 (diff)
parent67b0de11479247cb8bd8491e10e0b464046f18be (diff)
downloademacs-a89654f8f34114db543cb91363e8fded6d73e986.tar.gz
emacs-a89654f8f34114db543cb91363e8fded6d73e986.zip
Merge from trunk.
Diffstat (limited to 'admin')
-rw-r--r--admin/ChangeLog11
-rw-r--r--admin/FOR-RELEASE65
-rw-r--r--admin/admin.el123
-rw-r--r--admin/unidata/unidata-gen.el14
4 files changed, 172 insertions, 41 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 2178df6caf0..c7bfc0ddc6e 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,14 @@
12012-02-16 Kenichi Handa <handa@m17n.org>
2
3 * unidata/unidata-gen.el (unidata-prop-alist): Change the default
4 values of name and old-name to nil.
5 (unidata-get-name): Return nil for the default value.
6
72012-02-11 Glenn Morris <rgm@gnu.org>
8
9 * admin.el (cusver-find-files, cusver-scan, cusver-goto-xref)
10 (cusver-check): New functions.
11
12012-01-19 Glenn Morris <rgm@gnu.org> 122012-01-19 Glenn Morris <rgm@gnu.org>
2 13
3 * bzrmerge.el (bzrmerge-missing): Allow a definitive "no" answer to the 14 * bzrmerge.el (bzrmerge-missing): Allow a definitive "no" answer to the
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index abe53ad0b0d..12b99e49688 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -7,7 +7,7 @@ Check cross-references between the manuals (eg from emacs to elisp)
7are correct. You can use something like the following in the info 7are correct. You can use something like the following in the info
8directory in the Emacs build tree: 8directory in the Emacs build tree:
9 9
10emacs -Q --eval "(setq Info-default-directory-list '(\".\"))" \ 10emacs -Q --eval "(progn (require 'info) (setq Info-directory-list '(\".\")))" \
11 -f info-xref-check-all 11 -f info-xref-check-all
12 12
13make emacs.dvi, elisp.dvi, and deal with any errors (undefined 13make emacs.dvi, elisp.dvi, and deal with any errors (undefined
@@ -61,11 +61,6 @@ sk Miroslav Vaško
61 61
62* BUGS 62* BUGS
63 63
64** rms: gnus-dired.el is a mistake. Those features should not
65be part of Gnus. They should be moved to some other part of Emacs.
66rsteib: Gnus dependencies in `gnus-dired.el' (and `mailcap.el') have been
67minimized. I don't know what is left to do here.
68
69** Check for modes which bind M-s that conflicts with a new global binding M-s 64** Check for modes which bind M-s that conflicts with a new global binding M-s
70and change key bindings where necessary. The current list of modes: 65and change key bindings where necessary. The current list of modes:
71 66
@@ -83,9 +78,10 @@ and change key bindings where necessary. The current list of modes:
83 `log-edit-comment-search-forward'. Perhaps search commands 78 `log-edit-comment-search-forward'. Perhaps search commands
84 on the global key binding `M-s' are useless in these modes. 79 on the global key binding `M-s' are useless in these modes.
85 80
86* DOCUMENTATION 815. Rmail binds `\es' to `rmail-search'/`rmail-summary-search'.
82
87 83
88** Document XEmbed support 84* DOCUMENTATION
89 85
90** Check the Emacs Tutorial. 86** Check the Emacs Tutorial.
91 87
@@ -125,48 +121,53 @@ TUTORIAL.zh
125** Check the manual. 121** Check the manual.
126 122
127abbrevs.texi cyd 123abbrevs.texi cyd
128ack.texi 124ack.texi rgm
129anti.texi cyd 125anti.texi cyd
130arevert-xtra.texi cyd 126arevert-xtra.texi cyd
131basic.texi cyd 127basic.texi cyd
132buffers.texi cyd 128buffers.texi cyd
133building.texi cyd 129building.texi cyd
134calendar.texi 130calendar.texi rgm
135cal-xtra.texi 131cal-xtra.texi rgm
136cmdargs.texi cyd 132cmdargs.texi cyd
137commands.texi cyd 133commands.texi cyd
138custom.texi cyd 134custom.texi cyd
139dired.texi cyd 135dired.texi cyd
140dired-xtra.texi 136dired-xtra.texi rgm
141display.texi cyd 137display.texi cyd
142emacs.texi 138emacs.texi rgm
143emacs-xtra.texi 139emacs-xtra.texi rgm
144emerge-xtra.texi 140emerge-xtra.texi rgm
145entering.texi cyd 141entering.texi cyd
146files.texi cyd 142files.texi cyd
147fixit.texi cyd 143fixit.texi cyd
148fortran-xtra.texi 144fortran-xtra.texi rgm
149frames.texi cyd 145frames.texi cyd
150glossary.texi 146glossary.texi
151help.texi cyd 147help.texi cyd
152indent.texi cyd 148indent.texi cyd
153killing.texi cyd 149killing.texi cyd
154kmacro.texi cyd 150kmacro.texi cyd
155macos.texi 151macos.texi rgm (can't actually test any of it though)
156maintaining.texi cyd 152maintaining.texi cyd
157mark.texi cyd 153mark.texi cyd
158mini.texi 154mini.texi rgm
159misc.texi cyd 155misc.texi cyd
160modes.texi cyd 156modes.texi cyd
161msdog.texi 157msdog.texi rgm (can't actually test any of it though)
162msdog-xtra.texi 158 It was not obvious to me that the following is true (it could well be though):
159
160 Emacs on Windows automatically determines your default printer and
161 sets the variable `printer-name' to that printer's name.
162
163msdog-xtra.texi rgm (can't actually test any of it though)
163mule.texi 164mule.texi
164m-x.texi cyd 165m-x.texi cyd
165package.texi cyd 166package.texi cyd
166picture-xtra.texi 167picture-xtra.texi rgm
167programs.texi cyd 168programs.texi cyd
168regs.texi cyd 169regs.texi cyd
169rmail.texi 170rmail.texi rgm
170screen.texi cyd 171screen.texi cyd
171search.texi cyd 172search.texi cyd
172sending.texi cyd 173sending.texi cyd
@@ -185,26 +186,26 @@ anti.texi
185back.texi 186back.texi
186backups.texi 187backups.texi
187buffers.texi 188buffers.texi
188commands.texi 189commands.texi cyd
189compile.texi cyd 190compile.texi cyd
190control.texi cyd 191control.texi cyd
191customize.texi cyd 192customize.texi cyd
192debugging.texi 193debugging.texi cyd
193display.texi 194display.texi
194edebug.texi 195edebug.texi
195elisp.texi 196elisp.texi
196errors.texi 197errors.texi
197eval.texi cyd 198eval.texi cyd
198files.texi 199files.texi cyd
199frames.texi 200frames.texi
200functions.texi cyd 201functions.texi cyd
201hash.texi cyd 202hash.texi cyd
202help.texi 203help.texi cyd
203hooks.texi 204hooks.texi
204index.texi 205index.texi
205internals.texi 206internals.texi
206intro.texi cyd 207intro.texi cyd
207keymaps.texi 208keymaps.texi cyd
208lists.texi cyd 209lists.texi cyd
209loading.texi cyd 210loading.texi cyd
210locals.texi 211locals.texi
@@ -212,7 +213,7 @@ macros.texi cyd
212maps.texi 213maps.texi
213markers.texi 214markers.texi
214minibuf.texi 215minibuf.texi
215modes.texi 216modes.texi cyd
216nonascii.texi 217nonascii.texi
217numbers.texi cyd 218numbers.texi cyd
218objects.texi cyd 219objects.texi cyd
@@ -222,19 +223,15 @@ positions.texi
222processes.texi 223processes.texi
223searching.texi 224searching.texi
224sequences.texi cyd 225sequences.texi cyd
225streams.texi 226streams.texi cyd
226strings.texi cyd 227strings.texi cyd
227symbols.texi cyd 228symbols.texi cyd
228syntax.texi 229syntax.texi cyd
229text.texi 230text.texi
230tips.texi 231tips.texi
231variables.texi cyd 232variables.texi cyd
232windows.texi 233windows.texi
233 234
234* PLANNED ADDITIONS
235* pov-mode (probably not for Emacs-23: waiting for a Free POV-Ray).
236** gas-mode ?
237
238 235
239Local variables: 236Local variables:
240mode: outline 237mode: outline
diff --git a/admin/admin.el b/admin/admin.el
index 2ca838fdff9..27b2b3ab648 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -442,6 +442,129 @@ Also generate PostScript output in PS-DEST."
442 (setq done t)))) 442 (setq done t))))
443 (forward-line 1)))) 443 (forward-line 1))))
444 444
445
446;; Stuff to check new defcustoms got :version tags.
447;; Adapted from check-declare.el.
448
449(defun cusver-find-files (root &optional old)
450 "Find .el files beneath directory ROOT that contain defcustoms.
451If optional OLD is non-nil, also include defvars."
452 (process-lines find-program root
453 "-name" "*.el"
454 "-exec" grep-program
455 "-l" "-E" (format "^[ \\t]*\\(def%s"
456 (if old "(custom|var)"
457 "custom"
458 ))
459 "{}" "+"))
460
461;; TODO if a defgroup with a version tag, apply to all customs in that
462;; group (eg for new files).
463(defun cusver-scan (file &optional old)
464 "Scan FILE for `defcustom' calls.
465Return a list with elements of the form (VAR . VER),
466This means that FILE contains a defcustom for variable VAR, with
467a :version tag having value VER (may be nil).
468If optional argument OLD is non-nil, also scan for defvars."
469 (let ((m (format "Scanning %s..." file))
470 (re (format "^[ \t]*\\((def%s\\)[ \t\n]"
471 (if old "\\(?:custom\\|var\\)" "custom")))
472 alist var ver)
473 (message "%s" m)
474 (with-temp-buffer
475 (insert-file-contents file)
476 ;; FIXME we could theoretically be inside a string.
477 (while (re-search-forward re nil t)
478 (goto-char (match-beginning 1))
479 (if (and (setq form (ignore-errors (read (current-buffer))))
480 (setq var (car-safe (cdr-safe form)))
481 ;; Exclude macros, eg (defcustom ,varname ...).
482 (symbolp var))
483 (setq ver (car (cdr-safe (memq :version form)))
484 alist (cons (cons var ver) alist))
485 (if form (message "Malformed defcustom: `%s'" form)))))
486 (message "%sdone" m)
487 alist))
488
489(define-button-type 'cusver-xref 'action #'cusver-goto-xref)
490
491(defun cusver-goto-xref (button)
492 "Jump to a lisp file for the BUTTON at point."
493 (let ((file (button-get button 'file))
494 (var (button-get button 'var)))
495 (if (not (file-readable-p file))
496 (message "Cannot read `%s'" file)
497 (with-current-buffer (find-file-noselect file)
498 (goto-char (point-min))
499 (or (re-search-forward (format "^[ \t]*(defcustom[ \t]*%s" var) nil t)
500 (message "Unable to locate defcustom"))
501 (pop-to-buffer (current-buffer))))))
502
503;; You should probably at least do a grep over the old directory
504;; to check the results of this look sensible. Eg cus-start if
505;; something moved from C to Lisp.
506;; TODO handle renamed things with aliases to the old names.
507;; What to do about new files? Does everything in there need a :version,
508;; or eg just the defgroup?
509(defun cusver-check (newdir olddir)
510 "Check that defcustoms have :version tags where needed.
511NEWDIR is the current lisp/ directory, OLDDIR is that from the previous
512release. A defcustom that is only in NEWDIR should have a :version
513tag. We exclude cases where a defvar exists in OLDDIR, since
514just converting a defvar to a defcustom does not require a :version bump.
515
516Note that a :version tag should also be added if the value of a defcustom
517changes (in a non-trivial way). This function does not check for that."
518 (interactive "DNew Lisp directory: \nDOld Lisp directory: ")
519 (or (file-directory-p (setq newdir (expand-file-name newdir)))
520 (error "Directory `%s' not found" newdir))
521 (or (file-directory-p (setq olddir (expand-file-name olddir)))
522 (error "Directory `%s' not found" olddir))
523 (let* ((newfiles (progn (message "Finding new files with defcustoms...")
524 (cusver-find-files newdir)))
525 (oldfiles (progn (message "Finding old files with defcustoms...")
526 (cusver-find-files olddir t)))
527 (newcus (progn (message "Reading new defcustoms...")
528 (mapcar
529 (lambda (file)
530 (cons file (cusver-scan file))) newfiles)))
531 oldcus result thisfile)
532 (message "Reading old defcustoms...")
533 (dolist (file oldfiles)
534 (setq oldcus (append oldcus (cusver-scan file t))))
535 ;; newcus has elements (FILE (VAR VER) ... ).
536 ;; oldcus just (VAR . VER).
537 (message "Checking for version tags...")
538 (dolist (new newcus)
539 (setq file (car new)
540 thisfile
541 (let (missing var)
542 (dolist (cons (cdr new))
543 (or (cdr cons)
544 (assq (setq var (car cons)) oldcus)
545 (push var missing)))
546 (if missing
547 (cons file missing))))
548 (if thisfile
549 (setq result (cons thisfile result))))
550 (message "Checking for version tags... done")
551 (if (not result)
552 (message "No missing :version tags")
553 (pop-to-buffer "*cusver*")
554 (erase-buffer)
555 (insert "These defcustoms might be missing :version tags:\n\n")
556 (dolist (elem result)
557 (let* ((str (file-relative-name (car elem) newdir))
558 (strlen (length str)))
559 (dolist (var (cdr elem))
560 (insert (format "%s: %s\n" str var))
561 (make-text-button (+ (line-beginning-position 0) strlen 2)
562 (line-end-position 0)
563 'file (car elem)
564 'var var
565 'help-echo "Mouse-2: visit this definition"
566 :type 'cusver-xref)))))))
567
445(provide 'admin) 568(provide 'admin)
446 569
447;;; admin.el ends here 570;;; admin.el ends here
diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el
index 713b0512e09..d9277217f0e 100644
--- a/admin/unidata/unidata-gen.el
+++ b/admin/unidata/unidata-gen.el
@@ -166,9 +166,10 @@
166 '((name 166 '((name
167 1 unidata-gen-table-name "uni-name.el" 167 1 unidata-gen-table-name "uni-name.el"
168 "Unicode character name. 168 "Unicode character name.
169Property value is a string." 169Property value is a string or nil.
170The value nil stands for the default value \"null string\")."
170 nil 171 nil
171 "") 172 nil)
172 (general-category 173 (general-category
173 2 unidata-gen-table-symbol "uni-category.el" 174 2 unidata-gen-table-symbol "uni-category.el"
174 "Unicode general category. 175 "Unicode general category.
@@ -235,7 +236,8 @@ Property value is a symbol `Y' or `N'. See also the property `mirroring'."
235 (old-name 236 (old-name
236 10 unidata-gen-table-name "uni-old-name.el" 237 10 unidata-gen-table-name "uni-old-name.el"
237 "Unicode old names as published in Unicode 1.0. 238 "Unicode old names as published in Unicode 1.0.
238Property value is a string.") 239Property value is a string or nil.
240The value nil stands for the default value \"null string\").")
239 (iso-10646-comment 241 (iso-10646-comment
240 11 unidata-gen-table-name "uni-comment.el" 242 11 unidata-gen-table-name "uni-comment.el"
241 "Unicode ISO 10646 comment. 243 "Unicode ISO 10646 comment.
@@ -712,7 +714,7 @@ is the character itself.")))
712 (aset table c name) 714 (aset table c name)
713 (if (= c char) 715 (if (= c char)
714 (setq val name)))) 716 (setq val name))))
715 (or val "")))) 717 val)))
716 718
717 ((and (integerp val) (> val 0)) 719 ((and (integerp val) (> val 0))
718 (let* ((symbol-table (aref (char-table-extra-slot table 4) 1)) 720 (let* ((symbol-table (aref (char-table-extra-slot table 4) 1))
@@ -738,9 +740,7 @@ is the character itself.")))
738 ((eq sym 'CJK\ COMPATIBILITY\ IDEOGRAPH) 740 ((eq sym 'CJK\ COMPATIBILITY\ IDEOGRAPH)
739 (format "%s-%04X" sym char)) 741 (format "%s-%04X" sym char))
740 ((eq sym 'VARIATION\ SELECTOR) 742 ((eq sym 'VARIATION\ SELECTOR)
741 (format "%s-%d" sym (+ (- char #xe0100) 17)))))) 743 (format "%s-%d" sym (+ (- char #xe0100) 17))))))))
742
743 (t "")))
744 744
745;; Store VAL as the name of CHAR in TABLE. 745;; Store VAL as the name of CHAR in TABLE.
746 746