------------------------------------------------------------ revno: 115931 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16382 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2014-01-08 20:59:19 -0500 message: * lisp/simple.el (deactivate-mark, activate-mark): Force-mode-line-update. (activate-mark): Add `no-tmm' argument. (set-mark, push-mark-command): Use it instead of running activate-mark-hook by hand. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-09 01:32:45 +0000 +++ lisp/ChangeLog 2014-01-09 01:59:19 +0000 @@ -1,3 +1,11 @@ +2014-01-09 Stefan Monnier + + * simple.el (deactivate-mark, activate-mark): Force-mode-line-update + (bug#16382). + (activate-mark): Add `no-tmm' argument. + (set-mark, push-mark-command): Use it instead of running + activate-mark-hook by hand. + 2014-01-08 Eric S. Raymond In preparation for the move to git, sanitize out some @@ -11,8 +19,8 @@ 2014-01-08 David Engster - * help-fns.el (help-fns-describe-function-functions): New - variable to call functions for augmenting help buffers. + * help-fns.el (help-fns-describe-function-functions): + New variable to call functions for augmenting help buffers. (describe-function-1): Remove explicit calls to `help-fns--compiler-macro', `help-fns--parent-mode' and `help-fns--obsolete'. Put them in above new variable instead, and @@ -20,13 +28,13 @@ * emacs-lisp/eieio-opt.el (eieio-help-class): Rename from `eieio-describe-class'. Not meant for interactive use anymore, but to augment existing help buffers. Remove optional second - argument. Create proper button for file location. Rewrite - function to use `insert' instead of `princ' and `prin1' where + argument. Create proper button for file location. + Rewrite function to use `insert' instead of `princ' and `prin1' where possible. (eieio-help-class-slots): Rename from `eieio-describe-class-slots'. (eieio-method-def, eieio-class-def): Move further up. - (describe-method, describe-generic, eieio-describe-method): Remove - aliases. + (describe-method, describe-generic, eieio-describe-method): + Remove aliases. (eieio-help-constructor, eieio-help-generic): Rename from `eieio-describe-constructor' and `eieio-describe-generic', resp. Rewrite to use `insert' in the current buffer and use proper help @@ -36,8 +44,8 @@ arguments. (eieio-help-mode-augmentation-maybee): Remove. (eieio-describe-class-sb): Use `describe-function'. - * emacs-lisp/eieio.el (help-fns-describe-function-functions): Add - `eieio-help-generic' and `eieio-help-constructor'. + * emacs-lisp/eieio.el (help-fns-describe-function-functions): + Add `eieio-help-generic' and `eieio-help-constructor'. 2014-01-08 Paul Eggert === modified file 'lisp/simple.el' --- lisp/simple.el 2014-01-01 07:43:34 +0000 +++ lisp/simple.el 2014-01-09 01:59:19 +0000 @@ -4322,6 +4322,7 @@ (null (x-selection-exists-p 'PRIMARY)))) (x-set-selection 'PRIMARY (funcall region-extract-function nil))))) + (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). (if (and (null force) (or (eq transient-mark-mode 'lambda) (and (eq (car-safe transient-mark-mode) 'only) @@ -4334,11 +4335,14 @@ (setq mark-active nil) (run-hooks 'deactivate-mark-hook)))) -(defun activate-mark () - "Activate the mark." +(defun activate-mark (&optional no-tmm) + "Activate the mark. +If NO-TMM is non-nil, leave `transient-mark-mode' alone." (when (mark t) + (unless (and mark-active transient-mark-mode) + (force-mode-line-update)) ;Refresh toolbar (bug#16382). (setq mark-active t) - (unless transient-mark-mode + (unless (or transient-mark-mode no-tmm) (setq transient-mark-mode 'lambda)) (run-hooks 'activate-mark-hook))) @@ -4359,16 +4363,13 @@ (let ((beg (point))) (forward-line 1) (delete-region beg (point)))." + (set-marker (mark-marker) pos (current-buffer)) (if pos - (progn - (setq mark-active t) - (run-hooks 'activate-mark-hook) - (set-marker (mark-marker) pos (current-buffer))) + (activate-mark 'no-tmm) ;; Normally we never clear mark-active except in Transient Mark mode. ;; But when we actually clear out the mark value too, we must ;; clear mark-active in any mode. - (deactivate-mark t) - (set-marker (mark-marker) nil))) + (deactivate-mark t))) (defcustom use-empty-active-region nil "Whether \"region-aware\" commands should act on empty regions. @@ -4492,11 +4493,10 @@ If no prefix ARG and mark is already set there, just activate it. Display `Mark set' unless the optional second arg NOMSG is non-nil." (interactive "P") - (let ((mark (marker-position (mark-marker)))) + (let ((mark (mark t))) (if (or arg (null mark) (/= mark (point))) (push-mark nil nomsg t) - (setq mark-active t) - (run-hooks 'activate-mark-hook) + (activate-mark 'no-tmm) (unless nomsg (message "Mark activated"))))) ------------------------------------------------------------ revno: 115930 committer: Eric S. Raymond branch nick: trunk timestamp: Wed 2014-01-08 20:32:45 -0500 message: Create a needed obsolete-variable alias. Fix up some docstrings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-08 22:57:47 +0000 +++ lisp/ChangeLog 2014-01-09 01:32:45 +0000 @@ -4,7 +4,7 @@ Bazaar-specific names. * version.el (emacs-bzr-version): Name changed to - emacs-repository-version. + emacs-repository-version. Obsolete-variable alias made. * loadup.el: Follow through on this name change. * lisp/mail/emacsbug.el (report-emacs-bug): Factor out any assumption about the version control system in use. === modified file 'lisp/version.el' --- lisp/version.el 2014-01-08 22:57:47 +0000 +++ lisp/version.el 2014-01-09 01:32:45 +0000 @@ -86,10 +86,12 @@ ;; Set during dumping, this is a defvar so that it can be setq'd. (defvar emacs-repository-version nil - "String giving the bzr revision from which this Emacs was built. -The format is: [revno] revision_id, where revno may be absent. -Value is nil if Emacs was not built from a bzr checkout, or if we could -not determine the revision.") + "String giving the repository revision from which this Emacs was built. +Value is nil if Emacs was not built from a repository checkout, +or if we could not determine the revision.") + +(define-obsolete-variable-alias 'emacs-bzr-version + 'emacs-repository-version "24.4") (defun emacs-bzr-version-dirstate (dir) "Try to return as a string the bzr revision ID of directory DIR. @@ -127,16 +129,18 @@ (buffer-string)))) (defun emacs-repository-get-version (&optional dir external) - "Try to return as a string the bzr revision of the Emacs sources. -The format is: [revno] revision_id, where revno may be absent. -Value is nil if the sources do not seem to be under bzr, or if we could -not determine the revision. Note that this reports on the current state -of the sources, which may not correspond to the running Emacs. + "Try to return as a string the repository revision of the Emacs sources. +The format of the returned string is dependent on the VCS in use. +Value is nil if the sources do not seem to be under version +control, or if we could not determine the revision. Note that +this reports on the current state of the sources, which may not +correspond to the running Emacs. -Optional argument DIR is a directory to use instead of `source-directory'. -Optional argument EXTERNAL non-nil means to maybe ask `bzr' itself, -if the sources appear to be under bzr. If `force', always ask bzr. -Otherwise only ask bzr if we cannot find any information ourselves." +Optional argument DIR is a directory to use instead of +`source-directory'. Optional argument EXTERNAL non-nil means to +maybe ask the VCS itself, if the sources appear to be under +version control. If `force', always ask. the VCS. Otherwise +only ask the VCS if we cannot find any information ourselves." (or dir (setq dir source-directory)) (when (file-directory-p (expand-file-name ".bzr/branch" dir)) (if (eq external 'force) ------------------------------------------------------------ revno: 115929 committer: Eric S. Raymond branch nick: trunk timestamp: Wed 2014-01-08 19:10:07 -0500 message: Clean up unnecessary references to Bazaar. Documentation changes only. diff: === modified file 'ChangeLog' --- ChangeLog 2014-01-08 23:24:54 +0000 +++ ChangeLog 2014-01-09 00:10:07 +0000 @@ -1,3 +1,9 @@ +2014-01-09 Eric S. Raymond + + * INSTALL, configure.ac, etc/CONTRIBUTE, nt/INSTALL: Remove + unnecessarily specific references to Bazaar that could better + simply be to the repository. + 2014-01-08 Eric S. Raymond * INSTALL.BZR: Renamed to INSTALL.REPO === modified file 'INSTALL' --- INSTALL 2014-01-08 23:24:54 +0000 +++ INSTALL 2014-01-09 00:10:07 +0000 @@ -7,7 +7,7 @@ This file contains general information on building GNU Emacs. For more information specific to the MS-Windows, GNUstep/Mac OS X, and MS-DOS ports, also read the files nt/INSTALL, nextstep/INSTALL, and -msdos/INSTALL. For information about building from a Bazaar checkout +msdos/INSTALL. For information about building from a repository checkout (rather than a release), also read the file INSTALL.REPO. === modified file 'configure.ac' --- configure.ac 2014-01-05 01:00:32 +0000 +++ configure.ac 2014-01-09 00:10:07 +0000 @@ -1025,11 +1025,11 @@ ## pre-built, and not deleted by the normal clean rules. makeinfo is ## therefore in the category of "special tools" not normally required, which ## configure does not have to check for (eg autoconf itself). -## In a Bazaar checkout on the other hand, the manuals are not included. -## So makeinfo is a requirement to build from Bazaar, and configure +## In a repository checkout on the other hand, the manuals are not included. +## So makeinfo is a requirement to build from the repository, and configure ## should test for it as it does for any other build requirement. ## We use the presence of $srcdir/info/emacs to distinguish a release, -## with pre-built manuals, from a Bazaar checkout. +## with pre-built manuals, from a repository checkout. HAVE_MAKEINFO=yes if test "$MAKEINFO" = "no"; then === modified file 'etc/CONTRIBUTE' --- etc/CONTRIBUTE 2014-01-08 23:24:54 +0000 +++ etc/CONTRIBUTE 2014-01-09 00:10:07 +0000 @@ -159,7 +159,7 @@ ** Write access to the Emacs repository. Once you become a frequent contributor to Emacs, we can consider -giving you write access to the Bazaar repository. +giving you write access to the version-control repository. ** Emacs Mailing lists. === modified file 'nt/INSTALL' --- nt/INSTALL 2014-01-08 23:24:54 +0000 +++ nt/INSTALL 2014-01-09 00:10:07 +0000 @@ -122,7 +122,7 @@ optional libraries near the end of this document, before you start the build. Also, consider installing additional MinGW packages that are required/recommended, especially if you are building from the - Bazaar repository, as described in the next section. + repository, as described in the next section. ** Installing MinGW and MSYS manually @@ -166,7 +166,7 @@ been warned! Additional MinGW packages are required/recommended, especially if - you are building from the Bazaar repository: + you are building from the repository: . Texinfo (needed to produce the Info manuals when building from bzr, and for "make install") @@ -218,9 +218,9 @@ - mktemp These should only be needed if you intend to build development - versions of Emacs from the Bazaar repository. + versions of Emacs from the repository. - . Additional packages (needed only if building from the Bazaar + . Additional packages (needed only if building from the repository): Automake and Autoconf. They are available from here: @@ -279,7 +279,7 @@ If you are building a release or pretest tarball, skip this section, because the configure script is already present in the tarball. - To build a development snapshot from the Emacs Bazaar repository, + To build a development snapshot from the Emacs repository, you will first need to generate the configure script and a few other auto-generated files. @@ -449,7 +449,7 @@ * Make targets The following make targets may be used by users building the source - distribution, or users who have checked out of Bazaar after + distribution, or users who have checked out of the repository after an initial bootstrapping. make @@ -471,7 +471,8 @@ necessary to run the configure script followed by "make", in order to rebuild. - The following targets are intended only for use with the Bazaar sources. + The following targets are intended only for use with the repository + sources. make bootstrap Removes all the auto-generated files and all the *.elc byte-compiled @@ -481,7 +482,7 @@ make maintainer-clean Removes everything that can be recreated, including compiled Lisp - files, to get back to the state of a fresh Bazaar tree. After make + files, to get back to the state of a fresh repository tree. After make maintainer-clean, it is necessary to run configure and "make" or "make bootstrap" to rebuild. Occasionally it may be necessary to run this target after an update. ------------------------------------------------------------ revno: 115928 committer: Eric S. Raymond branch nick: trunk timestamp: Wed 2014-01-08 18:44:02 -0500 message: Correect a minor error introduced into NEWS by my last commit. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-08 22:57:47 +0000 +++ etc/NEWS 2014-01-08 23:44:02 +0000 @@ -62,6 +62,10 @@ To use the old backend by default, do on the command line: % defaults write org.gnu.Emacs FontBackend ns +** If your Emacs was built from a repository checkout, the new variable +`emacs-repository-version' contains information about the bzr revision used. +In 24.3 this variable was `emacs-bzr-version`. + * Startup Changes in Emacs 24.4 @@ -1472,7 +1476,7 @@ and sorted above the other "available" packages by default. ** If your Emacs was built from a repository checkout, the new variable -`emacs-repository-version' contains information about the bzr revision used. +`emacs-bzr-version' contains information about the bzr revision used. ** New option `create-lockfiles' specifies usage of lockfiles. It defaults to t. Changing it to nil inhibits the creation of lock ------------------------------------------------------------ revno: 115927 committer: Eric S. Raymond branch nick: trunk timestamp: Wed 2014-01-08 18:24:54 -0500 message: Rename INSTALL.BZR to UNSTALL.REPOm and carry that through in other files. diff: === modified file 'ChangeLog' --- ChangeLog 2014-01-05 00:55:29 +0000 +++ ChangeLog 2014-01-08 23:24:54 +0000 @@ -1,3 +1,11 @@ +2014-01-08 Eric S. Raymond + + * INSTALL.BZR: Renamed to INSTALL.REPO + * INSTALL, autogen.sh, etc/AUTHORS, etc/CONTRIBUTE, + lisp/emacs-lisp/authors.el, nt/INSTALL: Carry through the + above renaming. + * INSTALL.REPO: remove all references to any specific VCS. + 2014-01-05 Paul Eggert Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343). === modified file 'INSTALL' --- INSTALL 2014-01-01 07:43:34 +0000 +++ INSTALL 2014-01-08 23:24:54 +0000 @@ -8,7 +8,7 @@ For more information specific to the MS-Windows, GNUstep/Mac OS X, and MS-DOS ports, also read the files nt/INSTALL, nextstep/INSTALL, and msdos/INSTALL. For information about building from a Bazaar checkout -(rather than a release), also read the file INSTALL.BZR. +(rather than a release), also read the file INSTALL.REPO. BASIC INSTALLATION === renamed file 'INSTALL.BZR' => 'INSTALL.REPO' --- INSTALL.BZR 2014-01-01 07:43:34 +0000 +++ INSTALL.REPO 2014-01-08 23:24:54 +0000 @@ -2,10 +2,10 @@ See the end of the file for license conditions. - Building and Installing Emacs from Bazaar + Building and Installing Emacs from the Repository -Building Emacs from Bazaar requires some tools that are not needed -when building from a release. You will need: +Building Emacs from the source-code repository requires some tools +that are not needed when building from a release. You will need: autoconf - at least the version specified near the start of configure.ac (in the AC_PREREQ command). @@ -34,14 +34,14 @@ invoke "./configure -C" instead. Some of the files that are included in the Emacs tarball, such as -byte-compiled Lisp files, are not stored in Bazaar. Therefore, to -build from Bazaar you must run "make bootstrap" instead of just "make": +byte-compiled Lisp files, are not stored in the repository. Therefore, to +build from the repository you must run "make bootstrap" instead of +just "make": - $ bzr pull $ make bootstrap Normally, it is not necessary to use "make bootstrap" after every -update from Bazaar. "make" should work in 90% of the cases and be +update from the repository. "make" should work in 90% of the cases and be much quicker. $ make @@ -72,7 +72,7 @@ etc.) before "make bootstrap" or "make"; the rest of the procedure is applicable to those systems as well. -Because the Bazaar version of Emacs is a work in progress, it will +Because the repository version of Emacs is a work in progress, it will sometimes fail to build. Please wait a day or so (and check the archives of the emacs-buildstatus, emacs-devel, and bug-gnu-emacs mailing lists) before reporting such problems. In most cases, the === modified file 'autogen.sh' --- autogen.sh 2014-01-01 07:43:34 +0000 +++ autogen.sh 2014-01-08 23:24:54 +0000 @@ -25,7 +25,7 @@ ## The Emacs bzr repository does not include the configure script ## (and associated helpers). The first time you fetch Emacs from bzr, ## run this script to generate the necessary files. -## For more details, see the file INSTALL.BZR. +## For more details, see the file INSTALL.REPO. ### Code: @@ -105,7 +105,7 @@ cat < .CVS -> .BZR ("INSTALL-CVS" . "INSTALL.BZR") ("INSTALL.CVS" . "INSTALL.BZR") + ("INSTALL.BZR" . "INSTALL.REPO") ("refcards/fr-drdref.pdf" . "refcards/fr-dired-ref.pdf") ("gnus-logo.eps" . "refcards/gnus-logo.eps") ("build-install" . "build-ins.in") === modified file 'nt/INSTALL' --- nt/INSTALL 2014-01-01 07:43:34 +0000 +++ nt/INSTALL 2014-01-08 23:24:54 +0000 @@ -292,7 +292,7 @@ $ ./autogen.sh Checking whether you have the necessary tools... - (Read INSTALL.BZR for more details on building Emacs) + (Read INSTALL.REPO for more details on building Emacs) Checking for autoconf (need at least version 2.65)... ok ------------------------------------------------------------ revno: 115926 committer: Eric S. Raymond branch nick: trunk timestamp: Wed 2014-01-08 17:57:47 -0500 message: In preparation for the move to git, sanitize out some Bazaar-specific names. * version.el (emacs-bzr-version): Name changed to emacs-repository-version. * loadup.el: Follow through on this name change. * lisp/mail/emacsbug.el (report-emacs-bug): Factor out any assumption about the version control system in use. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-07 04:36:52 +0000 +++ etc/NEWS 2014-01-08 22:57:47 +0000 @@ -1471,8 +1471,8 @@ ** In the Package Menu, newly-available packages are listed as "new", and sorted above the other "available" packages by default. -** If your Emacs was built from a bzr checkout, the new variable -`emacs-bzr-version' contains information about the bzr revision used. +** If your Emacs was built from a repository checkout, the new variable +`emacs-repository-version' contains information about the bzr revision used. ** New option `create-lockfiles' specifies usage of lockfiles. It defaults to t. Changing it to nil inhibits the creation of lock === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-08 21:59:19 +0000 +++ lisp/ChangeLog 2014-01-08 22:57:47 +0000 @@ -1,3 +1,14 @@ +2014-01-08 Eric S. Raymond + + In preparation for the move to git, sanitize out some + Bazaar-specific names. + + * version.el (emacs-bzr-version): Name changed to + emacs-repository-version. + * loadup.el: Follow through on this name change. + * lisp/mail/emacsbug.el (report-emacs-bug): Factor out any + assumption about the version control system in use. + 2014-01-08 David Engster * help-fns.el (help-fns-describe-function-functions): New === modified file 'lisp/loadup.el' --- lisp/loadup.el 2014-01-01 07:43:34 +0000 +++ lisp/loadup.el 2014-01-08 22:57:47 +0000 @@ -328,7 +328,7 @@ (string-to-number (substring name (length base) exelen)))) files))) - (setq emacs-bzr-version (condition-case nil (emacs-bzr-get-version) + (setq emacs-repository-version (condition-case nil (emacs-repository-get-version) (error nil))) ;; `emacs-version' is a constant, so we shouldn't change it with `setq'. (defconst emacs-version === modified file 'lisp/mail/emacsbug.el' --- lisp/mail/emacsbug.el 2014-01-06 06:25:30 +0000 +++ lisp/mail/emacsbug.el 2014-01-08 22:57:47 +0000 @@ -230,8 +230,8 @@ (insert (propertize "\n" 'display txt))) (insert "\n\nIn " (emacs-version) "\n") - (if (stringp emacs-bzr-version) - (insert "Bzr revision: " emacs-bzr-version "\n")) + (if (stringp emacs-repository-version) + (insert "Repository revision: " emacs-repository-version "\n")) (if (fboundp 'x-server-vendor) (condition-case nil ;; This is used not only for X11 but also W32 and others. === modified file 'lisp/version.el' --- lisp/version.el 2014-01-01 07:43:34 +0000 +++ lisp/version.el 2014-01-08 22:57:47 +0000 @@ -85,7 +85,7 @@ (defalias 'version 'emacs-version) ;; Set during dumping, this is a defvar so that it can be setq'd. -(defvar emacs-bzr-version nil +(defvar emacs-repository-version nil "String giving the bzr revision from which this Emacs was built. The format is: [revno] revision_id, where revno may be absent. Value is nil if Emacs was not built from a bzr checkout, or if we could @@ -126,7 +126,7 @@ "dir")) (buffer-string)))) -(defun emacs-bzr-get-version (&optional dir external) +(defun emacs-repository-get-version (&optional dir external) "Try to return as a string the bzr revision of the Emacs sources. The format is: [revno] revision_id, where revno may be absent. Value is nil if the sources do not seem to be under bzr, or if we could ------------------------------------------------------------ revno: 115925 [merge] committer: David Engster branch nick: trunk timestamp: Wed 2014-01-08 22:59:19 +0100 message: Proper help support for EIEIO classes and methods. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-08 19:39:25 +0000 +++ lisp/ChangeLog 2014-01-08 21:59:19 +0000 @@ -1,3 +1,33 @@ +2014-01-08 David Engster + + * help-fns.el (help-fns-describe-function-functions): New + variable to call functions for augmenting help buffers. + (describe-function-1): Remove explicit calls to + `help-fns--compiler-macro', `help-fns--parent-mode' and + `help-fns--obsolete'. Put them in above new variable instead, and + call them through `run-hook-with-args'. + * emacs-lisp/eieio-opt.el (eieio-help-class): Rename from + `eieio-describe-class'. Not meant for interactive use anymore, + but to augment existing help buffers. Remove optional second + argument. Create proper button for file location. Rewrite + function to use `insert' instead of `princ' and `prin1' where + possible. + (eieio-help-class-slots): Rename from `eieio-describe-class-slots'. + (eieio-method-def, eieio-class-def): Move further up. + (describe-method, describe-generic, eieio-describe-method): Remove + aliases. + (eieio-help-constructor, eieio-help-generic): Rename from + `eieio-describe-constructor' and `eieio-describe-generic', resp. + Rewrite to use `insert' in the current buffer and use proper help + buttons. + (eieio-help-find-method-definition) + (eieio-help-find-class-definition): Also accept symbols as + arguments. + (eieio-help-mode-augmentation-maybee): Remove. + (eieio-describe-class-sb): Use `describe-function'. + * emacs-lisp/eieio.el (help-fns-describe-function-functions): Add + `eieio-help-generic' and `eieio-help-constructor'. + 2014-01-08 Paul Eggert Spelling fixes. === modified file 'lisp/emacs-lisp/eieio-opt.el' --- lisp/emacs-lisp/eieio-opt.el 2014-01-06 06:25:30 +0000 +++ lisp/emacs-lisp/eieio-opt.el 2014-01-08 21:30:12 +0000 @@ -74,108 +74,81 @@ ;;; CLASS COMPLETION / DOCUMENTATION -;;;###autoload(defalias 'describe-class 'eieio-describe-class) - ;;;###autoload -(defun eieio-describe-class (class &optional headerfcn) - "Describe a CLASS defined by a string or symbol. -If CLASS is actually an object, then also display current values of that object. -Optional HEADERFCN should be called to insert a few bits of info first." - (interactive (list (eieio-read-class "Class: "))) - (with-output-to-temp-buffer (help-buffer) ;"*Help*" - (help-setup-xref (list #'eieio-describe-class class headerfcn) - (called-interactively-p 'interactive)) - - (when headerfcn (funcall headerfcn)) - (prin1 class) - (princ " is a") - (if (class-option class :abstract) - (princ "n abstract")) - (princ " class") - ;; Print file location - (when (get class 'class-location) - (princ " in `") - (princ (file-name-nondirectory (get class 'class-location))) - (princ "'")) - (terpri) - ;; Inheritance tree information - (let ((pl (eieio-class-parents class))) - (when pl - (princ " Inherits from ") - (while pl - (princ "`") (prin1 (car pl)) (princ "'") - (setq pl (cdr pl)) - (if pl (princ ", "))) - (terpri))) - (let ((ch (eieio-class-children class))) - (when ch - (princ " Children ") - (while ch - (princ "`") (prin1 (car ch)) (princ "'") - (setq ch (cdr ch)) - (if ch (princ ", "))) - (terpri))) - (terpri) - ;; System documentation - (let ((doc (documentation-property class 'variable-documentation))) - (when doc - (princ "Documentation:") - (terpri) - (princ doc) - (terpri) - (terpri))) - ;; Describe all the slots in this class - (eieio-describe-class-slots class) - ;; Describe all the methods specific to this class. - (let ((methods (eieio-all-generic-functions class)) - (doc nil)) - (if (not methods) nil - (princ "Specialized Methods:") - (terpri) - (terpri) - (while methods - (setq doc (eieio-method-documentation (car methods) class)) - (princ "`") - (prin1 (car methods)) - (princ "'") - (if (not doc) - (princ " Undocumented") - (if (car doc) - (progn - (princ " :STATIC ") - (prin1 (car (car doc))) - (terpri) - (princ (cdr (car doc))))) - (setq doc (cdr doc)) - (if (car doc) - (progn - (princ " :BEFORE ") - (prin1 (car (car doc))) - (terpri) - (princ (cdr (car doc))))) - (setq doc (cdr doc)) - (if (car doc) - (progn - (princ " :PRIMARY ") - (prin1 (car (car doc))) - (terpri) - (princ (cdr (car doc))))) - (setq doc (cdr doc)) - (if (car doc) - (progn - (princ " :AFTER ") - (prin1 (car (car doc))) - (terpri) - (princ (cdr (car doc))))) - (terpri) - (terpri)) - (setq methods (cdr methods)))))) - (with-current-buffer (help-buffer) - (buffer-string))) - -(defun eieio-describe-class-slots (class) - "Describe the slots in CLASS. -Outputs to the standard output." +(defun eieio-help-class (class) + "Print help description for CLASS. +If CLASS is actually an object, then also display current values of that object." + ;; Header line + (prin1 class) + (insert " is a" + (if (class-option class :abstract) + "n abstract" + "") + " class") + (let ((location (get class 'class-location))) + (when location + (insert " in `") + (help-insert-xref-button + (file-name-nondirectory location) + 'eieio-class-def class location) + (insert "'"))) + (insert ".\n") + ;; Parents + (let ((pl (eieio-class-parents class)) + cur) + (when pl + (insert " Inherits from ") + (while (setq cur (pop pl)) + (insert "`") + (help-insert-xref-button (symbol-name cur) + 'help-function cur) + (insert (if pl "', " "'"))) + (insert ".\n"))) + ;; Children + (let ((ch (eieio-class-children class)) + cur) + (when ch + (insert " Children ") + (while (setq cur (pop ch)) + (insert "`") + (help-insert-xref-button (symbol-name cur) + 'help-function cur) + (insert (if ch "', " "'"))) + (insert ".\n"))) + ;; System documentation + (let ((doc (documentation-property class 'variable-documentation))) + (when doc + (insert "\n" doc "\n\n"))) + ;; Describe all the slots in this class. + (eieio-help-class-slots class) + ;; Describe all the methods specific to this class. + (let ((methods (eieio-all-generic-functions class)) + (type [":STATIC" ":BEFORE" ":PRIMARY" ":AFTER"]) + counter doc argshl dochl) + (when methods + (insert (propertize "Specialized Methods:\n\n" 'face 'bold)) + (while methods + (setq doc (eieio-method-documentation (car methods) class)) + (insert "`") + (help-insert-xref-button (symbol-name (car methods)) + 'help-function (car methods)) + (insert "'") + (if (not doc) + (insert " Undocumented") + (setq counter 0) + (dolist (cur doc) + (when cur + (insert " " (aref type counter) " " + (prin1-to-string (car cur) (current-buffer)) + "\n" + (cdr cur))) + (setq counter (1+ counter)))) + (insert "\n\n") + (setq methods (cdr methods)))))) + +(defun eieio-help-class-slots (class) + "Print help description for the slots in CLASS. +Outputs to the current buffer." (let* ((cv (class-v class)) (docs (eieio--class-public-doc cv)) (names (eieio--class-public-a cv)) @@ -185,28 +158,27 @@ (i 0) (prot (eieio--class-protection cv)) ) - (princ "Instance Allocated Slots:") - (terpri) - (terpri) + (insert (propertize "Instance Allocated Slots:\n\n" + 'face 'bold)) (while names - (if (car prot) (princ "Private ")) - (princ "Slot: ") - (prin1 (car names)) - (when (not (eq (aref types i) t)) - (princ " type = ") - (prin1 (aref types i))) - (unless (eq (car deflt) eieio-unbound) - (princ " default = ") - (prin1 (car deflt))) - (when (car publp) - (princ " printer = ") - (prin1 (car publp))) - (when (car docs) - (terpri) - (princ " ") - (princ (car docs)) - (terpri)) - (terpri) + (insert + (concat + (when (car prot) + (propertize "Private " 'face 'bold)) + (propertize "Slot: " 'face 'bold) + (prin1-to-string (car names)) + (unless (eq (aref types i) t) + (concat " type = " + (prin1-to-string (aref types i)))) + (unless (eq (car deflt) eieio-unbound) + (concat " default = " + (prin1-to-string (car deflt)))) + (when (car publp) + (concat " printer = " + (prin1-to-string (car publp)))) + (when (car docs) + (concat "\n " (car docs) "\n")) + "\n")) (setq names (cdr names) docs (cdr docs) deflt (cdr deflt) @@ -219,61 +191,30 @@ i 0 prot (eieio--class-class-allocation-protection cv)) (when names - (terpri) - (princ "Class Allocated Slots:")) - (terpri) - (terpri) + (insert (propertize "\nClass Allocated Slots:\n\n" 'face 'bold))) (while names - (when (car prot) - (princ "Private ")) - (princ "Slot: ") - (prin1 (car names)) - (unless (eq (aref types i) t) - (princ " type = ") - (prin1 (aref types i))) - (condition-case nil - (let ((value (eieio-oref class (car names)))) - (princ " value = ") - (prin1 value)) + (insert + (concat + (when (car prot) + "Private ") + "Slot: " + (prin1-to-string (car names)) + (unless (eq (aref types i) t) + (concat " type = " + (prin1-to-string (aref types i)))) + (condition-case nil + (let ((value (eieio-oref class (car names)))) + (concat " value = " + (prin1-to-string value))) (error nil)) - (when (car docs) - (terpri) - (princ " ") - (princ (car docs)) - (terpri)) - (terpri) + (when (car docs) + (concat "\n\n " (car docs) "\n")) + "\n")) (setq names (cdr names) docs (cdr docs) prot (cdr prot) i (1+ i))))) -;;;###autoload -(defun eieio-describe-constructor (fcn) - "Describe the constructor function FCN. -Uses `eieio-describe-class' to describe the class being constructed." - (interactive - ;; Use eieio-read-class since all constructors have the same name as - ;; the class they create. - (list (eieio-read-class "Class: "))) - (eieio-describe-class - fcn (lambda () - ;; Describe the constructor part. - (prin1 fcn) - (princ " is an object constructor function") - ;; Print file location - (when (get fcn 'class-location) - (princ " in `") - (princ (file-name-nondirectory (get fcn 'class-location))) - (princ "'")) - (terpri) - (princ "Creates an object of class ") - (prin1 fcn) - (princ ".") - (terpri) - (terpri) - )) - ) - (defun eieio-build-class-list (class) "Return a list of all classes that inherit from CLASS." (if (class-p class) @@ -326,91 +267,112 @@ ;;; METHOD COMPLETION / DOC -(defalias 'describe-method 'eieio-describe-generic) -;;;###autoload(defalias 'describe-generic 'eieio-describe-generic) -(defalias 'eieio-describe-method 'eieio-describe-generic) - -;;;###autoload -(defun eieio-describe-generic (generic) - "Describe the generic function GENERIC. -Also extracts information about all methods specific to this generic." - (interactive (list (eieio-read-generic "Generic Method: "))) - (eieio--check-type generic-p generic) - (with-output-to-temp-buffer (help-buffer) ; "*Help*" - (help-setup-xref (list #'eieio-describe-generic generic) - (called-interactively-p 'interactive)) - - (prin1 generic) - (princ " is a generic function") - (when (generic-primary-only-p generic) - (princ " with only ") - (when (generic-primary-only-one-p generic) - (princ "one ")) - (princ "primary method") - (when (not (generic-primary-only-one-p generic)) - (princ "s")) - ) - (princ ".") - (terpri) - (terpri) - (let ((d (documentation generic))) - (if (not d) - (princ "The generic is not documented.\n") - (princ "Documentation:") - (terpri) - (princ d) - (terpri) - (terpri))) - (princ "Implementations:") - (terpri) - (terpri) - (let ((i 4) - (prefix [ ":STATIC" ":BEFORE" ":PRIMARY" ":AFTER" ] )) - ;; Loop over fanciful generics - (while (< i 7) - (let ((gm (aref (get generic 'eieio-method-tree) i))) - (when gm - (princ "Generic ") - (princ (aref prefix (- i 3))) - (terpri) - (princ (or (nth 2 gm) "Undocumented")) - (terpri) - (terpri))) - (setq i (1+ i))) - (setq i 0) - ;; Loop over defined class-specific methods - (while (< i 4) - (let ((gm (reverse (aref (get generic 'eieio-method-tree) i))) - location) - (while gm - (princ "`") - (prin1 (car (car gm))) - (princ "'") - ;; prefix type - (princ " ") - (princ (aref prefix i)) - (princ " ") - ;; argument list - (let* ((func (cdr (car gm))) - (arglst (eieio-lambda-arglist func))) - (prin1 arglst)) - (terpri) - ;; 3 because of cdr - (princ (or (documentation (cdr (car gm))) - "Undocumented")) - ;; Print file location if available - (when (and (setq location (get generic 'method-locations)) - (setq location (assoc (caar gm) location))) - (setq location (cadr location)) - (princ "\n\nDefined in `") - (princ (file-name-nondirectory location)) - (princ "'\n")) - (setq gm (cdr gm)) - (terpri) - (terpri))) - (setq i (1+ i))))) - (with-current-buffer (help-buffer) - (buffer-string))) +(define-button-type 'eieio-method-def + :supertype 'help-xref + 'help-function (lambda (class method file) + (eieio-help-find-method-definition class method file)) + 'help-echo (purecopy "mouse-2, RET: find method's definition")) + +(define-button-type 'eieio-class-def + :supertype 'help-xref + 'help-function (lambda (class file) + (eieio-help-find-class-definition class file)) + 'help-echo (purecopy "mouse-2, RET: find class definition")) + +;;;###autoload +(defun eieio-help-constructor (ctr) + "Describe CTR if it is a class constructor." + (when (class-p ctr) + (erase-buffer) + (let ((location (get ctr 'class-location)) + (def (symbol-function ctr))) + (goto-char (point-min)) + (prin1 ctr) + (insert (format " is an %s object constructor function" + (if (autoloadp def) + "autoloaded" + ""))) + (when (and (autoloadp def) + (null location)) + (setq location + (find-lisp-object-file-name ctr def))) + (when location + (insert " in `") + (help-insert-xref-button + (file-name-nondirectory location) + 'eieio-class-def ctr location) + (insert "'")) + (insert ".\nCreates an object of class " (symbol-name ctr) ".") + (goto-char (point-max)) + (if (autoloadp def) + (insert "\n\n[Class description not available until class definition is loaded.]\n") + (save-excursion + (insert (propertize "\n\nClass description:\n" 'face 'bold)) + (eieio-help-class ctr)) + )))) + + +;;;###autoload +(defun eieio-help-generic (generic) + "Describe GENERIC if it is a generic function." + (when (generic-p generic) + (save-excursion + (goto-char (point-min)) + (when (re-search-forward " in `.+'.$" nil t) + (replace-match "."))) + (save-excursion + (insert "\n\nThis is a generic function" + (cond + ((and (generic-primary-only-p generic) + (generic-primary-only-one-p generic)) + " with only one primary method") + ((generic-primary-only-p generic) + " with only primary methods") + (t "")) + ".\n\n") + (insert (propertize "Implementations:\n\n" 'face 'bold)) + (let ((i 4) + (prefix [ ":STATIC" ":BEFORE" ":PRIMARY" ":AFTER" ] )) + ;; Loop over fanciful generics + (while (< i 7) + (let ((gm (aref (get generic 'eieio-method-tree) i))) + (when gm + (insert "Generic " + (aref prefix (- i 3)) + "\n" + (or (nth 2 gm) "Undocumented") + "\n\n"))) + (setq i (1+ i))) + (setq i 0) + ;; Loop over defined class-specific methods + (while (< i 4) + (let* ((gm (reverse (aref (get generic 'eieio-method-tree) i))) + cname location) + (while gm + (setq cname (caar gm)) + (insert "`") + (help-insert-xref-button (symbol-name cname) + 'help-variable cname) + (insert "' " (aref prefix i) " ") + ;; argument list + (let* ((func (cdr (car gm))) + (arglst (eieio-lambda-arglist func))) + (prin1 arglst (current-buffer))) + (insert "\n" + (or (documentation (cdr (car gm))) + "Undocumented")) + ;; Print file location if available + (when (and (setq location (get generic 'method-locations)) + (setq location (assoc cname location))) + (setq location (cadr location)) + (insert "\n\nDefined in `") + (help-insert-xref-button + (file-name-nondirectory location) + 'eieio-method-def cname generic location) + (insert "'\n")) + (setq gm (cdr gm)) + (insert "\n"))) + (setq i (1+ i))))))) (defun eieio-lambda-arglist (func) "Return the argument list of FUNC, a function body." @@ -584,21 +546,13 @@ ;;; HELP AUGMENTATION ;; -(define-button-type 'eieio-method-def - :supertype 'help-xref - 'help-function (lambda (class method file) - (eieio-help-find-method-definition class method file)) - 'help-echo (purecopy "mouse-2, RET: find method's definition")) - -(define-button-type 'eieio-class-def - :supertype 'help-xref - 'help-function (lambda (class file) - (eieio-help-find-class-definition class file)) - 'help-echo (purecopy "mouse-2, RET: find class definition")) - (defun eieio-help-find-method-definition (class method file) (let ((filename (find-library-name file)) location buf) + (when (symbolp class) + (setq class (symbol-name class))) + (when (symbolp method) + (setq method (symbol-name method))) (when (null filename) (error "Cannot find library %s" file)) (setq buf (find-file-noselect filename)) @@ -622,6 +576,8 @@ (beginning-of-line)))) (defun eieio-help-find-class-definition (class file) + (when (symbolp class) + (setq class (symbol-name class))) (let ((filename (find-library-name file)) location buf) (when (null filename) @@ -642,71 +598,6 @@ (recenter) (beginning-of-line)))) - -(defun eieio-help-mode-augmentation-maybee (&rest unused) - "For buffers thrown into help mode, augment for EIEIO. -Arguments UNUSED are not used." - ;; Scan created buttons so far if we are in help mode. - (when (eq major-mode 'help-mode) - (save-excursion - (goto-char (point-min)) - (let ((pos t) (inhibit-read-only t)) - (while pos - (if (get-text-property (point) 'help-xref) ; move off reference - (goto-char - (or (next-single-property-change (point) 'help-xref) - (point)))) - (setq pos (next-single-property-change (point) 'help-xref)) - (when pos - (goto-char pos) - (let* ((help-data (get-text-property (point) 'help-xref)) - ;(method (car help-data)) - (args (cdr help-data))) - (when (symbolp (car args)) - (cond ((class-p (car args)) - (setcar help-data 'eieio-describe-class)) - ((generic-p (car args)) - (setcar help-data 'eieio-describe-generic)) - (t nil)) - )))) - ;; start back at the beginning, and highlight some sections - (goto-char (point-min)) - (while (re-search-forward "^\\(Documentation\\|Implementations\\):$" nil t) - (put-text-property (match-beginning 0) (match-end 0) 'face 'bold)) - (goto-char (point-min)) - (if (re-search-forward "^Specialized Methods:$" nil t) - (put-text-property (match-beginning 0) (match-end 0) 'face 'bold)) - (goto-char (point-min)) - (while (re-search-forward "^\\(Instance\\|Class\\) Allocated Slots:$" nil t) - (put-text-property (match-beginning 0) (match-end 0) 'face 'bold)) - (goto-char (point-min)) - (while (re-search-forward ":\\(STATIC\\|BEFORE\\|AFTER\\|PRIMARY\\)" nil t) - (put-text-property (match-beginning 0) (match-end 0) 'face 'bold)) - (goto-char (point-min)) - (while (re-search-forward "^\\(Private \\)?Slot:" nil t) - (put-text-property (match-beginning 0) (match-end 0) 'face 'bold)) - (goto-char (point-min)) - (cond - ((looking-at "\\(.+\\) is a generic function") - (let ((mname (match-string 1)) - cname) - (while (re-search-forward "^`\\(.+\\)'[^\0]+?Defined in `\\(.+\\)'" nil t) - (setq cname (match-string-no-properties 1)) - (help-xref-button 2 'eieio-method-def cname - mname - (cadr (assoc (intern cname) - (get (intern mname) - 'method-locations))))))) - ((looking-at "\\(.+\\) is an object constructor function in `\\(.+\\)'") - (let ((cname (match-string-no-properties 1))) - (help-xref-button 2 'eieio-class-def cname - (get (intern cname) 'class-location)))) - ((looking-at "\\(.+\\) is a\\(n abstract\\)? class in `\\(.+\\)'") - (let ((cname (match-string-no-properties 1))) - (help-xref-button 3 'eieio-class-def cname - (get (intern cname) 'class-location))))) - )))) - ;;; SPEEDBAR SUPPORT ;; @@ -796,7 +687,7 @@ "Describe the class TEXT in TOKEN. INDENT is the current indentation level." (dframe-with-attached-buffer - (eieio-describe-class token)) + (describe-function token)) (dframe-maybee-jump-to-attached-frame)) (provide 'eieio-opt) === modified file 'lisp/emacs-lisp/eieio.el' --- lisp/emacs-lisp/eieio.el 2014-01-01 07:43:34 +0000 +++ lisp/emacs-lisp/eieio.el 2014-01-08 21:30:12 +0000 @@ -865,6 +865,10 @@ of `eq'." (error "EIEIO: `change-class' is unimplemented")) +;; Hook ourselves into help system for describing classes and methods. +(add-hook 'help-fns-describe-function-functions 'eieio-help-generic) +(add-hook 'help-fns-describe-function-functions 'eieio-help-constructor) + ;;; Interfacing with edebug ;; (defun eieio-edebug-prin1-to-string (object &optional noescape) === modified file 'lisp/help-fns.el' --- lisp/help-fns.el 2014-01-01 07:43:34 +0000 +++ lisp/help-fns.el 2014-01-07 20:40:44 +0000 @@ -32,6 +32,12 @@ ;;; Code: +(defvar help-fns-describe-function-functions nil + "List of functions to run in help buffer in `describe-function'. +Those functions will be run after the header line and argument +list was inserted, and before the documentation will be inserted. +The functions will receive the function name as argument.") + ;; Functions ;;;###autoload @@ -649,14 +655,15 @@ (help-fns--key-bindings function) (with-current-buffer standard-output (setq doc (help-fns--signature function doc real-def real-function)) - - (help-fns--compiler-macro function) - (help-fns--parent-mode function) - (help-fns--obsolete function) - + (run-hook-with-args 'help-fns-describe-function-functions function) (insert "\n" (or doc "Not documented."))))))) +;; Add defaults to `help-fns-describe-function-functions'. +(add-hook 'help-fns-describe-function-functions 'help-fns--obsolete) +(add-hook 'help-fns-describe-function-functions 'help-fns--parent-mode) +(add-hook 'help-fns-describe-function-functions 'help-fns--compiler-macro) + ;; Variables ------------------------------------------------------------ revno: 115924 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-08 14:39:25 -0500 message: ChangeLog fix (When reverting a change _immediately_ after making it, just delete the original ChangeLog entry, rather than adding a new one.) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-08 19:16:10 +0000 +++ lisp/ChangeLog 2014-01-08 19:39:25 +0000 @@ -6,11 +6,6 @@ (hz-ascii-designation): Rename from hz-ascii-designnation. All uses changed. -2014-01-08 Bastien Guerry - - * emacs-lisp/package.el (package-installed-p): Fix my previous - commit (revno 115918). - 2014-01-08 Stefan Monnier * emacs-lisp/package.el (package-delete): Only remove pkg-desc from @@ -18,16 +13,14 @@ 2014-01-08 Bastien Guerry - * emacs-lisp/package.el (package-installed-p): First check if the - package name is in package-alist. - (package-delete): Correctly delete the package from package-alist. + * emacs-lisp/package.el (package-delete): + Correctly delete the package from package-alist. 2014-01-08 Daiki Ueno * emacs-lisp/package.el (url-recreate-url): Declare. (url-http-target-url): Declare. - (package-handle-response): Include requested URL in the error - message. + (package-handle-response): Include requested URL in the error message. (package--check-signature): Don't re-signal errors from package--with-work-buffer. Suggested by Stefan Monnier. ------------------------------------------------------------ revno: 115923 committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-01-08 11:16:10 -0800 message: Spelling fixes. * lisp/language/china-util.el (hz-ascii-designation): Rename from hz-ascii-designnation. (hz-ascii-designation): Rename from hz-ascii-designnation. All uses changed. * lisp/cedet/semantic/decorate/include.el (semantic-decoration-mouse-3): Rename from semantic-decoratiton-mouse-3. All uses changed. * lisp/org/org-irc.el (org-irc-ellipsify-description): Rename from org-irc-elipsify-description. All uses changed. diff: === modified file 'doc/emacs/programs.texi' --- doc/emacs/programs.texi 2014-01-01 07:43:34 +0000 +++ doc/emacs/programs.texi 2014-01-08 19:16:10 +0000 @@ -1220,7 +1220,7 @@ @cindex Eldoc mode @findex eldoc-mode Eldoc is a buffer-local minor mode that helps with looking up Lisp -documention. When it is enabled, the echo area displays some useful +documentation. When it is enabled, the echo area displays some useful information whenever there is a Lisp function or variable at point; for a function, it shows the argument list, and for a variable it shows the first line of the variable's documentation string. To === modified file 'doc/lispintro/emacs-lisp-intro.texi' --- doc/lispintro/emacs-lisp-intro.texi 2014-01-06 05:25:46 +0000 +++ doc/lispintro/emacs-lisp-intro.texi 2014-01-08 19:16:10 +0000 @@ -11912,7 +11912,6 @@ @node No deferment solution @subsection No Deferment Solution @cindex No deferment solution -@cindex Defermentless solution @cindex Solution without deferment The solution to the problem of deferred operations is to write in a === modified file 'doc/lispref/help.texi' --- doc/lispref/help.texi 2014-01-03 05:49:06 +0000 +++ doc/lispref/help.texi 2014-01-08 19:16:10 +0000 @@ -59,7 +59,7 @@ (@pxref{Accessing Documentation}). @cindex @code{variable-documentation} property - In a variable definition (a @code{defvar} form), the documention + In a variable definition (a @code{defvar} form), the documentation string is specified after the initial value. @xref{Defining Variables}. The string is stored in the variable's @code{variable-documentation} property. === modified file 'doc/misc/semantic.texi' --- doc/misc/semantic.texi 2014-01-06 06:25:30 +0000 +++ doc/misc/semantic.texi 2014-01-08 19:16:10 +0000 @@ -355,7 +355,7 @@ The database and tables both also provide applicable cache information, and cache flushing system. The semanticdb search routines use caches -to save datastructures that are complex to calculate. +to save data structures that are complex to calculate. Lastly, it provides the concept of @dfn{project root}. It is a system by which a file can be associated with the root of a project, so if === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-08 17:39:31 +0000 +++ lisp/ChangeLog 2014-01-08 19:16:10 +0000 @@ -1,3 +1,11 @@ +2014-01-08 Paul Eggert + + Spelling fixes. + * language/china-util.el (hz-ascii-designation): + Rename from hz-ascii-designnation. + (hz-ascii-designation): Rename from hz-ascii-designnation. + All uses changed. + 2014-01-08 Bastien Guerry * emacs-lisp/package.el (package-installed-p): Fix my previous === modified file 'lisp/ChangeLog.8' --- lisp/ChangeLog.8 2014-01-01 07:43:34 +0000 +++ lisp/ChangeLog.8 2014-01-08 19:16:10 +0000 @@ -295,7 +295,7 @@ (font-lock-removed-keywords-alist): New variable. (font-lock-add-keywords): Updates `font-lock-removed-keywords-alist'. Empty `font-lock-keywords-alist' when `append' is `set' to avoid - growing datastructures. + growing data structures. (font-lock-set-defaults): Removes keywords stored in `font-lock-removed-keywords-alist' after local keywords added. === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2014-01-01 07:43:34 +0000 +++ lisp/cedet/ChangeLog 2014-01-08 19:16:10 +0000 @@ -1,3 +1,9 @@ +2014-01-08 Paul Eggert + + Spelling fixes. + * semantic/decorate/include.el (semantic-decoration-mouse-3): + Rename from semantic-decoratiton-mouse-3. All uses changed. + 2013-12-28 Glenn Morris * ede/linux.el (project-linux-build-directory-default) === modified file 'lisp/cedet/data-debug.el' --- lisp/cedet/data-debug.el 2014-01-01 07:43:34 +0000 +++ lisp/cedet/data-debug.el 2014-01-08 19:16:10 +0000 @@ -1,4 +1,4 @@ -;;; data-debug.el --- Datastructure Debugger +;;; data-debug.el --- Data structure debugger ;; Copyright (C) 2007-2014 Free Software Foundation, Inc. === modified file 'lisp/cedet/semantic/decorate/include.el' --- lisp/cedet/semantic/decorate/include.el 2014-01-01 07:43:34 +0000 +++ lisp/cedet/semantic/decorate/include.el 2014-01-08 19:16:10 +0000 @@ -42,8 +42,8 @@ ;;; Code: ;;; FACES AND KEYMAPS -(defvar semantic-decoratiton-mouse-3 (if (featurep 'xemacs) [ button3 ] [ mouse-3 ]) - "The keybinding lisp object to use for binding the right mouse button.") +(defvar semantic-decoration-mouse-3 (if (featurep 'xemacs) [ button3 ] [ mouse-3 ]) + "The keybinding Lisp object to use for binding the right mouse button.") ;;; Includes that are in a happy state! ;; @@ -55,7 +55,7 @@ (defvar semantic-decoration-on-include-map (let ((km (make-sparse-keymap))) - (define-key km semantic-decoratiton-mouse-3 'semantic-decoration-include-menu) + (define-key km semantic-decoration-mouse-3 'semantic-decoration-include-menu) km) "Keymap used on includes.") @@ -126,7 +126,7 @@ (defvar semantic-decoration-on-unknown-include-map (let ((km (make-sparse-keymap))) ;(define-key km [ mouse-2 ] 'semantic-decoration-unknown-include-describe) - (define-key km semantic-decoratiton-mouse-3 'semantic-decoration-unknown-include-menu) + (define-key km semantic-decoration-mouse-3 'semantic-decoration-unknown-include-menu) km) "Keymap used on unparsed includes.") @@ -189,7 +189,7 @@ (defvar semantic-decoration-on-fileless-include-map (let ((km (make-sparse-keymap))) ;(define-key km [ mouse-2 ] 'semantic-decoration-fileless-include-describe) - (define-key km semantic-decoratiton-mouse-3 'semantic-decoration-fileless-include-menu) + (define-key km semantic-decoration-mouse-3 'semantic-decoration-fileless-include-menu) km) "Keymap used on unparsed includes.") @@ -251,7 +251,7 @@ (defvar semantic-decoration-on-unparsed-include-map (let ((km (make-sparse-keymap))) - (define-key km semantic-decoratiton-mouse-3 'semantic-decoration-unparsed-include-menu) + (define-key km semantic-decoration-mouse-3 'semantic-decoration-unparsed-include-menu) km) "Keymap used on unparsed includes.") === modified file 'lisp/emulation/viper-cmd.el' --- lisp/emulation/viper-cmd.el 2014-01-01 07:43:34 +0000 +++ lisp/emulation/viper-cmd.el 2014-01-08 19:16:10 +0000 @@ -1896,7 +1896,7 @@ ;; Quote region by each line with a user supplied string. (defun viper-quote-region () (let ((quote-str viper-quote-string) - (donot-change-default t)) + (do-not-change-default t)) (setq quote-str (viper-read-string-with-history "Quote string: " @@ -1908,9 +1908,9 @@ ((string-match "lisp.*-mode" (symbol-name major-mode)) ";;") ((memq major-mode '(c-mode cc-mode c++-mode)) "//") ((memq major-mode '(sh-mode shell-mode)) "#") - (t (setq donot-change-default nil) + (t (setq do-not-change-default nil) quote-str)))) - (or donot-change-default + (or do-not-change-default (setq viper-quote-string quote-str)) (viper-enlarge-region (point) (mark t)) (if (> (point) (mark t)) (exchange-point-and-mark)) === modified file 'lisp/gnus/gmm-utils.el' --- lisp/gnus/gmm-utils.el 2014-01-01 07:43:34 +0000 +++ lisp/gnus/gmm-utils.el 2014-01-08 19:16:10 +0000 @@ -99,7 +99,7 @@ ;; Copy of the `nnmail-lazy' code from `nnmail.el': (define-widget 'gmm-lazy 'default - "Base widget for recursive datastructures. + "Base widget for recursive data structures. This is a copy of the `lazy' widget in Emacs 22.1 provided for compatibility." :format "%{%t%}: %v" === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2014-01-01 07:43:34 +0000 +++ lisp/gnus/gnus-util.el 2014-01-08 19:16:10 +0000 @@ -937,7 +937,7 @@ 'previous-extent-change 'previous-char-property-change)) ;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 -;; The primary idea here is to try to protect internal datastructures +;; The primary idea here is to try to protect internal data structures ;; from becoming corrupted when the user hits C-g, or if a hook or ;; similar blows up. Often in Gnus multiple tables/lists need to be ;; updated at the same time, or information can be lost. === modified file 'lisp/gnus/nnmail.el' --- lisp/gnus/nnmail.el 2014-01-01 07:43:34 +0000 +++ lisp/gnus/nnmail.el 2014-01-08 19:16:10 +0000 @@ -374,7 +374,7 @@ (number :tag "count"))) (define-widget 'nnmail-lazy 'default - "Base widget for recursive datastructures. + "Base widget for recursive data structures. This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility." :format "%{%t%}: %v" === modified file 'lisp/language/china-util.el' --- lisp/language/china-util.el 2014-01-01 07:43:34 +0000 +++ lisp/language/china-util.el 2014-01-08 19:16:10 +0000 @@ -52,16 +52,16 @@ ;; ISO-2022 escape sequence to designate GB2312. (defvar iso2022-gb-designation "\e$A") ;; HZ escape sequence to designate GB2312. -(defvar hz-gb-designnation "~{") +(defvar hz-gb-designation "~{") ;; ISO-2022 escape sequence to designate ASCII. (defvar iso2022-ascii-designation "\e(B") ;; HZ escape sequence to designate ASCII. -(defvar hz-ascii-designnation "~}") +(defvar hz-ascii-designation "~}") ;; Regexp of ZW sequence to start GB2312. (defvar zw-start-gb "^zW") ;; Regexp for start of GB2312 in an encoding mixture of HZ and ZW. (defvar hz/zw-start-gb - (concat hz-gb-designnation "\\|" zw-start-gb "\\|[^\0-\177]")) + (concat hz-gb-designation "\\|" zw-start-gb "\\|[^\0-\177]")) (defvar decode-hz-line-continuation nil "Flag to tell if we should care line continuation convention of Hz.") @@ -117,7 +117,7 @@ (progn (translate-region (point) end hz-set-msb-table) (goto-char end)) - (if (search-forward hz-ascii-designnation + (if (search-forward hz-ascii-designation (if decode-hz-line-continuation nil end) t) (delete-char -2)) @@ -155,11 +155,11 @@ (goto-char pos) (while (search-forward iso2022-gb-designation nil t) (delete-char -3) - (insert hz-gb-designnation)) + (insert hz-gb-designation)) (goto-char pos) (while (search-forward iso2022-ascii-designation nil t) (delete-char -3) - (insert hz-ascii-designnation)))) + (insert hz-ascii-designation)))) (- (point-max) (point-min))))) ;;;###autoload === modified file 'lisp/org/ChangeLog' --- lisp/org/ChangeLog 2014-01-07 13:22:53 +0000 +++ lisp/org/ChangeLog 2014-01-08 19:16:10 +0000 @@ -1,3 +1,9 @@ +2014-01-08 Paul Eggert + + Spelling fixes. + * org-irc.el (org-irc-ellipsify-description): Rename from + org-irc-elipsify-description. All uses changed. + 2013-01-07 Bastien Guerry * org-clock.el (org-clock-cancel-hook) === modified file 'lisp/org/org-agenda.el' --- lisp/org/org-agenda.el 2014-01-07 13:22:53 +0000 +++ lisp/org/org-agenda.el 2014-01-08 19:16:10 +0000 @@ -764,7 +764,7 @@ (integer :tag "Ignore if N or more days in past(-) or future(+)."))) (defcustom org-agenda-todo-ignore-deadlines nil - "Non-nil means ignore some deadlined TODO items when making TODO list. + "Non-nil means ignore some deadline TODO items when making TODO list. There are different motivations for using different values, please think carefully when configuring this variable. === modified file 'lisp/org/org-irc.el' --- lisp/org/org-irc.el 2014-01-01 07:43:34 +0000 +++ lisp/org/org-irc.el 2014-01-08 19:16:10 +0000 @@ -105,7 +105,7 @@ ((eq major-mode 'erc-mode) (org-irc-erc-store-link)))) -(defun org-irc-elipsify-description (string &optional after) +(defun org-irc-ellipsify-description (string &optional after) "Remove unnecessary white space from STRING and add ellipses if necessary. Strip starting and ending white space from STRING and replace any chars that the value AFTER with '...'" @@ -158,7 +158,7 @@ (progn (org-store-link-props :type "file" - :description (concat "'" (org-irc-elipsify-description + :description (concat "'" (org-irc-ellipsify-description (cadr parsed-line) 20) "' from an IRC conversation") :link (concat "file:" (car parsed-line) "::" === modified file 'lisp/textmodes/paragraphs.el' --- lisp/textmodes/paragraphs.el 2014-01-01 07:43:34 +0000 +++ lisp/textmodes/paragraphs.el 2014-01-08 19:16:10 +0000 @@ -468,7 +468,7 @@ (setq par-text-beg (point)) ;; Start of the first line of the paragraph. ;; We use this as the search limit - ;; to allow s1entence-end to match if it is anchored at + ;; to allow sentence-end to match if it is anchored at ;; BOL and the paragraph starts indented. (beginning-of-line) (setq par-beg (point))) === modified file 'lisp/wid-edit.el' --- lisp/wid-edit.el 2014-01-01 07:43:34 +0000 +++ lisp/wid-edit.el 2014-01-08 19:16:10 +0000 @@ -3462,14 +3462,14 @@ ;; Recursive datatypes. (define-widget 'lazy 'default - "Base widget for recursive datastructures. + "Base widget for recursive data structures. The `lazy' widget will, when instantiated, contain a single inferior widget, of the widget type specified by the :type parameter. The value of the `lazy' widget is the same as the value of the inferior widget. When deriving a new widget from the 'lazy' widget, the :type parameter is allowed to refer to the widget currently being defined, -thus allowing recursive datastructures to be described. +thus allowing recursive data structures to be described. The :type parameter takes the same arguments as the defcustom parameter with the same name. @@ -3479,7 +3479,7 @@ of the inferior widgets may be of the same type you are currently defining. -In Lisp, however, it is custom to define datastructures in terms of +In Lisp, however, it is custom to define data structures in terms of themselves. A list, for example, is defined as either nil, or a cons cell whose cdr itself is a list. The obvious way to translate this into a widget type would be @@ -3502,7 +3502,7 @@ :type '(choice (const nil) (cons :value (nil) sexp sexp-list)))" :format "%{%t%}: %v" ;; We don't convert :type because we want to allow recursive - ;; datastructures. This is slow, so we should not create speed + ;; data structures. This is slow, so we should not create speed ;; critical widgets by deriving from this. :convert-widget 'widget-value-convert-widget :value-create 'widget-type-value-create ------------------------------------------------------------ revno: 115922 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-08 13:31:35 -0500 message: ChangeLog fix diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2014-01-08 18:29:16 +0000 +++ lisp/url/ChangeLog 2014-01-08 18:31:35 +0000 @@ -1,4 +1,4 @@ -2014-01-08 Jarosław Rzeszótko +2014-01-08 Jarosław Rzeszótko (tiny change) * url-http.el (url-http-create-request): Don't add extra \r\n after http data (bug#16220). ------------------------------------------------------------ revno: 115921 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16220 author: Jarosław Rzeszótko committer: Stefan Monnier branch nick: trunk timestamp: Wed 2014-01-08 13:29:16 -0500 message: * lisp/url/url-http.el (url-http-create-request): Don't add extra \r\n after http data. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2014-01-01 07:43:34 +0000 +++ lisp/url/ChangeLog 2014-01-08 18:29:16 +0000 @@ -1,3 +1,8 @@ +2014-01-08 Jarosław Rzeszótko + + * url-http.el (url-http-create-request): Don't add extra \r\n after + http data (bug#16220). + 2013-12-28 Glenn Morris * url-history.el (url-history-track): === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2014-01-01 07:43:34 +0000 +++ lisp/url/url-http.el 2014-01-08 18:29:16 +0000 @@ -356,9 +356,7 @@ ;; End request "\r\n" ;; Any data - url-http-data - ;; If `url-http-data' is nil, avoid two CRLFs (Bug#8931). - (if url-http-data "\r\n"))) + url-http-data)) "")) (url-http-debug "Request is: \n%s" request) request)) ------------------------------------------------------------ revno: 115920 committer: Bastien Guerry branch nick: trunk timestamp: Wed 2014-01-08 18:39:31 +0100 message: Fix revno 115918 * emacs-lisp/package.el (package-installed-p): Fix my previous commit (revno 115918). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-08 14:19:27 +0000 +++ lisp/ChangeLog 2014-01-08 17:39:31 +0000 @@ -1,3 +1,8 @@ +2014-01-08 Bastien Guerry + + * emacs-lisp/package.el (package-installed-p): Fix my previous + commit (revno 115918). + 2014-01-08 Stefan Monnier * emacs-lisp/package.el (package-delete): Only remove pkg-desc from === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2014-01-08 14:19:27 +0000 +++ lisp/emacs-lisp/package.el 2014-01-08 17:39:31 +0000 @@ -879,14 +879,13 @@ "Return true if PACKAGE, of MIN-VERSION or newer, is installed. MIN-VERSION should be a version list." (unless package--initialized (error "package.el is not yet initialized!")) - (when (assq package package-alist) - (or - (let ((pkg-descs (cdr (assq package package-alist)))) - (and pkg-descs - (version-list-<= min-version - (package-desc-version (car pkg-descs))))) - ;; Also check built-in packages. - (package-built-in-p package min-version)))) + (or + (let ((pkg-descs (cdr (assq package package-alist)))) + (and pkg-descs + (version-list-<= min-version + (package-desc-version (car pkg-descs))))) + ;; Also check built-in packages. + (package-built-in-p package min-version))) (defun package-compute-transaction (packages requirements) "Return a list of packages to be installed, including PACKAGES. ------------------------------------------------------------ revno: 115919 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2014-01-08 09:19:27 -0500 message: * lisp/emacs-lisp/package.el (package-delete): Only remove pkg-desc from package-alist. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-08 11:19:30 +0000 +++ lisp/ChangeLog 2014-01-08 14:19:27 +0000 @@ -1,3 +1,8 @@ +2014-01-08 Stefan Monnier + + * emacs-lisp/package.el (package-delete): Only remove pkg-desc from + package-alist. + 2014-01-08 Bastien Guerry * emacs-lisp/package.el (package-installed-p): First check if the === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2014-01-08 11:19:30 +0000 +++ lisp/emacs-lisp/package.el 2014-01-08 14:19:27 +0000 @@ -818,28 +818,26 @@ (defun package--check-signature (location file) "Check signature of the current buffer. GnuPG keyring is located under \"gnupg\" in `package-user-dir'." - (let ((context (epg-make-context 'OpenPGP)) - (homedir (expand-file-name "gnupg" package-user-dir)) - (sig-file (concat file ".sig")) - sig-content - good-signatures) - (setq sig-content (package--with-work-buffer location sig-file - (buffer-string))) + (let* ((context (epg-make-context 'OpenPGP)) + (homedir (expand-file-name "gnupg" package-user-dir)) + (sig-file (concat file ".sig")) + (sig-content (package--with-work-buffer location sig-file + (buffer-string)))) (epg-context-set-home-directory context homedir) (epg-verify-string context sig-content (buffer-string)) ;; The .sig file may contain multiple signatures. Success if one ;; of the signatures is good. - (setq good-signatures - (delq nil (mapcar (lambda (sig) - (if (eq (epg-signature-status sig) 'good) - sig)) - (epg-context-result-for context 'verify)))) - (if (null good-signatures) - (error "Failed to verify signature %s: %S" - sig-file - (mapcar #'epg-signature-to-string - (epg-context-result-for context 'verify))) - good-signatures))) + (let ((good-signatures + (delq nil (mapcar (lambda (sig) + (if (eq (epg-signature-status sig) 'good) + sig)) + (epg-context-result-for context 'verify))))) + (if (null good-signatures) + (error "Failed to verify signature %s: %S" + sig-file + (mapcar #'epg-signature-to-string + (epg-context-result-for context 'verify))) + good-signatures)))) (defun package-install-from-archive (pkg-desc) "Download and install a tar package." @@ -1232,8 +1230,11 @@ (if (file-exists-p signed-file) (delete-file signed-file))) ;; Update package-alist. - (let* ((name (package-desc-name pkg-desc))) - (setq package-alist (delete (assq name package-alist) package-alist))) + (let* ((name (package-desc-name pkg-desc)) + (pkgs (assq name package-alist))) + (delete pkg-desc pkgs) + (unless (cdr pkgs) + (setq package-alist (delq pkgs package-alist)))) (message "Package `%s' deleted." (package-desc-full-name pkg-desc))))) (defun package-archive-base (desc) ------------------------------------------------------------ revno: 115918 committer: Bastien Guerry branch nick: trunk timestamp: Wed 2014-01-08 12:19:30 +0100 message: package.el: various fixes. * emacs-lisp/package.el (package-installed-p): First check if the package name is in package-alist. (package-delete): Correctly delete the package from package-alist. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-08 06:25:21 +0000 +++ lisp/ChangeLog 2014-01-08 11:19:30 +0000 @@ -1,3 +1,9 @@ +2014-01-08 Bastien Guerry + + * emacs-lisp/package.el (package-installed-p): First check if the + package name is in package-alist. + (package-delete): Correctly delete the package from package-alist. + 2014-01-08 Daiki Ueno * emacs-lisp/package.el (url-recreate-url): Declare. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2014-01-08 06:25:21 +0000 +++ lisp/emacs-lisp/package.el 2014-01-08 11:19:30 +0000 @@ -881,13 +881,14 @@ "Return true if PACKAGE, of MIN-VERSION or newer, is installed. MIN-VERSION should be a version list." (unless package--initialized (error "package.el is not yet initialized!")) + (when (assq package package-alist) (or (let ((pkg-descs (cdr (assq package package-alist)))) (and pkg-descs (version-list-<= min-version (package-desc-version (car pkg-descs))))) ;; Also check built-in packages. - (package-built-in-p package min-version))) + (package-built-in-p package min-version)))) (defun package-compute-transaction (packages requirements) "Return a list of packages to be installed, including PACKAGES. @@ -1232,7 +1233,7 @@ (delete-file signed-file))) ;; Update package-alist. (let* ((name (package-desc-name pkg-desc))) - (delete (delete pkg-desc (assq name package-alist)) package-alist)) + (setq package-alist (delete (assq name package-alist) package-alist))) (message "Package `%s' deleted." (package-desc-full-name pkg-desc))))) (defun package-archive-base (desc) ------------------------------------------------------------ revno: 115917 committer: Daiki Ueno branch nick: trunk timestamp: Wed 2014-01-08 15:25:21 +0900 message: emacs-lisp/package.el (package--check-signature): Fix download error handling * emacs-lisp/package.el (url-recreate-url): Declare. (url-http-target-url): Declare. (package-handle-response): Include requested URL in the error message. (package--check-signature): Don't re-signal errors from package--with-work-buffer. Suggested by Stefan Monnier. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-07 23:36:29 +0000 +++ lisp/ChangeLog 2014-01-08 06:25:21 +0000 @@ -1,3 +1,12 @@ +2014-01-08 Daiki Ueno + + * emacs-lisp/package.el (url-recreate-url): Declare. + (url-http-target-url): Declare. + (package-handle-response): Include requested URL in the error + message. + (package--check-signature): Don't re-signal errors from + package--with-work-buffer. Suggested by Stefan Monnier. + 2014-01-07 Bastien Guerry * minibuffer.el (completion--try-word-completion): When both a === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2014-01-07 10:58:03 +0000 +++ lisp/emacs-lisp/package.el 2014-01-08 06:25:21 +0000 @@ -210,6 +210,8 @@ (declare-function lm-header "lisp-mnt" (header)) (declare-function lm-commentary "lisp-mnt" (&optional file)) (defvar url-http-end-of-headers) +(declare-function url-recreate-url "url" (urlobj)) +(defvar url-http-target-url) (defcustom package-archives '(("gnu" . "http://elpa.gnu.org/packages/")) "An alist of archives from which to fetch. @@ -789,7 +791,8 @@ (require 'url-http) (let ((response (url-http-parse-response))) (when (or (< response 200) (>= response 300)) - (error "Error during download request:%s" + (error "Error downloading %s:%s" + (url-recreate-url url-http-target-url) (buffer-substring-no-properties (point) (line-end-position)))))) (defun package--archive-file-exists-p (location file) @@ -820,10 +823,8 @@ (sig-file (concat file ".sig")) sig-content good-signatures) - (condition-case-unless-debug error - (setq sig-content (package--with-work-buffer location sig-file - (buffer-string))) - (error "Failed to download %s: %S" sig-file (cdr error))) + (setq sig-content (package--with-work-buffer location sig-file + (buffer-string))) (epg-context-set-home-directory context homedir) (epg-verify-string context sig-content (buffer-string)) ;; The .sig file may contain multiple signatures. Success if one ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.