commit 6e2a4021d3fc0166b72c60088fb2cea01484453c (HEAD, refs/remotes/origin/master) Author: Tassilo Horn Date: Wed Oct 28 08:47:26 2015 +0100 Prettify TeX macros not ending in a word char * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p): Prettify macros which don't end in a word character. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 45afafc..0b13759 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -3410,18 +3410,24 @@ There might be text before point." "A `prettify-symbols-alist' usable for (La)TeX modes.") (defun tex--prettify-symbols-compose-p (_start end _match) - (let* ((after-char (char-after end)) - (after-syntax (char-syntax after-char))) - (not (or - ;; Don't compose \alpha@foo. - (eq after-char ?@) - ;; The \alpha in \alpha2 or \alpha-\beta may be composed but - ;; of course \alphax may not. - (and (eq after-syntax ?w) - (not (memq after-char - '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?+ ?- ?' ?\")))) - ;; Don't compose inside verbatim blocks. - (eq 2 (nth 7 (syntax-ppss))))))) + (or + ;; If the matched symbol doesn't end in a word character, then we + ;; simply allow composition. The symbol is probably something like + ;; \|, \(, etc. + (not (eq ?w (char-syntax (char-before end)))) + ;; Else we look at what follows the match in order to decide. + (let* ((after-char (char-after end)) + (after-syntax (char-syntax after-char))) + (not (or + ;; Don't compose \alpha@foo. + (eq after-char ?@) + ;; The \alpha in \alpha2 or \alpha-\beta may be composed but + ;; of course \alphax may not. + (and (eq after-syntax ?w) + (not (memq after-char + '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?+ ?- ?' ?\")))) + ;; Don't compose inside verbatim blocks. + (eq 2 (nth 7 (syntax-ppss)))))))) (run-hooks 'tex-mode-load-hook) commit 9db11fa2d635935318364370f31821023c2501b9 Author: Dmitry Gutov Date: Wed Oct 28 02:43:14 2015 +0200 ; Revert "Don't declare vc-exec-after anymore" This reverts commit 5e4395544c184d9a8702cf05c7aee9329b0b9482. (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02009.html) diff --git a/lisp/obsolete/vc-arch.el b/lisp/obsolete/vc-arch.el index bdb6975..e6540ce 100644 --- a/lisp/obsolete/vc-arch.el +++ b/lisp/obsolete/vc-arch.el @@ -310,6 +310,10 @@ Only the value `maybe' can be trusted :-(." 'up-to-date 'edited))))))))) +;; dir-status-files called from vc-dir, which loads vc, +;; which loads vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) + (defun vc-arch-dir-status-files (dir _files callback) "Run `tla inventory' for DIR and pass results to CALLBACK. CALLBACK expects (ENTRIES &optional MORE-TO-COME); see diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 40f2516..9b2711d 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -331,6 +331,7 @@ in the repository root directory of FILE." "Value of `compilation-error-regexp-alist' in *vc-bzr* buffers.") ;; To be called via vc-pull from vc.el, which requires vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) (declare-function vc-compilation-mode "vc-dispatcher" (backend)) diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index c0a199d..5f5807f 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -543,6 +543,8 @@ Will fail unless you have administrative privileges on the repo." ;;; (declare-function vc-rcs-print-log-cleanup "vc-rcs" ()) +;; Follows vc-cvs-command, which uses vc-do-command from vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) (defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit) "Print commit log associated with FILES into specified BUFFER. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 0e33896..27898a9 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -461,6 +461,8 @@ or an empty string if none." ;; Follows vc-git-command (or vc-do-async-command), which uses vc-do-command ;; from vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) +;; Follows vc-exec-after. (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) (defun vc-git-dir-status-goto-stage (stage files update-function) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 1550c56..f9957c1 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -631,6 +631,8 @@ REV is the revision to check out into WORKFILE." ;; Follows vc-hg-command (or vc-do-async-command), which uses vc-do-command ;; from vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) +;; Follows vc-exec-after. (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) (defun vc-hg-dir-status-files (dir files update-function) diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index 3197d60..b56a08f 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -138,6 +138,10 @@ switches." ((match-end 2) (push (list (match-string 3) 'added) result)))) (funcall update-function result))) +;; dir-status-files called from vc-dir, which loads vc, +;; which loads vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) + (defun vc-mtn-dir-status-files (dir _files update-function) (vc-mtn-command (current-buffer) 'async dir "status") (vc-run-delayed diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 2ec65a1..4ef63a2 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -208,6 +208,10 @@ switches." (setq result (cons (list filename state) result))))) (funcall callback result))) +;; dir-status-files called from vc-dir, which loads vc, +;; which loads vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) + (autoload 'vc-expand-dirs "vc") (defun vc-svn-dir-status-files (_dir files callback) commit b1d39288e5845be744dcf8ac3c26631c1009dba1 Author: Dmitry Gutov Date: Wed Oct 28 02:42:51 2015 +0200 Pipe Hg commit descriptions through 'tabindent' * lisp/vc/vc-hg.el (vc-hg-log-format): Pipe commit description through 'tabindent'. (vc-hg-log-view-mode): Set tab-width to 2 locally. (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02259.html) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 8d9493e..1550c56 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -264,7 +264,7 @@ highlighting the Log View buffer." "{if(parents, 'parents: {parents}\n')}" "user: {author}\n" "Date: {date|date}\n" - "summary: {desc}\n\n") + "summary: {desc|tabindent}\n\n") "Mercurial log template for `vc-hg-print-log' long format.") (defun vc-hg-print-log (files buffer &optional shortlog start-revision limit) @@ -305,6 +305,7 @@ If LIMIT is non-nil, show no more than this many entries." (if (eq vc-log-view-type 'short) (cadr vc-hg-root-log-format) "^changeset:[ \t]*\\([0-9]+\\):\\(.+\\)")) + (set (make-local-variable 'tab-width) 2) ;; Allow expanding short log entries (when (eq vc-log-view-type 'short) (setq truncate-lines t) commit 692bce5b9eccfae19ae2a5a23a9ccd8d6bf86076 Author: Stefan Monnier Date: Tue Oct 27 20:25:55 2015 -0400 * lisp/net/tramp-smb.el: Avoid using `add-to-list' on a let-local var * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use `delete-dups'. * lisp/net/tramp.el (auto-save-file-name-transforms): Declare. diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 5910d1f..c0a6b6a 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -649,8 +649,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (directory &optional full match nosort) "Like `directory-files' for Tramp files." (let ((result (mapcar 'directory-file-name - (file-name-all-completions "" directory))) - res) + (file-name-all-completions "" directory)))) ;; Discriminate with regexp. (when match (setq result @@ -665,9 +664,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." result))) ;; Sort them if necessary. (unless nosort (setq result (sort result 'string-lessp))) - ;; Remove double entries. - (dolist (elt result res) - (add-to-list 'res elt 'append)))) + (delete-dups result))) (defun tramp-smb-handle-expand-file-name (name &optional dir) "Like `expand-file-name' for Tramp files." diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 30a7269..2f811bb 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4043,6 +4043,7 @@ Return the local name of the temporary file." 'tramp-delete-temp-file-function))) ;;; Auto saving to a special directory: +(defvar auto-save-file-name-transforms) (defun tramp-handle-make-auto-save-file-name () "Like `make-auto-save-file-name' for Tramp files. commit 3f4a192ba6f74237736fb287038f560ca22d7d22 Author: Stefan Monnier Date: Tue Oct 27 20:23:32 2015 -0400 * lisp/international/ccl.el: Use lexical-binding (ccl-compile-if): Remove unused var `false-ic'. (ccl-compile-write-repeat): Remove unused var `i'. (ccl-compile-map-single): Remove unused var `id'. (ccl-dump, ccl-dump-binary): Use explicit let-binding to bind the dynamic var `ccl-code'. diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index daba2b6..2fcbc88 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el @@ -1,4 +1,4 @@ -;;; ccl.el --- CCL (Code Conversion Language) compiler +;;; ccl.el --- CCL (Code Conversion Language) compiler -*- lexical-binding:t -*- ;; Copyright (C) 1997-1998, 2001-2015 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -479,8 +479,7 @@ If READ-FLAG is non-nil, this statement has the form (let ((condition (nth 1 cmd)) (true-cmds (nth 2 cmd)) (false-cmds (nth 3 cmd)) - jump-cond-address - false-ic) + jump-cond-address) (if (and (listp condition) (listp (car condition))) ;; If CONDITION is a nested expression, the inner expression @@ -678,8 +677,7 @@ is a list of CCL-BLOCKs." (ccl-embed-code 'write-const-jump 0 ccl-loop-head) (ccl-embed-data arg)) ((stringp arg) - (let ((len (length arg)) - (i 0)) + (let ((len (length arg))) (ccl-embed-code 'write-string-jump 0 ccl-loop-head) (ccl-embed-data len) (ccl-embed-string len arg))) @@ -920,8 +918,7 @@ is a list of CCL-BLOCKs." (error "CCL: Invalid number of arguments: %s" cmd)) (let ((RRR (nth 1 cmd)) (rrr (nth 2 cmd)) - (map (nth 3 cmd)) - id) + (map (nth 3 cmd))) (ccl-check-register rrr cmd) (ccl-check-register RRR cmd) (ccl-embed-extended-command 'map-single rrr RRR 0) @@ -962,10 +959,11 @@ is a list of CCL-BLOCKs." (defvar ccl-code) ;;;###autoload -(defun ccl-dump (ccl-code) - "Disassemble compiled CCL-CODE." - (let ((len (length ccl-code)) - (buffer-mag (aref ccl-code 0))) +(defun ccl-dump (code) + "Disassemble compiled CCL-code CODE." + (let* ((ccl-code code) + (len (length ccl-code)) + (buffer-mag (aref ccl-code 0))) (cond ((= buffer-mag 0) (insert (substitute-command-keys "Don't output anything.\n"))) ((= buffer-mag 1) @@ -1005,7 +1003,7 @@ is a list of CCL-BLOCKs." (defun ccl-dump-set-short-const (rrr cc) (insert (format "r%d = %d\n" rrr cc))) -(defun ccl-dump-set-const (rrr ignore) +(defun ccl-dump-set-const (rrr _ignore) (insert (format "r%d = %d\n" rrr (ccl-get-next-code)))) (defun ccl-dump-set-array (rrr cc) @@ -1019,7 +1017,7 @@ is a list of CCL-BLOCKs." (setq i (1+ i))) (insert "\n"))) -(defun ccl-dump-jump (ignore cc &optional address) +(defun ccl-dump-jump (_ignore cc &optional address) (insert (format "jump to %d(" (+ (or address ccl-current-ic) cc))) (if (>= cc 0) (insert "+")) @@ -1042,13 +1040,13 @@ is a list of CCL-BLOCKs." (defun ccl-extract-arith-op (cc) (aref ccl-arith-table (ash cc -6))) -(defun ccl-dump-write-expr-const (ignore cc) +(defun ccl-dump-write-expr-const (_ignore cc) (insert (format "write (r%d %s %d)\n" (logand cc 7) (ccl-extract-arith-op cc) (ccl-get-next-code)))) -(defun ccl-dump-write-expr-register (ignore cc) +(defun ccl-dump-write-expr-register (_ignore cc) (insert (format "write (r%d %s r%d)\n" (logand cc 7) (ccl-extract-arith-op cc) @@ -1059,7 +1057,7 @@ is a list of CCL-BLOCKs." ((= cc ?\n) (insert " \"^J\"")) (t (insert (format " \"%c\"" cc))))) -(defun ccl-dump-write-const-jump (ignore cc) +(defun ccl-dump-write-const-jump (_ignore cc) (let ((address ccl-current-ic)) (insert "write char") (ccl-dump-insert-char (ccl-get-next-code)) @@ -1075,7 +1073,7 @@ is a list of CCL-BLOCKs." (ccl-get-next-code) ; Skip dummy READ-JUMP )) -(defun ccl-dump-write-string-jump (ignore cc) +(defun ccl-dump-write-string-jump (_ignore cc) (let ((address ccl-current-ic) (len (ccl-get-next-code)) (i 0)) @@ -1125,7 +1123,7 @@ is a list of CCL-BLOCKs." (defun ccl-dump-write-register (rrr cc) (insert (format "write r%d (%d remaining)\n" rrr cc))) -(defun ccl-dump-call (ignore cc) +(defun ccl-dump-call (_ignore _cc) (let ((subroutine (car (ccl-get-next-code)))) (insert (format-message "call subroutine `%s'\n" subroutine)))) @@ -1160,7 +1158,7 @@ is a list of CCL-BLOCKs." (setq i (1+ i))) (insert "\n"))) -(defun ccl-dump-end (&rest ignore) +(defun ccl-dump-end (&rest _ignore) (insert "end\n")) (defun ccl-dump-set-assign-expr-const (rrr cc) @@ -1213,9 +1211,10 @@ is a list of CCL-BLOCKs." (insert (format "read r%d, " rrr)) (ccl-dump-jump-cond-expr-register rrr cc)) -(defun ccl-dump-binary (ccl-code) - (let ((len (length ccl-code)) - (i 2)) +(defun ccl-dump-binary (code) + (let* ((ccl-code code) + (len (length ccl-code)) + (i 2)) (while (< i len) (let ((code (aref ccl-code i)) (j 27)) @@ -1235,28 +1234,28 @@ is a list of CCL-BLOCKs." (insert (format "<%s> " ex-op)) (funcall (get ex-op 'ccl-dump-function) rrr RRR Rrr))) -(defun ccl-dump-read-multibyte-character (rrr RRR Rrr) +(defun ccl-dump-read-multibyte-character (rrr RRR _Rrr) (insert (format "read-multibyte-character r%d r%d\n" RRR rrr))) -(defun ccl-dump-write-multibyte-character (rrr RRR Rrr) +(defun ccl-dump-write-multibyte-character (rrr RRR _Rrr) (insert (format "write-multibyte-character r%d r%d\n" RRR rrr))) (defun ccl-dump-translate-character (rrr RRR Rrr) (insert (format "translation table(r%d) r%d r%d\n" Rrr RRR rrr))) -(defun ccl-dump-translate-character-const-tbl (rrr RRR Rrr) +(defun ccl-dump-translate-character-const-tbl (rrr RRR _Rrr) (let ((tbl (ccl-get-next-code))) (insert (format "translation table(%S) r%d r%d\n" tbl RRR rrr)))) -(defun ccl-dump-lookup-int-const-tbl (rrr RRR Rrr) +(defun ccl-dump-lookup-int-const-tbl (rrr RRR _Rrr) (let ((tbl (ccl-get-next-code))) (insert (format "hash table(%S) r%d r%d\n" tbl RRR rrr)))) -(defun ccl-dump-lookup-char-const-tbl (rrr RRR Rrr) +(defun ccl-dump-lookup-char-const-tbl (rrr RRR _Rrr) (let ((tbl (ccl-get-next-code))) (insert (format "hash table(%S) r%d r%d\n" tbl RRR rrr)))) -(defun ccl-dump-iterate-multiple-map (rrr RRR Rrr) +(defun ccl-dump-iterate-multiple-map (rrr RRR _Rrr) (let ((notbl (ccl-get-next-code)) (i 0) id) (insert (format "iterate-multiple-map r%d r%d\n" RRR rrr)) @@ -1267,7 +1266,7 @@ is a list of CCL-BLOCKs." (setq i (1+ i))) (insert "]\n"))) -(defun ccl-dump-map-multiple (rrr RRR Rrr) +(defun ccl-dump-map-multiple (rrr RRR _Rrr) (let ((notbl (ccl-get-next-code)) (i 0) id) (insert (format "map-multiple r%d r%d\n" RRR rrr)) @@ -1280,7 +1279,7 @@ is a list of CCL-BLOCKs." (setq i (1+ i))) (insert "]\n"))) -(defun ccl-dump-map-single (rrr RRR Rrr) +(defun ccl-dump-map-single (rrr RRR _Rrr) (let ((id (ccl-get-next-code))) (insert (format "map-single r%d r%d map(%S)\n" RRR rrr id)))) commit 449e351b1cc0cd9e3bac1ade36eb12b226fbed76 Author: Stefan Monnier Date: Tue Oct 27 20:19:51 2015 -0400 * lisp/json.el (json-new-object): Optimize trivial `list' call diff --git a/lisp/json.el b/lisp/json.el index e2c7cc7..b23d12a 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -358,7 +358,7 @@ Please see the documentation of `json-object-type'." (cond ((eq json-object-type 'hash-table) (make-hash-table :test 'equal)) (t - (list)))) + ()))) (defun json-add-to-object (object key value) "Add a new KEY -> VALUE association to OBJECT. commit 4eb1e7f96b6c3758c321aed7523502089a8ede74 Author: Stefan Monnier Date: Tue Oct 27 20:18:45 2015 -0400 * lisp/help.el: Fix bug with incorrect arglist string (help-add-fundoc-usage): Don't mistake a mis-formatted string for a list. diff --git a/lisp/help.el b/lisp/help.el index 3387628..c558b65 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1394,9 +1394,10 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"." (if (string-match "\n?\n\\'" docstring) (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "") "\n\n") - (if (and (stringp arglist) - (string-match "\\`([^ ]+\\(.*\\))\\'" arglist)) - (concat "(fn" (match-string 1 arglist) ")") + (if (stringp arglist) + (if (string-match "\\`[^ ]+\\(.*\\))\\'" arglist) + (concat "(fn" (match-string 1 arglist) ")") + (error "Unrecognized usage format")) (help--make-usage-docstring 'fn arglist))))) (defun help-function-arglist (def &optional preserve-names) commit 1ec995ced2712e7e8df5ed7ac08cf63f3b89c78f Author: Stefan Monnier Date: Tue Oct 27 20:15:31 2015 -0400 * lisp/gnus/gnus-topic.el: Silence some warnings (gnus-topic-prepare-topic): Remove unused var `topic'. (gnus-topic-remove-topic): Mark unused arg `hide'. (gnus-tmp-header): Declare. (gnus-topic-goto-missing-group): Remove unused var `entry'. (gnus-topic-unmark-topic): Mark unused arg `dummy'. (gnus-topic-copy-matching): Mark unused arg `copyp'. Move initialization of `topic' into its declaration. diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index 7c6e109..b989783 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -508,7 +508,6 @@ articles in the topic and its subtopics." (all-entries entries) (point-max (point-max)) (unread 0) - (topic (car type)) info entry end active tick) ;; Insert any sub-topics. (while topicl @@ -586,7 +585,7 @@ articles in the topic and its subtopics." (goto-char end) unread)) -(defun gnus-topic-remove-topic (&optional insert total-remove hide in-level) +(defun gnus-topic-remove-topic (&optional insert total-remove _hide in-level) "Remove the current topic." (let ((topic (gnus-group-topic-name)) (level (gnus-group-topic-level)) @@ -631,6 +630,8 @@ articles in the topic and its subtopics." (or insert (not (gnus-topic-visible-p))) nil nil 9) (gnus-topic-enter-dribble))))))) +(defvar gnus-tmp-header) + (defun gnus-topic-insert-topic-line (name visiblep shownp level entries &optional unread) (let* ((visible (if visiblep "" "...")) @@ -694,8 +695,7 @@ articles in the topic and its subtopics." (let* ((topic (gnus-group-topic group)) (groups (cdr (assoc topic gnus-topic-alist))) (g (cdr (member group groups))) - (unfound t) - entry) + (unfound t)) ;; Try to jump to a visible group. (while (and g (not (gnus-group-goto-group (car g) t))) @@ -1454,7 +1454,7 @@ If NON-RECURSIVE (which is the prefix) is t, don't mark its subtopics." (funcall (if unmark 'gnus-group-remove-mark 'gnus-group-set-mark) (gnus-info-group (nth 2 (pop groups))))))))) -(defun gnus-topic-unmark-topic (topic &optional dummy non-recursive) +(defun gnus-topic-unmark-topic (topic &optional _dummy non-recursive) "Remove the process mark from all groups in the TOPIC. If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics." (interactive (list (gnus-group-topic-name) @@ -1488,15 +1488,14 @@ If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics." (gnus-group-mark-regexp regexp) (gnus-topic-move-group nil topic copyp)) -(defun gnus-topic-copy-matching (regexp topic &optional copyp) +(defun gnus-topic-copy-matching (regexp topic &optional _copyp) "Copy all groups that match REGEXP to some topic." (interactive - (let (topic) + (let ((topic (gnus-completing-read "Copy to topic" + (mapcar #'car gnus-topic-alist) t))) (nreverse - (list - (setq topic (gnus-completing-read "Copy to topic" - (mapcar 'car gnus-topic-alist) t)) - (read-string (format "Copy to %s (regexp): " topic)))))) + (list topic + (read-string (format "Copy to %s (regexp): " topic)))))) (gnus-topic-move-matching regexp topic t)) (defun gnus-topic-delete (topic) commit e166a701dd6263f29d9787deaf53d93f27557baa Author: Stephen Leake Date: Tue Oct 27 10:35:15 2015 -0500 Minor CEDET fixes * lisp/cedet/cedet-global.el (cedet-gnu-global-gtags-call): Handle warnings from gtags about invalid options. (cedet-gnu-global-create/update-database): Do incremental update properly. * lisp/cedet/ede/generic.el (ede-enable-generic-projects): Get monotone root right. diff --git a/lisp/cedet/cedet-global.el b/lisp/cedet/cedet-global.el index 3773ba0..3ceed5d 100644 --- a/lisp/cedet/cedet-global.el +++ b/lisp/cedet/cedet-global.el @@ -97,7 +97,7 @@ SCOPE is the scope of the search, such as 'project or 'subdirs." ;; Check for warnings. (with-current-buffer b (goto-char (point-min)) - (when (re-search-forward "Error\\|Warning" nil t) + (when (re-search-forward "Error\\|Warning\\|invalid" nil t) (error "Output:\n%S" (buffer-string)))) b)) @@ -186,12 +186,14 @@ If a database already exists, then just update it." (let ((root (cedet-gnu-global-root dir))) (if root (setq dir root)) (let ((default-directory dir)) - (cedet-gnu-global-gtags-call - (when root - '("-u");; Incremental update flag. - )) - ) - )) + (if root + ;; Incremental update. This can be either "gtags -i" or + ;; "global -u"; the gtags manpage says it's better to use + ;; "global -u". + (cedet-gnu-global-call (list "-u")) + (cedet-gnu-global-gtags-call nil) + ) + ))) (provide 'cedet-global) diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el index b865ff5..d3be545 100644 --- a/lisp/cedet/ede/generic.el +++ b/lisp/cedet/ede/generic.el @@ -303,7 +303,7 @@ CLASS is the EIEIO class that is used to track this project. It should subclass (ede-generic-new-autoloader "generic-cvs" "Generic CVS" "CVS" 'ede-generic-vc-project) (ede-generic-new-autoloader "generic-mtn" "Generic Monotone" - "_MTN/options" 'ede-generic-vc-project) + "_MTN" 'ede-generic-vc-project) ;; Take advantage of existing 'projectile' based projects. ;; @TODO - if projectile supports compile commands etc, can we commit f72ac3591b10cea65ea0969396995b97a887e571 Author: Michael Albinus Date: Tue Oct 27 16:06:33 2015 +0100 ; Fix comments in file-notify-tests.el diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index f411c6b..222bdc5 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -459,8 +459,8 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." (should auto-revert-use-notify) (should auto-revert-notify-watch-descriptor) - ;; Modify file. We wait for a second, in order to - ;; have another timestamp. + ;; Modify file. We wait for a second, in order to have + ;; another timestamp. (with-current-buffer (get-buffer-create "*Messages*") (narrow-to-region (point-max) (point-max))) (sleep-for 1) @@ -483,8 +483,8 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." (should-not auto-revert-use-notify) (should-not auto-revert-notify-watch-descriptor) - ;; Modify file. We wait for a second, in order to - ;; have another timestamp. + ;; Modify file. We wait for two seconds, in order to have + ;; another timestamp. One second seems to be too short. (with-current-buffer (get-buffer-create "*Messages*") (narrow-to-region (point-max) (point-max))) (sleep-for 2) commit 838023d469054cc19d0a2b7cf48e39082d8220f0 Author: Michael Albinus Date: Tue Oct 27 16:02:26 2015 +0100 Fall back to polling in autorevert when needed * lisp/autorevert.el (auto-revert-notify-handler): When a `stopped' event arrives from file notification, fall back to polling. * test/automated/file-notify-tests.el (file-notify-test03-autorevert): Extend test for polling when file notification ceases to work. diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 37ee8ee..f0c12d2 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -570,37 +570,54 @@ no more reverts are possible until the next call of ;; Since we watch a directory, a file name must be returned. (cl-assert (stringp file)) (when (eq action 'renamed) (cl-assert (stringp file1))) - ;; Loop over all buffers, in order to find the intended one. - (cl-dolist (buffer buffers) - (when (buffer-live-p buffer) - (with-current-buffer buffer - (when (or - ;; A buffer associated with a file. - (and (stringp buffer-file-name) - (or - (and (memq action '(attribute-changed changed created)) - (string-equal - (file-name-nondirectory file) - (file-name-nondirectory buffer-file-name))) - (and (eq action 'renamed) - (string-equal - (file-name-nondirectory file1) - (file-name-nondirectory buffer-file-name))))) - ;; A buffer w/o a file, like dired. - (and (null buffer-file-name) - (memq action '(created renamed deleted)))) - ;; Mark buffer modified. - (setq auto-revert-notify-modified-p t) - - ;; Revert the buffer now if we're not locked out. - (when (/= auto-revert-buffers-counter-lockedout - auto-revert-buffers-counter) - (auto-revert-handler) - (setq auto-revert-buffers-counter-lockedout - auto-revert-buffers-counter)) - - ;; No need to check other buffers. - (cl-return)))))))) + + (if (eq action 'stopped) + ;; File notification has stopped. Continue with polling. + (cl-dolist (buffer buffers) + (with-current-buffer buffer + (when (or + ;; A buffer associated with a file. + (and (stringp buffer-file-name) + (string-equal + (file-name-nondirectory file) + (file-name-nondirectory buffer-file-name))) + ;; A buffer w/o a file, like dired. + (null buffer-file-name)) + (auto-revert-notify-rm-watch) + (setq-local auto-revert-use-notify nil)))) + + ;; Loop over all buffers, in order to find the intended one. + (cl-dolist (buffer buffers) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (when (or + ;; A buffer associated with a file. + (and (stringp buffer-file-name) + (or + (and (memq + action '(attribute-changed changed created)) + (string-equal + (file-name-nondirectory file) + (file-name-nondirectory buffer-file-name))) + (and (eq action 'renamed) + (string-equal + (file-name-nondirectory file1) + (file-name-nondirectory buffer-file-name))))) + ;; A buffer w/o a file, like dired. + (and (null buffer-file-name) + (memq action '(created renamed deleted)))) + ;; Mark buffer modified. + (setq auto-revert-notify-modified-p t) + + ;; Revert the buffer now if we're not locked out. + (when (/= auto-revert-buffers-counter-lockedout + auto-revert-buffers-counter) + (auto-revert-handler) + (setq auto-revert-buffers-counter-lockedout + auto-revert-buffers-counter)) + + ;; No need to check other buffers. + (cl-return))))))))) (defun auto-revert-active-p () "Check if auto-revert is active (in current buffer or globally)." diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index 472c692..f411c6b 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -461,6 +461,8 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." ;; Modify file. We wait for a second, in order to ;; have another timestamp. + (with-current-buffer (get-buffer-create "*Messages*") + (narrow-to-region (point-max) (point-max))) (sleep-for 1) (write-region "another text" nil file-notify--test-tmpfile nil 'no-message) @@ -472,9 +474,34 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." (string-match (format-message "Reverting buffer `%s'." (buffer-name buf)) (buffer-string)))) - (should (string-match "another text" (buffer-string))))) + (should (string-match "another text" (buffer-string))) + + ;; Stop file notification. Autorevert shall still work via polling. + (file-notify-rm-watch auto-revert-notify-watch-descriptor) + (file-notify--wait-for-events + timeout (null auto-revert-use-notify)) + (should-not auto-revert-use-notify) + (should-not auto-revert-notify-watch-descriptor) + + ;; Modify file. We wait for a second, in order to + ;; have another timestamp. + (with-current-buffer (get-buffer-create "*Messages*") + (narrow-to-region (point-max) (point-max))) + (sleep-for 2) + (write-region + "foo bla" nil file-notify--test-tmpfile nil 'no-message) + + ;; Check, that the buffer has been reverted. + (with-current-buffer (get-buffer-create "*Messages*") + (file-notify--wait-for-events + timeout + (string-match + (format-message "Reverting buffer `%s'." (buffer-name buf)) + (buffer-string)))) + (should (string-match "foo bla" (buffer-string))))) ;; Cleanup. + (with-current-buffer "*Messages*" (widen)) (ignore-errors (kill-buffer buf)) (file-notify--test-cleanup)))) commit 99ded6be7afe843d7abc0e255fe36b684435cfd7 Author: Dmitry Gutov Date: Tue Oct 27 14:55:06 2015 +0200 Show full commit messages in 'hg log' when appropriate * lisp/vc/vc-hg.el (vc-hg-log-format): New variable. (vc-hg-print-log, vc-hg-expanded-log-entry): Use it. (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02191.html) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index c4d6092..8d9493e 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -259,6 +259,14 @@ highlighting the Log View buffer." (defvar vc-hg-log-graph nil "If non-nil, use `--graph' in the short log output.") +(defvar vc-hg-log-format (concat "changeset: {rev}:{node|short}\n" + "{tags % 'tag: {tag}\n'}" + "{if(parents, 'parents: {parents}\n')}" + "user: {author}\n" + "Date: {date|date}\n" + "summary: {desc}\n\n") + "Mercurial log template for `vc-hg-print-log' long format.") + (defun vc-hg-print-log (files buffer &optional shortlog start-revision limit) "Print commit log associated with FILES into specified BUFFER. If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'. @@ -276,9 +284,11 @@ If LIMIT is non-nil, show no more than this many entries." (nconc (when start-revision (list (format "-r%s:0" start-revision))) (when limit (list "-l" (format "%s" limit))) - (when shortlog `(,@(if vc-hg-log-graph '("--graph")) - "--template" - ,(car vc-hg-root-log-format))) + (if shortlog + `(,@(if vc-hg-log-graph '("--graph")) + "--template" + ,(car vc-hg-root-log-format)) + `("--template" ,vc-hg-log-format)) vc-hg-log-switches))))) (defvar log-view-message-re) @@ -345,7 +355,7 @@ If LIMIT is non-nil, show no more than this many entries." (defun vc-hg-expanded-log-entry (revision) (with-temp-buffer - (vc-hg-command t nil nil "log" "-r" revision) + (vc-hg-command t nil nil "log" "-r" revision "--template" vc-hg-log-format) (goto-char (point-min)) (unless (eobp) ;; Indent the expanded log entry. commit f642a81acdfc402805c26d00d05d977c2fb7da8c Author: Nicolas Petton Date: Tue Oct 27 13:41:32 2015 +0100 Use a plain svg file for the icon * etc/images/icons/hicolor/scalable/apps/emacs.svg: Use a plain SVG format instead of the Inkscape SVG format. diff --git a/etc/images/icons/hicolor/scalable/apps/emacs.svg b/etc/images/icons/hicolor/scalable/apps/emacs.svg index 9de91c6..5274204 100644 --- a/etc/images/icons/hicolor/scalable/apps/emacs.svg +++ b/etc/images/icons/hicolor/scalable/apps/emacs.svg @@ -6,45 +6,19 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - version="1.0" - width="48" - height="48" - viewBox="0.171 0.201 512 512" - id="svg4768" xml:space="preserve" - inkscape:version="0.91 r13725" - sodipodi:docname="emacs.svg" - inkscape:export-filename="/home/nico/work/emacs/etc/images/icons/hicolor/16x16/apps/emacs.png" - inkscape:export-xdpi="30" - inkscape:export-ydpi="30">image/svg+xml