commit ad39858fae45452d39c7f37c3eaf0037fa5620b8 (HEAD, refs/remotes/origin/master) Author: Stefan Monnier Date: Wed May 6 22:27:36 2015 -0400 * lisp/mail/rmail.el: Use lexical-binding (rmail-bury): Remove unused var `buffer-to-bury'. (rmail-get-new-mail): Remove unused vars `opoint' and `success'. (rmail-parse-url): Remove unused var `proto', `user', and `host'. (rmail-unrmail-new-mail-maybe): Remove unused var `new-file'. (rmail-insert-inbox-text): Remove unused var `movemail'. (rmail-add-mbox-headers): Remove unused var `limit'. (rmail-undelete-previous-message): Remove unused var `value'. (rmail-reply): Remove unused vars `resent-to', `resent-cc', `resent-reply-to'. (rmail-mime-mbox-buffer, rmail-mime-view-buffer): Declare. (rmail-restore-desktop-buffer): Rename arguments. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 98c6906..1572712 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1,4 +1,4 @@ -;;; rmail.el --- main code of "RMAIL" mail reader for Emacs +;;; rmail.el --- main code of "RMAIL" mail reader for Emacs -*- lexical-binding:t -*- ;; Copyright (C) 1985-1988, 1993-1998, 2000-2015 Free Software ;; Foundation, Inc. @@ -889,7 +889,7 @@ that knows the exact ordering of the \\( \\) subexpressions.") Signal an error and set `rmail-mime-feature' to nil if the feature isn't provided." (when rmail-enable-mime - (condition-case err + (condition-case nil (require rmail-mime-feature) (error (display-warning @@ -1586,13 +1586,12 @@ Hook `rmail-quit-hook' is run after expunging." (interactive) ;; This let var was called rmail-buffer, but that interfered ;; with the buffer-local var used in summary buffers. - (let ((buffer-to-bury (current-buffer))) - (if (rmail-summary-exists) - (let (window) - (while (setq window (get-buffer-window rmail-summary-buffer)) - (quit-window nil window)) - (bury-buffer rmail-summary-buffer))) - (quit-window))) + (if (rmail-summary-exists) + (let (window) + (while (setq window (get-buffer-window rmail-summary-buffer)) + (quit-window nil window)) + (bury-buffer rmail-summary-buffer))) + (quit-window)) (defun rmail-duplicate-message () "Create a duplicated copy of the current message. @@ -1760,15 +1759,14 @@ not be a new one). It returns non-nil if it got any new messages." ;; This loops if any members of the inbox list have the same ;; basename (see "name conflict" below). (while all-files - (let ((opoint (point)) - ;; If buffer has not changed yet, and has not been + (let (;; If buffer has not changed yet, and has not been ;; saved yet, don't replace the old backup file now. (make-backup-files (and make-backup-files (buffer-modified-p))) (buffer-read-only nil) ;; Don't make undo records while getting mail. (buffer-undo-list t) - delete-files success files file-last-names) + delete-files files file-last-names) ;; Pull files off all-files onto files as long as there is ;; no name conflict. A conflict happens when two inbox ;; file names have the same last component. @@ -1910,9 +1908,10 @@ is non-nil if the user has supplied the password interactively. ((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file) (let (got-password supplied-password - (proto "pop") - (user (match-string 1 file)) - (host (match-string 3 file))) + ;; (proto "pop") + ;; (user (match-string 1 file)) + ;; (host (match-string 3 file)) + ) (when rmail-remote-password-required (setq got-password (not (rmail-have-password))) @@ -1945,8 +1944,7 @@ SIZE is the original size of the newly read mail. Value is the size of the newly read mail after conversion." ;; Detect previous Babyl format files. (let ((case-fold-search nil) - (old-file file) - new-file) + (old-file file)) (cond ((looking-at "BABYL OPTIONS:") ;; The new mail is in Babyl version 5 format. Use unrmail ;; to convert it. @@ -1972,7 +1970,7 @@ Value is the size of the newly read mail after conversion." (or (memq (file-locked-p buffer-file-name) '(nil t)) (error "RMAIL file %s is locked" (file-name-nondirectory buffer-file-name))) - (let (file tofile delete-files movemail popmail got-password password) + (let (file tofile delete-files popmail got-password password) (while files ;; Handle remote mailbox names specially; don't expand as filenames ;; in case the userid contains a directory separator. @@ -2144,7 +2142,7 @@ new messages. Return the number of new messages." (value "------U-") (case-fold-search nil) (delim (concat "\n\n" rmail-unix-mail-delimiter)) - limit stop) + stop) ;; Detect an empty inbox file. (unless (= start (point-max)) ;; Scan the new messages to establish a count and to ensure that @@ -2889,7 +2887,7 @@ The current mail message becomes the message displayed." (setq blurb (format "Showing message %d...done" msg))))) blurb)) -(defun rmail-copy-headers (beg end &optional ignored-headers) +(defun rmail-copy-headers (beg _end &optional ignored-headers) "Copy displayed header fields to the message viewer buffer. BEG and END marks the start and end positions of the message in the mbox buffer. If the optional argument IGNORED-HEADERS is @@ -3153,7 +3151,7 @@ or forward if N is negative." (rmail-maybe-set-message-counters) (rmail-show-message rmail-total-messages)) -(defun rmail-next-error-move (msg-pos bad-marker) +(defun rmail-next-error-move (msg-pos _bad-marker) "Move to an error locus (probably grep hit) in an Rmail buffer. MSG-POS is a marker pointing at the error message in the grep buffer. BAD-MARKER is a marker that ought to point at where to move to, @@ -3463,21 +3461,20 @@ STATE non-nil means mark as deleted." "Back up to deleted message, select it, and undelete it." (interactive "p") (set-buffer rmail-buffer) - (let (value) - (dotimes (i count) - (let ((msg rmail-current-message)) - (while (and (> msg 0) - (not (rmail-message-deleted-p msg))) - (setq msg (1- msg))) - (if (= msg 0) - (error "No previous deleted message") - (if (/= msg rmail-current-message) - (rmail-show-message msg)) - (rmail-set-attribute rmail-deleted-attr-index nil) - (if (rmail-summary-exists) - (with-current-buffer rmail-summary-buffer - (rmail-summary-mark-undeleted msg)))))) - (rmail-maybe-display-summary))) + (dotimes (_ count) + (let ((msg rmail-current-message)) + (while (and (> msg 0) + (not (rmail-message-deleted-p msg))) + (setq msg (1- msg))) + (if (= msg 0) + (error "No previous deleted message") + (if (/= msg rmail-current-message) + (rmail-show-message msg)) + (rmail-set-attribute rmail-deleted-attr-index nil) + (if (rmail-summary-exists) + (with-current-buffer rmail-summary-buffer + (rmail-summary-mark-undeleted msg)))))) + (rmail-maybe-display-summary)) (defun rmail-delete-forward (&optional count) "Delete this message and move to next nondeleted one. @@ -3491,7 +3488,7 @@ Returns t if a new message is displayed after the delete, or nil otherwise." (let (value backward) (if (< count 0) (setq count (- count) backward t)) - (dotimes (i count) + (dotimes (_ count) (rmail-set-attribute rmail-deleted-attr-index t) (run-hooks 'rmail-delete-message-hook) (let ((del-msg rmail-current-message)) @@ -3788,7 +3785,7 @@ use \\[mail-yank-original] to yank the original message into it." (if (zerop rmail-current-message) (error "There is no message to reply to")) (let (from reply-to cc subject date to message-id references - resent-to resent-cc resent-reply-to + ;; resent-to resent-cc resent-reply-to (msgnum rmail-current-message)) (rmail-apply-in-message rmail-current-message @@ -3803,14 +3800,14 @@ use \\[mail-yank-original] to yank the original message into it." date (mail-fetch-field "date") message-id (mail-fetch-field "message-id") references (mail-fetch-field "references" nil nil t) - resent-reply-to (mail-fetch-field "resent-reply-to" nil t) ;; Bug#512. It's inappropriate to reply to these addresses. -;;; resent-cc (and (not just-sender) -;;; (mail-fetch-field "resent-cc" nil t)) -;;; resent-to (or (mail-fetch-field "resent-to" nil t) "") -;;; resent-subject (mail-fetch-field "resent-subject") -;;; resent-date (mail-fetch-field "resent-date") -;;; resent-message-id (mail-fetch-field "resent-message-id") + ;;resent-reply-to (mail-fetch-field "resent-reply-to" nil t) + ;;resent-cc (and (not just-sender) + ;; (mail-fetch-field "resent-cc" nil t)) + ;;resent-to (or (mail-fetch-field "resent-to" nil t) "") + ;;resent-subject (mail-fetch-field "resent-subject") + ;;resent-date (mail-fetch-field "resent-date") + ;;resent-message-id (mail-fetch-field "resent-message-id") ) (unless just-sender (if (mail-fetch-field "mail-followup-to" nil t) @@ -3821,14 +3818,14 @@ use \\[mail-yank-original] to yank the original message into it." to (or (mail-fetch-field "to" nil t) "")))))) ;; Merge the resent-to and resent-cc into the to and cc. ;; Bug#512. It's inappropriate to reply to these addresses. -;;; (if (and resent-to (not (equal resent-to ""))) -;;; (if (not (equal to "")) -;;; (setq to (concat to ", " resent-to)) -;;; (setq to resent-to))) -;;; (if (and resent-cc (not (equal resent-cc ""))) -;;; (if (not (equal cc "")) -;;; (setq cc (concat cc ", " resent-cc)) -;;; (setq cc resent-cc))) + ;;(if (and resent-to (not (equal resent-to ""))) + ;; (setq to (if (not (equal to "")) + ;; (concat to ", " resent-to) + ;; resent-to))) + ;;(if (and resent-cc (not (equal resent-cc ""))) + ;; (setq cc (if (not (equal cc "")) + ;; (concat cc ", " resent-cc) + ;; resent-cc))) ;; Add `Re: ' to subject if not there already. (and (stringp subject) (setq subject (rfc2047-decode-string subject) @@ -4147,6 +4144,9 @@ The message should be narrowed to just the headers." (declare-function rmail-mime-toggle-raw "rmailmm" (&optional state)) +(defvar rmail-mime-mbox-buffer) +(defvar rmail-mime-view-buffer) + (defun rmail-retry-failure () "Edit a mail message which is based on the contents of the current message. For a message rejected by the mail system, extract the interesting headers and @@ -4423,13 +4423,13 @@ current message into that RMAIL folder." (declare-function dframe-select-attached-frame "dframe" (&optional frame)) (declare-function dframe-maybee-jump-to-attached-frame "dframe" ()) -(defun rmail-speedbar-button (text token indent) +(defun rmail-speedbar-button (_text token _indent) "Execute an rmail command specified by TEXT. The command used is TOKEN. INDENT is not used." (dframe-with-attached-buffer (funcall token t))) -(defun rmail-speedbar-find-file (text token indent) +(defun rmail-speedbar-find-file (text _token _indent) "Load in the rmail file TEXT. TOKEN and INDENT are not used." (dframe-with-attached-buffer @@ -4448,7 +4448,7 @@ TOKEN and INDENT are not used." (forward-char -2) (speedbar-do-function-pointer))))) -(defun rmail-speedbar-move-message (text token indent) +(defun rmail-speedbar-move-message (_text token _indent) "From button TEXT, copy current message to the rmail file specified by TOKEN. TEXT and INDENT are not used." (dframe-with-attached-buffer @@ -4644,13 +4644,13 @@ encoded string (and the same mask) will decode the string." ;;;; Desktop support -(defun rmail-restore-desktop-buffer (desktop-buffer-file-name - desktop-buffer-name - desktop-buffer-misc) +(defun rmail-restore-desktop-buffer (file-name + _buffer-name + _buffer-misc) "Restore an rmail buffer specified in a desktop file." - (condition-case error + (condition-case nil (progn - (rmail-input desktop-buffer-file-name) + (rmail-input file-name) (if (eq major-mode 'rmail-mode) (current-buffer) rmail-buffer)) @@ -4666,7 +4666,7 @@ encoded string (and the same mask) will decode the string." (defvar rmail-message-encoding nil) ;; Used in `write-region-annotate-functions' to write rmail files. -(defun rmail-write-region-annotate (start end) +(defun rmail-write-region-annotate (start _end) (when (and (null start) rmail-buffer-swapped) (unless (buffer-live-p rmail-view-buffer) (error "Buffer `%s' with real text of `%s' has disappeared" commit 74fdcc1b7ee11e8465c375a81f4f6bd6d14cc00c Author: Glenn Morris Date: Wed May 6 22:01:02 2015 -0400 * Makefile.in (change-history-commit): Add missing piece of previous. diff --git a/Makefile.in b/Makefile.in index 5102575..e8780c2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1136,7 +1136,7 @@ change-history: change-history-nocommit # file contains invalid text, fix the file by hand and then run # 'make change-history-commit'. change-history-commit: - git commit -m'; make $@' $(CHANGELOG_N) Makefile.in + git commit -m'; make $@' $(CHANGELOG_N) $(emacslog) .PHONY: check-declare commit adb69ddff05ce770261e03d249f2e31e75c098af Author: Glenn Morris Date: Wed May 6 21:58:58 2015 -0400 Avoid unnecessary bumping of Makefile.in's timestamp. * Makefile.in (gen_origin): Move to gitlog-to-emacslog. (emacslog): New variable. (ChangeLog): Use $emacslog. Don't pass $gen_origin. (unchanged-history-files): Use $emacslog rather than Makefile.in. (change-history-nocommit): Store hash in $emacslog. * build-aux/gitlog-to-emacslog (gen_origin): Move default here. * admin/update_autogen (changelog_files): Update for the above. diff --git a/Makefile.in b/Makefile.in index c1ed1c3..5102575 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1091,10 +1091,8 @@ bootstrap: bootstrap-clean .PHONY: ChangeLog change-history change-history-commit change-history-nocommit .PHONY: master-branch-is-current unchanged-history-files -# The newest revision that should not appear in the generated ChangeLog. -gen_origin = 2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0 - CHANGELOG = +emacslog = $(srcdir)/build-aux/gitlog-to-emacslog # Convert git commit log to ChangeLog file. make-dist uses this. # I guess this is PHONY because it generates in distprefix (which is @@ -1103,7 +1101,7 @@ CHANGELOG = ChangeLog: @[ -n "${CHANGELOG}" ] || test ! -f ChangeLog $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \ - $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) $(CHANGELOG) + $(emacslog) . $(CHANGELOG) # The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ..., # ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for @@ -1115,7 +1113,7 @@ CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX) master-branch-is-current: git branch | grep -q '^\* master$$' unchanged-history-files: - x=$$(git diff-files --name-only $(CHANGELOG_N) Makefile.in) && \ + x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \ test -z "$$x" # Copy newer commit messages to the start of the ChangeLog history file, @@ -1126,10 +1124,10 @@ change-history-nocommit: master-branch-is-current unchanged-history-files >$(CHANGELOG_N).tmp rm ChangeLog.tmp new_origin=$$(git log --pretty=format:%H HEAD^!) && \ - sed 's/^\(gen_origin *= *\).*/\1'"$$new_origin/" \ - Makefile.in.tmp + sed 's/^\(gen_origin=\).*/\1'"$$new_origin/" \ + < $(emacslog) > $(emacslog).tmp mv $(CHANGELOG_N).tmp $(CHANGELOG_N) - mv Makefile.in.tmp Makefile.in + mv $(emacslog).tmp $(emacslog) change-history: change-history-nocommit $(MAKE) $@-commit diff --git a/admin/update_autogen b/admin/update_autogen index e9d4aa5..27d5303 100755 --- a/admin/update_autogen +++ b/admin/update_autogen @@ -94,7 +94,7 @@ changelog_flag= ldefs_in=lisp/loaddefs.el ldefs_out=lisp/ldefs-boot.el changelog_n=$(sed -n 's/CHANGELOG_HISTORY_INDEX_MAX *= *//p' Makefile.in) -changelog_files="ChangeLog.$changelog_n Makefile.in" +changelog_files="ChangeLog.$changelog_n build-aux/gitlog-to-emacslog" sources="configure.ac lib/Makefile.am" ## Files to copy into autogendir. ## Everything: diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog index 059cf81..a657cce 100755 --- a/build-aux/gitlog-to-emacslog +++ b/build-aux/gitlog-to-emacslog @@ -22,7 +22,10 @@ LC_ALL=C export LC_ALL -gen_origin=${1?} +# The newest revision that should not appear in the generated ChangeLog. +gen_origin=2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0 +test -n "$1" && test "$1" != "." && gen_origin=$1 + output=$2 test -n "$output" || output=ChangeLog commit 09b872dff4242964daca072472ddfc1dd47cbbc1 Author: Glenn Morris Date: Wed May 6 21:40:28 2015 -0400 * Makefile.in: Don't always insist on removing existing "ChangeLog". (CHANGELOG): New variable. (no-ChangeLog): Remove. (ChangeLog): Replace "no-ChangeLog"; pass output file to script. (change-history-nocommit): Use a temp file rather than insisting on deletion of any existing "ChangeLog". diff --git a/Makefile.in b/Makefile.in index dc7e825..c1ed1c3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1089,15 +1089,21 @@ bootstrap: bootstrap-clean $(MAKE) all .PHONY: ChangeLog change-history change-history-commit change-history-nocommit -.PHONY: master-branch-is-current no-ChangeLog unchanged-history-files +.PHONY: master-branch-is-current unchanged-history-files # The newest revision that should not appear in the generated ChangeLog. gen_origin = 2c1b8604946efbcd8ec5dd6c6dda7541ce4fc3c0 +CHANGELOG = + # Convert git commit log to ChangeLog file. make-dist uses this. +# I guess this is PHONY because it generates in distprefix (which is +# non-nil when called from make-dist)? +# FIXME: test -f does not respect distprefix. ChangeLog: + @[ -n "${CHANGELOG}" ] || test ! -f ChangeLog $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \ - $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) + $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) $(CHANGELOG) # The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ..., # ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for @@ -1106,8 +1112,6 @@ CHANGELOG_HISTORY_INDEX_MAX = 2 CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX) # Check that we are in a good state for changing history. -no-ChangeLog: - test ! -f ChangeLog master-branch-is-current: git branch | grep -q '^\* master$$' unchanged-history-files: @@ -1116,10 +1120,11 @@ unchanged-history-files: # Copy newer commit messages to the start of the ChangeLog history file, # and consider them to be older. -change-history-nocommit: no-ChangeLog master-branch-is-current \ - unchanged-history-files ChangeLog - (sed '/^;; [L]ocal Variables:/,$$d' $(CHANGELOG_N).tmp + rm ChangeLog.tmp new_origin=$$(git log --pretty=format:%H HEAD^!) && \ sed 's/^\(gen_origin *= *\).*/\1'"$$new_origin/" \ Makefile.in.tmp commit 38398844200322e81e20f4fb2ad129b72a0e8a21 Author: Glenn Morris Date: Wed May 6 21:37:09 2015 -0400 * build-aux/gitlog-to-emacslog: Allow specification of output. diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog index 996f6d0..059cf81 100755 --- a/build-aux/gitlog-to-emacslog +++ b/build-aux/gitlog-to-emacslog @@ -23,12 +23,14 @@ LC_ALL=C export LC_ALL gen_origin=${1?} +output=$2 +test -n "$output" || output=ChangeLog # If this is not a Git repository, just generate an empty ChangeLog. test -d ${srcprefix}.git || { # Remove any old ChangeLog, in case it is a vc-dwim symlink. - rm -f "${distprefix}ChangeLog" || exit - >"${distprefix}ChangeLog" + rm -f "${distprefix}$output" || exit + >"${distprefix}$output" exit } @@ -78,4 +80,5 @@ if test -s "${distprefix}ChangeLog.tmp"; then fi # Install the generated ChangeLog. -mv -i "${distprefix}ChangeLog.tmp" "${distprefix}ChangeLog" +test "$output" = "ChangeLog.tmp" || \ + mv -i "${distprefix}ChangeLog.tmp" "${distprefix}$output" commit 22f9e2cee692ef1c24fb6c74cb37faf45bd7cb02 Author: Glenn Morris Date: Wed May 6 21:35:28 2015 -0400 * admin/update_autogen: Add option to update ChangeLog. (usage): Mention -H. (changelog_flag, changelog_n, changelog_files): New variables. (main): Check for -H, and maybe run change-history-nocommit. diff --git a/admin/update_autogen b/admin/update_autogen index 1bd8296..e9d4aa5 100755 --- a/admin/update_autogen +++ b/admin/update_autogen @@ -69,6 +69,7 @@ Options: commit them (caution). -q: be quiet; only give error messages, not status messages. -A: only update autotools files, copying into specified dir. +-H: also update ChangeLog.${changelog_n} -I: also update info/dir. -L: also update ldefs-boot.el. -C: start from a clean state. Slower, but more correct. @@ -87,10 +88,13 @@ autogendir= # was "autogen" ldefs_flag=1 lboot_flag= info_flag= +changelog_flag= ## Parameters. ldefs_in=lisp/loaddefs.el ldefs_out=lisp/ldefs-boot.el +changelog_n=$(sed -n 's/CHANGELOG_HISTORY_INDEX_MAX *= *//p' Makefile.in) +changelog_files="ChangeLog.$changelog_n Makefile.in" sources="configure.ac lib/Makefile.am" ## Files to copy into autogendir. ## Everything: @@ -113,7 +117,7 @@ tempfile=/tmp/$PN.$$ trap "rm -f $tempfile 2> /dev/null" EXIT -while getopts ":hcfqA:CIL" option ; do +while getopts ":hcfqA:HCIL" option ; do case $option in (h) usage ;; @@ -129,6 +133,8 @@ while getopts ":hcfqA:CIL" option ; do (C) clean=1 ;; + (H) changelog_flag=1 ;; + (I) info_flag=1 ;; (L) lboot_flag=1 ;; @@ -382,6 +388,14 @@ modified=$(status $genfiles $ldefs_out) || die commit "loaddefs" $modified || die "commit error" +## Less important than the other stuff, so do it last. +[ ! "$changelog_flag" ] || { + make change-history-nocommit || die "make change-history error" + modified=$(status $changelog_files) || die + commit "ChangeLog" $modified || die "commit error" +} + + exit 0 ### update_autogen ends here commit d45fd912eb7b90ce552db722dbe5893915f0fa1b Author: Stefan Monnier Date: Wed May 6 21:13:56 2015 -0400 * lisp/subr.el (delete-dups): Pre-size the hashtable. diff --git a/lisp/subr.el b/lisp/subr.el index ce9b44c..9c56e51 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -417,21 +417,21 @@ If N is omitted or nil, remove the last element." Store the result in LIST and return it. LIST must be a proper list. Of several `equal' occurrences of an element in LIST, the first one is kept." - (if (> (length list) 100) - (let ((hash (make-hash-table :test #'equal)) - (tail list) - elt retail) - (puthash (car list) t hash) - (while (setq retail (cdr tail)) - (setq elt (car retail)) - (if (gethash elt hash) - (setcdr tail (cdr retail)) - (puthash elt t hash)) - (setq tail retail))) - (let ((tail list)) - (while tail - (setcdr tail (delete (car tail) (cdr tail))) - (setq tail (cdr tail))))) + (let ((l (length list))) + (if (> l 100) + (let ((hash (make-hash-table :test #'equal :size l)) + (tail list) retail) + (puthash (car list) t hash) + (while (setq retail (cdr tail)) + (let ((elt (car retail))) + (if (gethash elt hash) + (setcdr tail (cdr retail)) + (puthash elt t hash))) + (setq tail retail))) + (let ((tail list)) + (while tail + (setcdr tail (delete (car tail) (cdr tail))) + (setq tail (cdr tail)))))) list) ;; See http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00204.html commit bceffdb3796df75b6f2efc2f6f17ca927a25c3b9 Author: Stefan Monnier Date: Wed May 6 17:43:43 2015 -0400 (define-modify-macro): Make sure cl--arglist-args is defined * lisp/emacs-lisp/cl.el (define-modify-macro): Make sure cl--arglist-args is defined (bug#20517). diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 564a444..c966ace 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -626,6 +626,8 @@ You can replace this form with `gv-define-setter'. ;; ...the rest, and build the 5-tuple)) (make-obsolete 'get-setf-method 'gv-letplace "24.3") +(declare-function cl--arglist-args "cl-macs" (args)) + (defmacro define-modify-macro (name arglist func &optional doc) "Define a `setf'-like modify macro. If NAME is called, it combines its PLACE argument with the other @@ -639,6 +641,7 @@ You can replace this macro with `gv-letplace'." symbolp &optional stringp))) (if (memq '&key arglist) (error "&key not allowed in define-modify-macro")) + (require 'cl-macs) ;For cl--arglist-args. (let ((place (make-symbol "--cl-place--"))) `(cl-defmacro ,name (,place ,@arglist) ,doc commit 96b99c1bef79f3839e1a2f3c8e8d6f5625dc5cc3 Author: Glenn Morris Date: Wed May 6 17:02:06 2015 -0400 * Makefile.in (change-history-nocommit): New. diff --git a/Makefile.in b/Makefile.in index 858a34d..dc7e825 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1088,7 +1088,7 @@ bootstrap: bootstrap-clean $(MAKE) MAKEFILE_NAME=force-Makefile force-Makefile $(MAKE) all -.PHONY: ChangeLog change-history change-history-commit +.PHONY: ChangeLog change-history change-history-commit change-history-nocommit .PHONY: master-branch-is-current no-ChangeLog unchanged-history-files # The newest revision that should not appear in the generated ChangeLog. @@ -1116,8 +1116,8 @@ unchanged-history-files: # Copy newer commit messages to the start of the ChangeLog history file, # and consider them to be older. -change-history: no-ChangeLog master-branch-is-current unchanged-history-files \ - ChangeLog +change-history-nocommit: no-ChangeLog master-branch-is-current \ + unchanged-history-files ChangeLog (sed '/^;; [L]ocal Variables:/,$$d' $(CHANGELOG_N).tmp new_origin=$$(git log --pretty=format:%H HEAD^!) && \ @@ -1125,6 +1125,8 @@ change-history: no-ChangeLog master-branch-is-current unchanged-history-files \ Makefile.in.tmp mv $(CHANGELOG_N).tmp $(CHANGELOG_N) mv Makefile.in.tmp Makefile.in + +change-history: change-history-nocommit $(MAKE) $@-commit # If 'make change-history' fails because the newest ChangeLog history commit 49a9e73f0a7d52a3c452d466097b2d14b1b8e126 Author: Dmitry Gutov Date: Wed May 6 23:15:45 2015 +0300 Only cancel timer when it is non-nil * lisp/cedet/pulse.el (pulse-momentary-unhighlight): Only cancel timer when it is non-nil (http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00223.html). diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index 67ad31a..39ba13c 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -215,9 +215,10 @@ Optional argument FACE specifies the face to do the highlighting." (setq pulse-momentary-overlay nil) ;; Reset the pulsing face. - (pulse-reset-face) + (pulse-reset-face)) - ;; Cancel the timer. + ;; Cancel the timer. + (when pulse-momentary-timer (cancel-timer pulse-momentary-timer)) ;; Remove this hook. commit ece365e673e721259865ae47273614bb5b92493c Author: Glenn Morris Date: Wed May 6 16:02:32 2015 -0400 Quieten cedet compilation * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag): Invert fboundp test to quieten on current Emacs. * lisp/cedet/ede/config.el (ede-shell-run-something) (semanticdb-file-table-object, semanticdb-needs-refresh-p) (semanticdb-refresh-table): Declare. (ede-preprocessor-map): Require semantic/db. diff --git a/lisp/cedet/ede/config.el b/lisp/cedet/ede/config.el index f91a6c1..f5578a2 100644 --- a/lisp/cedet/ede/config.el +++ b/lisp/cedet/ede/config.el @@ -268,6 +268,8 @@ programs from a project.") (cmdsym (intern-soft (car cmdsplit)))) (call-interactively cmdsym t))) +(declare-function ede-shell-run-something "ede/shell") + (cl-defmethod project-run-target ((target ede-target-with-config-program)) "Run the current project derived from TARGET." (let* ((proj (ede-target-parent target)) @@ -358,8 +360,14 @@ parsed again.")) This target brings in methods used by Semantic to query the preprocessor map, and include paths.") +(declare-function semanticdb-file-table-object "semantic/db" + (file &optional dontload)) +(declare-function semanticdb-needs-refresh-p "semantic/db" (arg &rest args)) +(declare-function semanticdb-refresh-table "semantic/db" (arg &rest args)) + (cl-defmethod ede-preprocessor-map ((this ede-target-with-config-c)) "Get the pre-processor map for some generic C code." + (require 'semantic/sb) (let* ((proj (ede-target-parent this)) (root (ede-project-root proj)) (config (ede-config-get-configuration proj)) diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index b20a756..432f638 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -223,11 +223,11 @@ TOKTYPE is a hint to the type of tag desired." (symbol-name sym) "class" (semantic-elisp-desymbolify - (let ((class (find-class sym))) - (if (fboundp 'eieio-slot-descriptor-name) - (mapcar #'eieio-slot-descriptor-name - (eieio-class-slots class)) - (eieio--class-public-a class)))) + (let ((class (find-class sym))) + (if (fboundp 'eieio--class-public-a) ; Emacs < 25.1 + (eieio--class-public-a class) + (mapcar #'eieio-slot-descriptor-name + (eieio-class-slots class))))) (semantic-elisp-desymbolify (eieio-class-parents sym)) ;; parents )) ((not toktype) commit 7511337a8a651f9b8a07576bbfafb0ace9e38d53 Author: Glenn Morris Date: Wed May 6 16:00:22 2015 -0400 Quieten cc-mode compilation * lisp/progmodes/cc-awk.el (c-forward-sws): * lisp/progmodes/cc-cmds.el (c-forward-subword, c-backward-subword): Declare. diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 1ef80c8..ad02485 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -61,6 +61,7 @@ (cc-bytecomp-defun c-backward-token-1) (cc-bytecomp-defun c-beginning-of-statement-1) (cc-bytecomp-defun c-backward-sws) +(cc-bytecomp-defun c-forward-sws) (defvar awk-mode-syntax-table (let ((st (make-syntax-table))) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 68075f3..94dc34b 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -1317,6 +1317,9 @@ keyword on the line, the keyword is not inserted inside a literal, and (autoload 'c-subword-mode "cc-subword" "Mode enabling subword movement and editing keys." t))) +(declare-function c-forward-subword "ext:cc-subword" (&optional arg)) +(declare-function c-backward-subword "ext:cc-subword" (&optional arg)) + ;; "nomenclature" functions + c-scope-operator. (defun c-forward-into-nomenclature (&optional arg) "Compatibility alias for `c-forward-subword'." commit 1ca93e01841975dab67fbc0f4cb92aff94a654d7 Author: Oleh Krehel Date: Wed May 6 21:30:54 2015 +0200 lisp/subr.el (delete-dups): Avoid nreverse. diff --git a/lisp/subr.el b/lisp/subr.el index a32fb96..ce9b44c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -419,12 +419,15 @@ Of several `equal' occurrences of an element in LIST, the first one is kept." (if (> (length list) 100) (let ((hash (make-hash-table :test #'equal)) - res) - (dolist (elt list) - (unless (gethash elt hash) - (puthash elt elt hash) - (push elt res))) - (setcdr list (cdr (nreverse res)))) + (tail list) + elt retail) + (puthash (car list) t hash) + (while (setq retail (cdr tail)) + (setq elt (car retail)) + (if (gethash elt hash) + (setcdr tail (cdr retail)) + (puthash elt t hash)) + (setq tail retail))) (let ((tail list)) (while tail (setcdr tail (delete (car tail) (cdr tail))) commit f201bf6a5050d575dfc759fa23955fab0fbcfcb9 Author: Artur Malabarba Date: Wed May 6 19:27:43 2015 +0100 * lisp/subr.el (delete-dups): Make it destructive again. diff --git a/lisp/subr.el b/lisp/subr.el index 591980d..a32fb96 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -424,12 +424,12 @@ one is kept." (unless (gethash elt hash) (puthash elt elt hash) (push elt res))) - (nreverse res)) + (setcdr list (cdr (nreverse res)))) (let ((tail list)) (while tail (setcdr tail (delete (car tail) (cdr tail))) - (setq tail (cdr tail)))) - list)) + (setq tail (cdr tail))))) + list) ;; See http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00204.html (defun delete-consecutive-dups (list &optional circular) commit 7cc0f68b3801945d510f78f75ad3ee4df5a995b9 Author: Paul Eggert Date: Wed May 6 10:56:11 2015 -0700 * doc/lispref/sequences.texi (Sequence Functions): Fix quoting. diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 1166ef8..9bce155 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -804,7 +804,7 @@ vector or string (@pxref{Iteration} for more information about the @var{arguments} can itself include sequences allowing for nested destructuring. -The @var{arguments} sequence can also include the `&rest' marker +The @var{arguments} sequence can also include the @code{&rest} marker followed by a variable name to be bound to the rest of @code{sequence}. commit 288df227bacfe4a459ff6670d51815cc701707cf Author: Glenn Morris Date: Wed May 6 09:14:43 2015 -0700 ; * etc/NEWS: Add entry as a reminder to update the elisp manual. diff --git a/etc/NEWS b/etc/NEWS index 715295b..3ab1f4b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -749,6 +749,8 @@ behavior, set `diff-switches' to `-c'. * Lisp Changes in Emacs 25.1 +** The default value of `load-read-function' is now `read'. + ** New hook `pre-redisplay-functions', a bit easier to use than pre-redisplay-function. ** The second arg of `looking-back' should always be provided explicitly. commit 1340aefd96c13e4e18e1c6b7f5b6fae4611f5265 Author: Stefan Monnier Date: Wed May 6 10:50:48 2015 -0400 * lisp/emacs-lisp/testcover.el: Don't use edebug--read (bug#20487) * lisp/emacs-lisp/testcover.el: Use lexical-binding. (testcover--read): Rename from testcover-read. Change calling convention. Use edebug-read-and-maybe-wrap-form now that edebug-read is gone. (testcover-start): Use add-function. Move edebug-all-defs binding to testcover--read. (testcover-this-defun): Tighten scope of edebug-all-defs binding. (testcover-mark): Remove unused var `item'. * src/lread.c (syms_of_lread): Default load-read-function to `read'. diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index a91704a..110c63f 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -1,4 +1,4 @@ -;;;; testcover.el -- Visual code-coverage tool +;;;; testcover.el -- Visual code-coverage tool -*- lexical-binding:t -*- ;; Copyright (C) 2002-2015 Free Software Foundation, Inc. @@ -191,8 +191,9 @@ problems with type-ahead or post-command-hook, etc. If BYTE-COMPILE is non-nil, byte-compiles each function after instrumenting." (interactive "fStart covering file: ") (let ((buf (find-file filename)) - (load-read-function 'testcover-read) - (edebug-all-defs t)) + (load-read-function load-read-function)) + (add-function :around load-read-function + #'testcover--read) (setq edebug-form-data nil testcover-module-constants nil testcover-module-1value-functions nil) @@ -207,22 +208,26 @@ non-nil, byte-compiles each function after instrumenting." (defun testcover-this-defun () "Start coverage on function under point." (interactive) - (let* ((edebug-all-defs t) - (x (symbol-function (eval-defun nil)))) + (let ((x (let ((edebug-all-defs t)) + (symbol-function (eval-defun nil))))) (testcover-reinstrument x) x)) -(defun testcover-read (&optional stream) +(defun testcover--read (orig &optional stream) "Read a form using edebug, changing edebug callbacks to testcover callbacks." - (let ((x (edebug-read stream))) - (testcover-reinstrument x) - x)) + (or stream (setq stream standard-input)) + (if (eq stream (current-buffer)) + (let ((x (let ((edebug-all-defs t)) + (edebug-read-and-maybe-wrap-form)))) + (testcover-reinstrument x) + x) + (funcall (or orig #'read) stream))) (defun testcover-reinstrument (form) "Reinstruments FORM to use testcover instead of edebug. This function modifies the list that FORM points to. Result is nil if FORM should return multiple values, t if should always return same -value, 'maybe if either is acceptable." +value, `maybe' if either is acceptable." (let ((fun (car-safe form)) id val) (cond @@ -495,7 +500,7 @@ eliminated by adding more test cases." (len (length points)) (changed (buffer-modified-p)) (coverage (get def 'edebug-coverage)) - ov j item) + ov j) (or (and def-mark points coverage) (error "Missing edebug data for function %s" def)) (when (> len 0) diff --git a/src/alloc.c b/src/alloc.c index 688363d..030c6e0 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5762,7 +5762,7 @@ garbage_collect_1 (void *end) after GC. It's important to scan finalizers at this stage so that we can be sure that unmarked finalizers are really unreachable except for references from their associated functions - and from other finalizers. */ + and from other finalizers. */ queue_doomed_finalizers (&doomed_finalizers, &finalizers); mark_finalizer_list (&doomed_finalizers); diff --git a/src/lread.c b/src/lread.c index a84450a..26c19d8 100644 --- a/src/lread.c +++ b/src/lread.c @@ -4592,8 +4592,10 @@ of the file, regardless of whether or not it has the `.elc' extension. */); DEFVAR_LISP ("load-read-function", Vload_read_function, doc: /* Function used by `load' and `eval-region' for reading expressions. -The default is nil, which means use the function `read'. */); - Vload_read_function = Qnil; +Called with a single argument (the stream from which to read). +The default is to use the function `read'. */); + DEFSYM (Qread, "read"); + Vload_read_function = Qread; DEFVAR_LISP ("load-source-file-function", Vload_source_file_function, doc: /* Function called in `load' to load an Emacs Lisp source file. commit 1f052a5f26250d726618570a816ddb6fd0cc11a0 Author: Oleh Krehel Date: Wed May 6 15:21:23 2015 +0200 lisp/subr.el (delete-dups): Use a hash table * lisp/subr.el (delete-dups): When there are more than 100 candidates, use a hash table. This can result in ~500 times speed-up for typical collections of size 5000, like that of `load-library'. diff --git a/lisp/subr.el b/lisp/subr.el index 0fec29c..591980d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -417,11 +417,19 @@ If N is omitted or nil, remove the last element." Store the result in LIST and return it. LIST must be a proper list. Of several `equal' occurrences of an element in LIST, the first one is kept." - (let ((tail list)) - (while tail - (setcdr tail (delete (car tail) (cdr tail))) - (setq tail (cdr tail)))) - list) + (if (> (length list) 100) + (let ((hash (make-hash-table :test #'equal)) + res) + (dolist (elt list) + (unless (gethash elt hash) + (puthash elt elt hash) + (push elt res))) + (nreverse res)) + (let ((tail list)) + (while tail + (setcdr tail (delete (car tail) (cdr tail))) + (setq tail (cdr tail)))) + list)) ;; See http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00204.html (defun delete-consecutive-dups (list &optional circular) commit 2fa7c314a52c8d1cb29a893341d1c03e8ede57cd Author: Stefan Monnier Date: Wed May 6 09:56:03 2015 -0400 CEDET: Avoid `oref' on classes in a few more cases * lisp/cedet/ede/generic.el (ede-find-target): * lisp/cedet/ede.el (ede-project-forms-menu): Avoid `oref' on classes. * lisp/cedet/semantic/bovine/gcc.el (semantic-gcc-setup): Remove unused var `prefix'. diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 074fda9..43660a8 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -339,7 +339,7 @@ Argument MENU-DEF is the menu definition to use." (progn (while (and class (slot-exists-p class 'menu)) ;;(message "Looking at class %S" class) - (setq menu (append menu (oref class menu)) + (setq menu (append menu (oref-default class menu)) class (eieio-class-parent class)) (if (listp class) (setq class (car class)))) (append diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el index 7e1425f..9e6fc97 100644 --- a/lisp/cedet/ede/generic.el +++ b/lisp/cedet/ede/generic.el @@ -230,7 +230,7 @@ If one doesn't exist, create a new one for this directory." (when ext (dolist (C classes) (let* ((classsym (intern (car C))) - (extreg (oref classsym extension))) + (extreg (oref-default classsym extension))) (when (and (not (string= extreg "")) (string-match (concat "\\`\\(?:" extreg "\\)\\'") ext)) (setq cls classsym))))) diff --git a/lisp/cedet/semantic/bovine/gcc.el b/lisp/cedet/semantic/bovine/gcc.el index b186e7b..fe7a144 100644 --- a/lisp/cedet/semantic/bovine/gcc.el +++ b/lisp/cedet/semantic/bovine/gcc.el @@ -164,8 +164,9 @@ It should also include other symbols GCC was compiled with.") (host (or (cdr (assoc 'target fields)) (cdr (assoc '--target fields)) (cdr (assoc '--host fields)))) - (prefix (cdr (assoc '--prefix fields))) + ;; (prefix (cdr (assoc '--prefix fields))) ;; gcc output supplied paths + ;; FIXME: Where are `c-include-path' and `c++-include-path' used? (c-include-path (semantic-gcc-get-include-paths "c")) (c++-include-path (semantic-gcc-get-include-paths "c++")) (gcc-exe (locate-file "gcc" exec-path exec-suffixes 'executable)) commit 7ddf29d8f5ec0bcde166553134596a1150bda971 Author: Stefan Monnier Date: Wed May 6 09:44:30 2015 -0400 * lisp/cedet/semantic/symref/grep.el: Fix unused var warnings * lisp/cedet/semantic/symref/grep.el (grepflags, greppattern): Declare. (semantic-symref-perform-search): Remove unused var `pat'. diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index 4598a2c..3fa1c5f 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el @@ -87,6 +87,9 @@ Optional argument MODE specifies the `major-mode' to test." (error "Customize `semantic-symref-filepattern-alist' for %s" major-mode)) ))) +(defvar grepflags) +(defvar greppattern) + (defvar semantic-symref-grep-expand-keywords (condition-case nil (let* ((kw (copy-alist grep-expand-keywords)) @@ -98,7 +101,7 @@ Optional argument MODE specifies the `major-mode' to test." (error nil)) "Grep expand keywords used when expanding templates for symref.") -(defun semantic-symref-grep-use-template (rootdir filepattern grepflags greppattern) +(defun semantic-symref-grep-use-template (rootdir filepattern flags pattern) "Use the grep template expand feature to create a grep command. ROOTDIR is the root location to run the `find' from. FILEPATTERN is a string representing find flags for searching file patterns. @@ -106,7 +109,9 @@ GREPFLAGS are flags passed to grep, such as -n or -l. GREPPATTERN is the pattern used by grep." ;; We have grep-compute-defaults. Let's use it. (grep-compute-defaults) - (let* ((grep-expand-keywords semantic-symref-grep-expand-keywords) + (let* ((grepflags flags) + (greppattern pattern) + (grep-expand-keywords semantic-symref-grep-expand-keywords) (cmd (grep-expand-template (if (memq system-type '(windows-nt ms-dos)) ;; grep-find uses '--color=always' on MS-Windows @@ -141,7 +146,6 @@ This shell should support pipe redirect syntax." ) ;; Find the root of the project, and do a find-grep... (let* (;; Find the file patterns to use. - (pat (cdr (assoc major-mode semantic-symref-filepattern-alist))) (rootdir (semantic-symref-calculate-rootdir)) (filepattern (semantic-symref-derive-find-filepatterns)) ;; Grep based flags. commit 9b96a612cafd224092e1651a167fab193772d6bf Author: Stefan Monnier Date: Wed May 6 09:12:40 2015 -0400 CEDET (srecode-compile-inserter): Avoid `oref' on classes * lisp/cedet/srecode/compile.el (srecode-compile-inserter): Avoid `oref' on classes (bug#20491). (srecode-compile-split-code): Remove unused var `key'. diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index c93a6f7..a8d6a50 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el @@ -116,19 +116,19 @@ additional static argument data.")) Plain text strings are not handled via this baseclass." :abstract t) -(cl-defmethod srecode-parse-input ((ins srecode-template-inserter) - tag input STATE) +(cl-defmethod srecode-parse-input ((_ins srecode-template-inserter) + _tag input _STATE) "For the template inserter INS, parse INPUT. Shorten input only by the amount needed. Return the remains of INPUT. STATE is the current compilation state." input) -(cl-defmethod srecode-match-end ((ins srecode-template-inserter) name) +(cl-defmethod srecode-match-end ((_ins srecode-template-inserter) _name) "For the template inserter INS, do I end a section called NAME?" nil) -(cl-defmethod srecode-inserter-apply-state ((ins srecode-template-inserter) STATE) +(cl-defmethod srecode-inserter-apply-state ((_ins srecode-template-inserter) _STATE) "For the template inserter INS, apply information from STATE." nil) @@ -415,7 +415,7 @@ If END-NAME is specified, and the input string" (match-end 0))) (namestart (match-end 0)) (junk (string-match regexend what namestart)) - end tail name key) + end tail name) ;; Add string to compiled output (when (> (length prefix) 0) (setq comp (cons prefix comp))) @@ -453,8 +453,7 @@ If END-NAME is specified, and the input string" (semantic-tag-name tag))) ) ;; Add string to compiled output - (setq name (substring what namestart end) - key nil) + (setq name (substring what namestart end)) ;; Trim WHAT back. (setq what (substring what tail)) ;; Get the inserter @@ -523,7 +522,7 @@ to the inserter constructor." (setq classes (append classes (eieio-class-children (car classes)))) ;; Do we have a match? (when (and (not (class-abstract-p (car classes))) - (equal (oref (car classes) key) key)) + (equal (oref-default (car classes) key) key)) ;; Create the new class, and apply state. (setq new (apply (car classes) name props)) (srecode-inserter-apply-state new STATE) @@ -642,7 +641,7 @@ Argument INDENT specifies the indentation level for the list." (princ "\n")))) ) -(cl-defmethod srecode-dump ((ins srecode-template-inserter) indent) +(cl-defmethod srecode-dump ((ins srecode-template-inserter) _indent) "Dump the state of the SRecode template inserter INS." (princ "INS: \"") (princ (eieio-object-name-string ins)) commit a5847f9081585a15c10e2e28fa4d3aa6ffb9c092 Author: Dmitry Gutov Date: Wed May 6 15:21:32 2015 +0300 Clean up pulse.el a little * lisp/cedet/pulse.el (pulse): Remove. (pulse-momentary-timer): Save instead of the stop time. (pulse-momentary-highlight-overlay): Call pulse-momentary-unhighlight first thing. Treat pulse-momentary-overlay as a single value, not a list. Save the created timer. Only pass the stop time to the timer. (pulse-tick): Update accordingly. (pulse-momentary-unhighlight): Treat pulse-momentary-overlay as a single value. Cancel the timer. diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index fcc47b9..67ad31a 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -162,31 +162,21 @@ Return t if there is more drift to do, nil if completed." 'pulse-highlight-start-face)) (put 'pulse-highlight-face :iteration 0)) -(defun pulse (&optional face) - "Pulse the colors on our highlight face. -If optional FACE is provided, reset the face to FACE color, -instead of `pulse-highlight-start-face'. -Be sure to call `pulse-reset-face' after calling pulse." - (unwind-protect - (progn - (pulse-reset-face face) - (while (and (pulse-lighten-highlight) - (sit-for pulse-delay)) - nil)))) - ;;; Convenience Functions ;; (defvar pulse-momentary-overlay nil "The current pulsing overlay.") -(defvar pulse-momentary-stop-time nil - "The current stop time.") +(defvar pulse-momentary-timer nil + "The current pulsing timer.") (defun pulse-momentary-highlight-overlay (o &optional face) "Pulse the overlay O, unhighlighting before next command. Optional argument FACE specifies the face to do the highlighting." + ;; We don't support simultaneous highlightings. + (pulse-momentary-unhighlight) (overlay-put o 'original-face (overlay-get o 'face)) - (add-to-list 'pulse-momentary-overlay o) + (setq pulse-momentary-overlay o) (if (eq pulse-flag 'never) nil (if (or (not pulse-flag) (not (pulse-available-p))) @@ -201,42 +191,34 @@ Optional argument FACE specifies the face to do the highlighting." ;; Thus above we put our face on the overlay, but pulse ;; with a reference face needed for the color. (pulse-reset-face face) - (setq pulse-momentary-stop-time (time-add (current-time) - (* pulse-delay - pulse-iterations))) - (let ((timer (run-with-timer 0 pulse-delay #'ignore))) - (timer-set-function timer #'pulse-tick - (list - timer)))))) - -(defun pulse-tick (timer) - (if (time-less-p (current-time) pulse-momentary-stop-time) + (setq pulse-momentary-timer + (run-with-timer 0 pulse-delay #'pulse-tick + (time-add (current-time) + (* pulse-delay pulse-iterations))))))) + +(defun pulse-tick (stop-time) + (if (time-less-p (current-time) stop-time) (pulse-lighten-highlight) - (pulse-momentary-unhighlight) - (cancel-timer timer))) + (pulse-momentary-unhighlight))) (defun pulse-momentary-unhighlight () "Unhighlight a line recently highlighted." - ;; If someone passes in an overlay, then pulse-momentary-overlay - ;; will still be nil, and won't need modifying. (when pulse-momentary-overlay ;; clear the starting face - (mapc - (lambda (ol) - (overlay-put ol 'face (overlay-get ol 'original-face)) - (overlay-put ol 'original-face nil) - ;; Clear the overlay if it needs deleting. - (when (overlay-get ol 'pulse-delete) (delete-overlay ol))) - pulse-momentary-overlay) + (let ((ol pulse-momentary-overlay)) + (overlay-put ol 'face (overlay-get ol 'original-face)) + (overlay-put ol 'original-face nil) + ;; Clear the overlay if it needs deleting. + (when (overlay-get ol 'pulse-delete) (delete-overlay ol))) ;; Clear the variable. - (setq pulse-momentary-overlay nil)) + (setq pulse-momentary-overlay nil) - ;; Reset the pulsing face. - (pulse-reset-face) + ;; Reset the pulsing face. + (pulse-reset-face) - ;; Signal the timer to cancel. - (setq pulse-momentary-stop-time (current-time)) + ;; Cancel the timer. + (cancel-timer pulse-momentary-timer)) ;; Remove this hook. (remove-hook 'pre-command-hook 'pulse-momentary-unhighlight)) commit ada5e6b7a7193404c5baa559b4fc01e2f9d79cbd Author: Glenn Morris Date: Wed May 6 06:19:35 2015 -0400 ; Auto-commit of loaddefs files. diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 1114595..26418e9 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -967,7 +967,7 @@ variable PRINT-FUNCTION. Optional argument NOESCAPE is passed to ;;; Start of automatically extracted autoloads. -;;;### (autoloads nil "eieio-custom" "eieio-custom.el" "813d32fbf76d4248fc6b4dc97ebcd720") +;;;### (autoloads nil "eieio-custom" "eieio-custom.el" "916f54b818479a77a02f3ecccda84a11") ;;; Generated autoloads from eieio-custom.el (autoload 'customize-object "eieio-custom" "\ diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 788fdcc..f1a917d 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -2446,7 +2446,7 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL). See ;;;*** -;;;### (autoloads nil "reftex-cite" "reftex-cite.el" "9e0690737924aef6e3836bc2c42a36c9") +;;;### (autoloads nil "reftex-cite" "reftex-cite.el" "83811ccf3471820f0ad0dc005ffc88d5") ;;; Generated autoloads from reftex-cite.el (autoload 'reftex-default-bibliography "reftex-cite" "\