commit def0df01fb2cfa14ed87a9d719e0ccc45b363fec (HEAD, refs/remotes/origin/master) Author: Stefan Monnier Date: Mon Apr 27 00:52:46 2015 -0400 * lisp/info.el (Info-menu): Properly provide the `default' Fixes: debbugs:20391 diff --git a/lisp/info.el b/lisp/info.el index 057bd77..05574ae 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -632,7 +632,7 @@ Do the right thing if the file has been compressed or zipped." default-directory))) (or (consp decoder) (setq decoder (list decoder))) - (apply 'call-process-region (point-min) (point-max) + (apply #'call-process-region (point-min) (point-max) (car decoder) t t nil (cdr decoder)))) (let ((inhibit-null-byte-detection t)) ; Index nodes include null bytes (insert-file-contents fullname visit))) @@ -1422,10 +1422,10 @@ is non-nil)." (insert "\^_\nFile: dir\tNode: " nodename "\n\n* Menu:\n\n")) ;; Merge the text from the other buffer's menu ;; into the menu in the like-named node in the main buffer. - (apply 'insert-buffer-substring (cdr node)))) + (apply #'insert-buffer-substring (cdr node)))) (Info-dir-remove-duplicates) ;; Kill all the buffers we just made, including the special one excised. - (mapc 'kill-buffer (cons buffer buffers)) + (mapc #'kill-buffer (cons buffer buffers)) (goto-char (point-min)) (if problems (message "Composing main Info directory...problems encountered, see `*Messages*'") @@ -1810,10 +1810,10 @@ See `completing-read' for a description of arguments and usage." ((string-match "\\`([^)]*\\'" string) (completion-table-with-context "(" - (apply-partially 'completion-table-with-terminator ")" - (apply-partially 'Info-read-node-name-2 + (apply-partially #'completion-table-with-terminator ")" + (apply-partially #'Info-read-node-name-2 Info-directory-list - (mapcar 'car Info-suffix-list))) + (mapcar #'car Info-suffix-list))) (substring string 1) predicate code)) @@ -1827,12 +1827,11 @@ See `completing-read' for a description of arguments and usage." t (completion-table-with-context file0 - (apply-partially - (lambda (string pred action) - (complete-with-action - action - (Info-build-node-completions (Info-find-file file1)) - string pred))) + (lambda (string pred action) + (complete-with-action + action + (Info-build-node-completions (Info-find-file file1)) + string pred)) nodename predicate code)))) ;; Otherwise use Info-read-node-completion-table. (t (complete-with-action @@ -2750,7 +2749,8 @@ new buffer." (end-of-line) (if (re-search-backward (concat "\n\\* +\\(" Info-menu-entry-name-re - "\\):") beg t) + "\\):") + beg t) (setq default (match-string-no-properties 1)))))) (let ((item nil)) (while (null item) @@ -2760,7 +2760,8 @@ new buffer." (format "Menu item (default %s): " default) "Menu item: ") - 'Info-complete-menu-item nil t))) + #'Info-complete-menu-item nil t nil nil + default))) ;; we rely on the fact that completing-read accepts an input ;; of "" even when the require-match argument is true and "" ;; is not a valid possibility @@ -3496,7 +3497,7 @@ MATCHES is a list of index matches found by `Info-apropos-matches'.") (defun Info-apropos-toc-nodes (filename) "Apropos-specific implementation of `Info-toc-nodes'." - (let ((nodes (mapcar 'car (reverse Info-apropos-nodes)))) + (let ((nodes (mapcar #'car (reverse Info-apropos-nodes)))) `(,filename ("Top" nil nil ,nodes) ,@(mapcar (lambda (node) `(,node "Top" nil nil)) nodes)))) @@ -3709,13 +3710,13 @@ Build a menu of the possible matches." "The following packages match the keyword `" nodename "':\n\n") (insert "* Menu:\n\n") (let ((keywords - (mapcar 'intern (if (string-match-p "," nodename) + (mapcar #'intern (if (string-match-p "," nodename) (split-string nodename ",[ \t\n]*" t) (list nodename)))) hits desc) (dolist (keyword keywords) (push (copy-tree (gethash keyword finder-keywords-hash)) hits)) - (setq hits (delete-dups (apply 'append hits)) + (setq hits (delete-dups (apply #'append hits)) ;; Not a meaningful package. hits (delete 'emacs hits) hits (sort hits (lambda (a b) (string< (symbol-name a) @@ -3766,8 +3767,8 @@ with a list of packages that contain all specified keywords." (list (completing-read-multiple "Keywords (separated by comma): " - (mapcar 'symbol-name (mapcar 'car (append finder-known-keywords - (finder-unknown-keywords)))) + (mapcar #'symbol-name (mapcar #'car (append finder-known-keywords + (finder-unknown-keywords)))) nil t)))) (require 'finder) (if keywords @@ -5322,9 +5323,9 @@ completion alternatives to currently visited manuals." (when (not visited-only) (all-completions "" - (apply-partially 'Info-read-node-name-2 + (apply-partially #'Info-read-node-name-2 Info-directory-list - (mapcar 'car Info-suffix-list)))))))) + (mapcar #'car Info-suffix-list)))))))) (provide 'info) commit d32d0fae2a7e37a065f1dd2372763c4dc0e409f4 Author: Stefan Monnier Date: Mon Apr 27 00:01:36 2015 -0400 * elisp-mode.el: Catch errors from `documentation' Fixes: debbugs:20418 * lisp/progmodes/elisp-mode.el (elisp--get-fnsym-args-string): Catch errors from documentation. (emacs-lisp-mode-abbrev-table): Remove redundant defvar. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index ad35c48..f289068 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -30,7 +30,6 @@ (require 'lisp-mode) -(defvar emacs-lisp-mode-abbrev-table nil) (define-abbrev-table 'emacs-lisp-mode-abbrev-table () "Abbrev table for Emacs Lisp mode. It has `lisp-mode-abbrev-table' as its parent." @@ -1164,7 +1163,10 @@ or elsewhere, return a 1-line docstring." (args (cond ((listp advertised) advertised) - ((setq doc (help-split-fundoc (documentation sym t) sym)) + ((setq doc (help-split-fundoc + (condition-case nil (documentation sym t) + (invalid-function nil)) + sym)) (car doc)) (t (help-function-arglist sym))))) ;; Stringify, and store before highlighting, downcasing, etc. commit 0b7238829393baf71be87b9a420200ce0c41e76b Author: Stefan Monnier Date: Sun Apr 26 17:03:21 2015 -0400 lisp/emacs-lisp/package.el: Move variables to silence byte-compiler Remove redundant ":group 'package". diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index f770acd..0392f61 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -185,7 +185,6 @@ and before `after-init-hook'. Activation is not done if Even if the value is nil, you can type \\[package-initialize] to activate the package system at any time." :type 'boolean - :group 'package :version "24.1") (defcustom package-load-list '(all) @@ -203,7 +202,6 @@ If VERSION is a string, only that version is ever loaded. If VERSION is nil, the package is not loaded (it is \"disabled\")." :type '(repeat symbol) :risky t - :group 'package :version "24.1") (defcustom package-archives '(("gnu" . "http://elpa.gnu.org/packages/")) @@ -222,7 +220,6 @@ a package can run arbitrary code." :type '(alist :key-type (string :tag "Archive name") :value-type (string :tag "URL or directory name")) :risky t - :group 'package :version "24.1") (defcustom package-menu-hide-low-priority 'archive @@ -246,7 +243,6 @@ nil, so it can be toggled with \\ \\[package-menu-hide-ob (const :tag "Hide per package-archive-priorities" archive) (const :tag "Hide per archive and version number" t)) - :group 'package :version "25.1") (defcustom package-archive-priorities nil @@ -265,7 +261,6 @@ See also `package-menu-hide-low-priority'." :type '(alist :key-type (string :tag "Archive name") :value-type (integer :tag "Priority (default is 0)")) :risky t - :group 'package :version "25.1") (defcustom package-pinned-packages nil @@ -289,7 +284,6 @@ the package will be unavailable." ;; via an entry (PACKAGE . NON-EXISTING). Which could be an issue ;; if PACKAGE has a known vulnerability that is fixed in newer versions. :risky t - :group 'package :version "24.4") (defcustom package-user-dir (locate-user-emacs-file "elpa") @@ -299,7 +293,6 @@ Apart from this directory, Emacs also looks for system-wide packages in `package-directory-list'." :type 'directory :risky t - :group 'package :version "24.1") (defcustom package-directory-list @@ -317,7 +310,6 @@ These directories contain packages intended for system-wide; in contrast, `package-user-dir' contains packages for personal use." :type '(repeat directory) :risky t - :group 'package :version "24.1") (defvar epg-gpg-program) @@ -335,14 +327,12 @@ contents of the archive." (const allow-unsigned :tag "Allow unsigned") (const t :tag "Check always")) :risky t - :group 'package :version "24.4") (defcustom package-unsigned-archives nil "List of archives where we do not check for package signatures." :type '(repeat (string :tag "Archive name")) :risky t - :group 'package :version "24.4") (defcustom package-selected-packages nil @@ -356,9 +346,15 @@ by running `package-user-selected-packages-install'. To check if a package is contained in this list here, use `package--user-selected-p', as it may populate the variable with a sane initial value." - :group 'package :type '(repeat symbol)) +(defcustom package-menu-async t + "If non-nil, package-menu will use async operations when possible. +This includes refreshing archive contents as well as installing +packages." + :type 'boolean + :version "25.1") + ;;; `package-desc' object definition ;; This is the struct used internally to represent packages. @@ -892,6 +888,8 @@ untar into a directory named DIR; otherwise, signal an error." (defvar generated-autoload-file) (defvar version-control) +(defvar package--silence nil) + (defun package-generate-autoloads (name pkg-dir) (let* ((auto-name (format "%s-autoloads.el" name)) ;;(ignore-name (concat name "-pkg.el")) @@ -1378,8 +1376,6 @@ it to the file." (declare-function epg-configuration "epg-config" ()) (declare-function epg-import-keys-from-file "epg" (context keys)) -(defvar package--silence nil) - (defun package--message (format &rest args) "Like `message', except sometimes don't print to minibuffer. If the variable `package--silence' is non-nil, the message is not @@ -2672,6 +2668,9 @@ Return (PKG-DESC [NAME VERSION STATUS DOC])." ,(propertize (package-desc-summary pkg-desc) 'font-lock-face face)]))) +(defvar package-menu--old-archive-contents nil + "`package-archive-contents' before the latest refresh.") + (defun package-menu-refresh () "Download the Emacs Lisp package archive. This fetches the contents of each archive specified in @@ -2982,9 +2981,6 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." (string< (or (package-desc-archive (car A)) "") (or (package-desc-archive (car B)) ""))) -(defvar package-menu--old-archive-contents nil - "`package-archive-contents' before the latest refresh.") - (defun package-menu--populate-new-package-list () "Decide which packages are new in `package-archives-contents'. Store this list in `package-menu--new-package-list'." @@ -3015,14 +3011,6 @@ after `package-menu--perform-transaction'." (revert-buffer nil 'noconfirm)))) (package-menu--find-and-notify-upgrades)) -(defcustom package-menu-async t - "If non-nil, package-menu will use async operations when possible. -This includes refreshing archive contents as well as installing -packages." - :type 'boolean - :version "25.1" - :group 'package) - ;;;###autoload (defun list-packages (&optional no-fetch) "Display a list of packages. commit 33cb25bdc02a631aabfac76200ead93f93618942 Author: Eli Zaretskii Date: Sun Apr 26 22:18:13 2015 +0300 Fix a typo in rmail.el * lisp/mail/rmail.el (rmail-ensure-blank-line): Fix a typo in the last commit. (Bug#20429) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 74533f8..7efcf69 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2127,7 +2127,7 @@ Value is the size of the newly read mail after conversion." Call with point at the end of the message." (unless (bolp) (insert "\n")) - (unless (looking-back "\n\n" (- (point 2))) + (unless (looking-back "\n\n" (- (point) 2)) (insert "\n"))) (defun rmail-add-mbox-headers () commit 2f3b409a28241c88cdaca8778430121a736f7c77 Author: Dmitry Gutov Date: Sun Apr 26 18:08:56 2015 +0300 Introduce xref-prompt-for-identifier * lisp/progmodes/xref.el (xref-prompt-for-identifier): New option. (xref--read-identifier): Use it (http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg01205.html). diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 0257210..9f10686 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -276,6 +276,15 @@ backward." :type 'integer :version "25.1") +(defcustom xref-prompt-for-identifier nil + "When non-nil, always prompt for the identifier name. + +Otherwise, only prompt when there's no value at point we can use, +or when the command has been called with the prefix argument." + :type '(choice (const :tag "always" t) + (const :tag "auto" nil)) + :version "25.1") + (defvar xref--marker-ring (make-ring xref-marker-ring-length) "Ring of markers to implement the marker stack.") @@ -559,7 +568,7 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." (defun xref--read-identifier (prompt) "Return the identifier at point or read it from the minibuffer." (let ((id (funcall xref-identifier-at-point-function))) - (cond ((or current-prefix-arg (not id)) + (cond ((or current-prefix-arg xref-prompt-for-identifier (not id)) (completing-read prompt (funcall xref-identifier-completion-table-function) nil t nil commit a40869789fc5502e3d4e393b7c31d78cb7f29aa1 Author: João Távora Date: Sun Apr 26 11:44:41 2015 +0100 `tex-insert-quote' after single `'' opens quotes instead of closing Without this, it's very hard to precede double quotes with the apostrophe character, i.e. insert the sequence '`` (quote-backquote-backquote), commonly useful in portuguese, for instance. * tex-mode.el (tex-insert-quote): Add ?' to the list of preceding chars making `tex-insert-quote' be in the "opening" context. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index c26c609..274cb4a 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1331,7 +1331,9 @@ inserts \" characters." (goto-char saved) (insert (if (> saved (mark)) tex-close-quote tex-open-quote))) (if (or (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)) - (memq (preceding-char) '(?~))) + (memq (preceding-char) '(?~ ?'))) + ;; We're in an "opening" context + ;; (if electric-pair-mode (if (looking-at (regexp-quote tex-close-quote)) (forward-char (length tex-close-quote)) @@ -1339,6 +1341,8 @@ inserts \" characters." (insert tex-close-quote) (backward-char (length tex-close-quote))) (insert tex-open-quote)) + ;; We're in a "closing" context. + ;; (if (looking-at (regexp-quote tex-close-quote)) (forward-char (length tex-close-quote)) (insert tex-close-quote))))))