commit d5e827929c5f25ccfe68a420bfc45305b06ae5cf (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Mon Feb 15 21:59:40 2016 -0800 Provide 'term/name in lisp/term files. * lisp/term/AT386.el, lisp/term/bobcat.el, lisp/term/cygwin.el: * lisp/term/internal.el, lisp/term/iris-ansi.el, lisp/term/linux.el: * lisp/term/lk201.el, lisp/term/news.el, lisp/term/ns-win.el: * lisp/term/pc-win.el, lisp/term/rxvt.el, lisp/term/screen.el: * lisp/term/sun.el, lisp/term/tty-colors.el, lisp/term/tvi970.el: * lisp/term/vt100.el, lisp/term/vt200.el, lisp/term/w32-win.el: * lisp/term/w32console.el, lisp/term/wyse50.el, lisp/term/x-win.el: For consistency, provide 'term/name in all files that don't already. diff --git a/lisp/term/AT386.el b/lisp/term/AT386.el index 7f46f61..6346942 100644 --- a/lisp/term/AT386.el +++ b/lisp/term/AT386.el @@ -54,4 +54,6 @@ (define-key local-function-key-map [ALT] [27]) )) +(provide 'term/AT386) + ;;; AT386.el ends here diff --git a/lisp/term/bobcat.el b/lisp/term/bobcat.el index f26dc6b..a32da6a 100644 --- a/lisp/term/bobcat.el +++ b/lisp/term/bobcat.el @@ -5,4 +5,6 @@ (keyboard-translate ?\177 ?\^h) (keyboard-translate ?\^h ?\177)) +(provide 'term/bobcat) + ;;; bobcat.el ends here diff --git a/lisp/term/cygwin.el b/lisp/term/cygwin.el index d69433a..edc64b4 100644 --- a/lisp/term/cygwin.el +++ b/lisp/term/cygwin.el @@ -6,4 +6,6 @@ "Terminal initialization function for cygwin." (tty-no-underline)) +(provide 'term/cygwin) + ;;; cygwin.el ends here diff --git a/lisp/term/internal.el b/lisp/term/internal.el index f026c66..f73a107 100644 --- a/lisp/term/internal.el +++ b/lisp/term/internal.el @@ -604,4 +604,6 @@ list. You can (and should) also run it if and when the value of (run-hooks 'dos-codepage-setup-hook) )) +(provide 'term/internal) + ;;; internal.el ends here diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index ee63864..5217e42 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el @@ -327,4 +327,6 @@ (set-keymap-parent m (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map m))) +(provide 'term/iris-ansi) + ;;; iris-ansi.el ends here diff --git a/lisp/term/linux.el b/lisp/term/linux.el index 00bcdfd..70730dc 100644 --- a/lisp/term/linux.el +++ b/lisp/term/linux.el @@ -19,4 +19,6 @@ ;; The arg only matters in that it is not t or nil. (set-input-meta-mode 'iso-latin-1)) +(provide 'term/linux) + ;;; linux.el ends here diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index 6b9e130..aab4110 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el @@ -80,4 +80,6 @@ (set-keymap-parent m (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map m))) +(provide 'term/lk201) + ;;; lk201.el ends here diff --git a/lisp/term/news.el b/lisp/term/news.el index b66e000..5738644 100644 --- a/lisp/term/news.el +++ b/lisp/term/news.el @@ -66,4 +66,6 @@ (define-key news-fkey-prefix "x" [kp-8]) )) +(provide 'term/news) + ;;; news.el ends here diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index e737131..452c68d 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -936,5 +936,6 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") (ns-get-selection selection-symbol target-type)) (provide 'ns-win) +(provide 'term/ns-win) ;;; ns-win.el ends here diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 8ca98c6..031768c 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -388,5 +388,6 @@ Errors out because it is not supposed to be called, ever." ;; --------------------------------------------------------------------------- (provide 'pc-win) +(provide 'term/pc-win) ;;; pc-win.el ends here diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index da26d30..97d3865 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el @@ -195,4 +195,6 @@ (* (apply '+ (car (cddr (nth 15 rxvt-standard-colors)))) 0.6)) (set-terminal-parameter nil 'background-mode 'dark))))) +(provide 'term/rxvt) + ;;; rxvt.el ends here diff --git a/lisp/term/screen.el b/lisp/term/screen.el index 7f68115..d7ee770 100644 --- a/lisp/term/screen.el +++ b/lisp/term/screen.el @@ -20,4 +20,6 @@ it runs, which can change when the screen session is moved to another tty." (let ((xterm-extra-capabilities xterm-screen-extra-capabilities)) (tty-run-terminal-initialization (selected-frame) "xterm"))) +(provide 'term/screen) + ;; screen.el ends here diff --git a/lisp/term/sun.el b/lisp/term/sun.el index 7fb8e7e..ef40db1 100644 --- a/lisp/term/sun.el +++ b/lisp/term/sun.el @@ -158,4 +158,6 @@ (eval (car hooks)) (setq hooks (cdr hooks)))))) +(provide 'term/sun) + ;;; sun.el ends here diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el index 3ea26b8..a886950 100644 --- a/lisp/term/tty-colors.el +++ b/lisp/term/tty-colors.el @@ -1035,4 +1035,6 @@ A color is considered gray if the 3 components of its RGB value are equal." (setq colors (cdr colors))) count)) +(provide 'term/tty-colors) + ;;; tty-colors.el ends here diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index 1173f9f..e25a3b6 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el @@ -115,4 +115,6 @@ which the keypad's keys act as ordinary digits." (send-string-to-terminal (if (terminal-parameter nil 'tvi970-keypad-numeric) "\e=" "\e>"))) +(provide 'term/tvi970) + ;;; tvi970.el ends here diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el index fb46c99..16a1c27 100644 --- a/lisp/term/vt100.el +++ b/lisp/term/vt100.el @@ -48,4 +48,6 @@ switch to 132-column mode if ARG is omitted or nil." (send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l")) (set-frame-width terminal-frame (if vt100-wide-mode 132 80))) +(provide 'term/vt100) + ;;; vt100.el ends here diff --git a/lisp/term/vt200.el b/lisp/term/vt200.el index 5502668..dde2e22 100644 --- a/lisp/term/vt200.el +++ b/lisp/term/vt200.el @@ -7,4 +7,6 @@ (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. (define-key local-function-key-map [f11] [?\e])) +(provide 'term/vt200) + ;;; vt200.el ends here diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 134e310..8f3eaa2 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -463,5 +463,6 @@ That includes all Windows systems except for 9X/Me." (getenv "SystemRoot")) (provide 'w32-win) +(provide 'term/w32-win) ;;; w32-win.el ends here diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el index b7e0a22..bf1550f 100644 --- a/lisp/term/w32console.el +++ b/lisp/term/w32console.el @@ -93,4 +93,6 @@ (tty-set-up-initial-frame-faces) (run-hooks 'terminal-init-w32-hook)) +(provide 'term/w32console) + ;;; w32console.el ends here diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el index 3e1055a..d3ee7a0 100644 --- a/lisp/term/wyse50.el +++ b/lisp/term/wyse50.el @@ -155,4 +155,6 @@ M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar" ;; (nth 1 key-definition))) (fset 'enable-arrow-keys nil)) +(provide 'term/wyse50) + ;;; wyse50.el ends here diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 59df14d..c8e79e3 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -1487,5 +1487,6 @@ This uses `icon-map-list' to map icon file names to stock icon names." (global-set-key [XF86WakeUp] 'ignore) (provide 'x-win) +(provide 'term/x-win) ;;; x-win.el ends here commit 220613e089ec012ae4ab319637365132ce8dc306 Merge: ca03b85 d4b93e1 Author: John Wiegley Date: Mon Feb 15 14:11:03 2016 -0800 Merge from origin/emacs-25 d4b93e1 Minor fixes in global-auto-composition-mode 02b037b Allow arithmetic operators inside C++ template constructs. 44b16f6 Avoid crashes in semi-malformed 'condition-case' 652e5b4 Allow arithmetic operators inside C++ template constructs. d9ea795 Fix regression with 'recent-keys' and keyboard macros 903603f Fix wording in a doc-view.el comment cf79616 ; Spelling fixes f8bf1b3 CONTRIBUTE cleanups and updates f3aaca3 Port USE_STACK_LISP_OBJECTS fix to Clang 1834ac7 Port to x86 GCC 4.3.1 and earlier 8482949 Fix point movement under 'scroll-conservatively' c1313b5 Replace colon in file name (not legal on Windows) f7af26c Fix a typo in edt.texi 8badf95 Make 'mmap_realloc' on MS-Windows more reliable 856cd94 Grep alias `all' shall not match parent directory commit ca03b85b9c1b8908f2651eaf594780c7b5217f61 Merge: c79978f cc6d906 Author: John Wiegley Date: Mon Feb 15 14:10:37 2016 -0800 ; Merge from origin/emacs-25 The following commits were skipped: cc6d906 ; Auto-commit of ChangeLog files. 1af4493 ; Auto-commit of loaddefs files. 23ca48d Bump version to 25.0.91 commit c79978fcad84052edbdb78b33f2eaa913acb7cb0 Merge: 73e9edf dacde7e Author: John Wiegley Date: Mon Feb 15 14:10:25 2016 -0800 Merge from origin/emacs-25 dacde7e * etc/AUTHORS: Update the AUTHORS file 478ca5d ; fix changelog entries 2b7d006 ; make change-history-commit 851decb * lisp/dired-aux.el: Require cl-lib. (Bug#22613) 47896c8 ; Improve commentary in insdel.c 53ca1e1 Index tilde characters in names of backup files d97f522 Document deprecation of hi-lock-mode's 'C-x w' bindings b55f06d ; * etc/NEWS: Use double spaces to end a sentence. 28bb214 Announce that the `C-x w' bindings are deprecated 1c98f98 Suppress GNUstep hardening d82f24b Fix redisplay after a large insertion 85a2753 Revert "Fix gnus-group-get-new-news-this-group on group with closed server" e8e3db0 ; Improve merge documentation in CONTRIBUTE 5be9989 * lib-src/make-docfile.c: Include stdarg.h. c95ebbf Extend gpm-mouse-mode's doc string and doc to point out limitations. commit 73e9edf8d177af9a008faf9642512042c074706a Merge: a644fa3 a91b4b5 Author: John Wiegley Date: Mon Feb 15 14:09:19 2016 -0800 ; Merge from origin/emacs-25 The following commit was skipped: a91b4b5 Revert "Backport: * lisp/isearch.el: Turn char-folding off by default" commit a644fa367504c4587c1b9e5fc20b7af79e6e99a0 Merge: 8c4e041 f5d6b9b Author: John Wiegley Date: Mon Feb 15 14:09:12 2016 -0800 Merge from origin/emacs-25 f5d6b9b Revert "Support integer image rotation and respect EXIF rotations" afe7d1f Revert "Document EXIF image rotation" c6f377c Document OS X LANG default eb4a18c Set locale when run from OS X GUI 456c0a3 make-docfile cleanup for I/O, etc. 25ec995 Memory-management cleanup in make-docfile 02d925e Kevin Gallagher has new email address 4ef153b Improve doc strings of 'forward/backward-word-strictly' 3ad05a0 Describe Makefile test targets in test/README commit 8c4e041bdbc07a159305b41e1bcb64f1d301b99f Merge: 33bb679 12c50e8 Author: John Wiegley Date: Mon Feb 15 14:08:03 2016 -0800 ; Merge from origin/emacs-25 The following commit was skipped: 12c50e8 Backport: * lisp/isearch.el: Turn char-folding off by default commit 33bb679af9e323408c8089f0b5675a54776d60d5 Merge: ab7583a 10b8ed2 Author: John Wiegley Date: Mon Feb 15 14:07:46 2016 -0800 Merge from origin/emacs-25 10b8ed2 Document EXIF image rotation 0f60049 Support integer image rotation and respect EXIF rotations 7dd45b6 Quote table names for postgres listings (sql-mode) 6bac035 * lisp/replace.el (replace-match-maybe-edit): Make arg `backward' optional. ee909aa * lisp/simple.el (next-line-or-history-element): Reset temporary-goal-column. 0a289d3 Suppress ACL ops if configured with --disable-acl 1a9dbf5 Mention web bugs fa55da2 Make mm-html-blocked-images default to "" again commit d4b93e11a519cf71beca69654fda158d01a26c3b Author: Eli Zaretskii Date: Mon Feb 15 21:46:17 2016 +0200 Minor fixes in global-auto-composition-mode * lisp/emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name): Produce prettier names of globalized minor modes. * lisp/composite.el (global-auto-composition-mode): Make it a globalized mode. (Bug#22682) diff --git a/lisp/composite.el b/lisp/composite.el index 205f5ed..94b14df 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -838,6 +838,7 @@ omitted or nil. For more information on Auto Composition mode, see `auto-composition-mode' ." + :global t :variable (default-value 'auto-composition-mode)) (defalias 'toggle-auto-composition 'auto-composition-mode) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index f29f64f..6a4d835 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -68,6 +68,7 @@ replacing its case-insensitive matches with the literal string in LIGHTER." "toggle-\\|-mode\\'" "" (symbol-name mode)))) " mode"))) + (setq name (replace-regexp-in-string "\\`Global-" "Global " name)) (if (not (stringp lighter)) name ;; Strip leading and trailing whitespace from LIGHTER. (setq lighter (replace-regexp-in-string "\\`\\s-+\\|\\s-+\\'" "" commit 02b037b85ce32fdcf454f5b12d72f09bcb217891 Author: Alan Mackenzie Date: Mon Feb 15 12:45:42 2016 +0000 Allow arithmetic operators inside C++ template constructs. Fixes debbugs #22486. This corrects the previous patch with this message which was empty. * lisp/progmodes/cc-langs.el (c-multichar->-op-not->>-regexp): New language variable. (c-<>-notable-chars-re): New language variable. * lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): User c-<>-notable-chars-re in place of the former fixed string in searching for places to stop and examine. Use c-multichar->-op-not->>-regexp to check that a found ">" is not part of a multichar operator in place of the former c->-op-without->-cont-regexp. Add code to skip forwards over a balanced parenthesized expression. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index a4a1604..d4dcb1c 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -6056,7 +6056,10 @@ comment at the start of cc-engine.el for more info." ;; Stop on ',', '|', '&', '+' and '-' to catch ;; common binary operators that could be between ;; two comparison expressions "ad". - "[<;{},|+&-]\\|[>)]" + ;; 2016-02-11: C++11 templates can now contain arithmetic + ;; expressions, so template detection in C++ is now less + ;; robust than it was. + c-<>-notable-chars-re nil t t)) (cond @@ -6064,7 +6067,9 @@ comment at the start of cc-engine.el for more info." ;; Either an operator starting with '>' or the end of ;; the angle bracket arglist. - (if (looking-at c->-op-without->-cont-regexp) + (if (save-excursion + (c-backward-token-2) + (looking-at c-multichar->-op-not->>-regexp)) (progn (goto-char (match-end 0)) t) ; Continue the loop. @@ -6134,6 +6139,11 @@ comment at the start of cc-engine.el for more info." ))) t) ; carry on looping. + ((and + (eq (char-before) ?\() + (c-go-up-list-forward) + (eq (char-before) ?\)))) + ((and (not c-restricted-<>-arglists) (or (and (eq (char-before) ?&) (not (eq (char-after) ?&))) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 8a1d43c..dd1bccf 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -228,6 +228,12 @@ the evaluated constant value at compile time." ;; with the group symbol for each group and should return non-nil ;; if that group is to be included. ;; + ;; OP-FILTER selects the operators. It is either t to select all + ;; operators, a string to select all operators for which `string-match' + ;; matches the operator with the string, or a function which will be + ;; called with the operator and should return non-nil when the operator + ;; is to be selected. + ;; ;; If XLATE is given, it's a function which is called for each ;; matching operator and its return value is collected instead. ;; If it returns a list, the elements are spliced directly into @@ -1245,7 +1251,6 @@ operators." t "\\`<." (lambda (op) (substring op 1))))) - (c-lang-defvar c-<-op-cont-regexp (c-lang-const c-<-op-cont-regexp)) (c-lang-defconst c->-op-cont-tokens @@ -1264,7 +1269,6 @@ operators." ;; Regexp matching the second and subsequent characters of all ;; multicharacter tokens that begin with ">". t (c-make-keywords-re nil (c-lang-const c->-op-cont-tokens))) - (c-lang-defvar c->-op-cont-regexp (c-lang-const c->-op-cont-regexp)) (c-lang-defconst c->-op-without->-cont-regexp @@ -1279,10 +1283,19 @@ operators." "\\`>>" (lambda (op) (substring op 1))) :test 'string-equal))) - (c-lang-defvar c->-op-without->-cont-regexp (c-lang-const c->-op-without->-cont-regexp)) +(c-lang-defconst c-multichar->-op-not->>-regexp + ;; Regexp matching multichar tokens containing ">", except ">>" + t (c-make-keywords-re nil + (delete ">>" + (c-filter-ops (c-lang-const c-all-op-syntax-tokens) + t + "\\(.>\\|>.\\)")))) +(c-lang-defvar c-multichar->-op-not->>-regexp + (c-lang-const c-multichar->-op-not->>-regexp)) + (c-lang-defconst c-stmt-delim-chars ;; The characters that should be considered to bound statements. To ;; optimize `c-crosses-statement-barrier-p' somewhat, it's assumed to @@ -3087,6 +3100,20 @@ expression is considered to be a type." ; generics is not yet coded in CC Mode. (c-lang-defvar c-recognize-<>-arglists (c-lang-const c-recognize-<>-arglists)) +(c-lang-defconst c-<>-notable-chars-re + "A regexp matching any single character notable inside a <...> construct. +This must include \"<\" and \">\", and should include \",\", and +any character which cannot be valid inside such a construct. +This is used in `c-forward-<>-arglist-recur' to try to detect +sequences of tokens which cannot be a template/generic construct. +When \"(\" is present, that defun will attempt to parse a +parenthesized expression inside the template. When \")\" is +present it will treat an unbalanced closing paren as a sign of +the invalidity of the putative template construct." + t "[<;{},|+&->)]" + c++ "[<;{},>()]") +(c-lang-defvar c-<>-notable-chars-re (c-lang-const c-<>-notable-chars-re)) + (c-lang-defconst c-enums-contain-decls "Non-nil means that an enum structure can contain declarations." t nil commit 44b16f60fd80afe574964390d896635971cb5504 Author: Eli Zaretskii Date: Mon Feb 15 16:03:54 2016 +0200 Avoid crashes in semi-malformed 'condition-case' * src/eval.c (internal_lisp_condition_case): Treat a handler '(nil)' as if it were '(nil nil)'. (Bug#22675) diff --git a/src/eval.c b/src/eval.c index 6c912bc..26104a5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1245,7 +1245,7 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform, for (i = 0; i < clausenb; i++) { Lisp_Object clause = clauses[i]; - Lisp_Object condition = XCAR (clause); + Lisp_Object condition = CONSP (clause) ? XCAR (clause) : Qnil; if (!CONSP (condition)) condition = Fcons (condition, Qnil); struct handler *c = push_handler (condition, CONDITION_CASE); commit 652e5b49d92d77fe057cf73bcb41f7170182bc8d Author: Alan Mackenzie Date: Mon Feb 15 12:45:42 2016 +0000 Allow arithmetic operators inside C++ template constructs. Fixes debbugs #22486. * lisp/progmodes/cc-langs.el (c-multichar->-op-not->>-regexp): New language variable. (c-<>-notable-chars-re): New language variable. * lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): User c-<>-notable-chars-re in place of the former fixed string in searching for places to stop and examine. Use c-multichar->-op-not->>-regexp to check that a found ">" is not part of a multichar operator in place of the former c->-op-without->-cont-regexp. Add code to skip forwards over a balanced parenthesized expression. commit d9ea795035f28f700f1456b377013a24a1ea5e6f Author: Eli Zaretskii Date: Mon Feb 15 14:03:57 2016 +0200 Fix regression with 'recent-keys' and keyboard macros * src/keyboard.c (record_char): Don't record in 'recent_keys' events that come from executing keyboard macros. (Bug#22674) diff --git a/src/keyboard.c b/src/keyboard.c index 546c012..4edb5aa 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3220,33 +3220,37 @@ record_char (Lisp_Object c) else store_kbd_macro_char (c); - if (!recorded) - { - total_keys += total_keys < NUM_RECENT_KEYS; - ASET (recent_keys, recent_keys_index, c); - if (++recent_keys_index >= NUM_RECENT_KEYS) - recent_keys_index = 0; - } - else if (recorded < 0) + /* recent_keys should not include events from keyboard macros. */ + if (NILP (Vexecuting_kbd_macro)) { - /* We need to remove one or two events from recent_keys. - To do this, we simply put nil at those events and move the - recent_keys_index backwards over those events. Usually, - users will never see those nil events, as they will be - overwritten by the command keys entered to see recent_keys - (e.g. C-h l). */ - - while (recorded++ < 0 && total_keys > 0) + if (!recorded) { - if (total_keys < NUM_RECENT_KEYS) - total_keys--; - if (--recent_keys_index < 0) - recent_keys_index = NUM_RECENT_KEYS - 1; - ASET (recent_keys, recent_keys_index, Qnil); + total_keys += total_keys < NUM_RECENT_KEYS; + ASET (recent_keys, recent_keys_index, c); + if (++recent_keys_index >= NUM_RECENT_KEYS) + recent_keys_index = 0; + } + else if (recorded < 0) + { + /* We need to remove one or two events from recent_keys. + To do this, we simply put nil at those events and move the + recent_keys_index backwards over those events. Usually, + users will never see those nil events, as they will be + overwritten by the command keys entered to see recent_keys + (e.g. C-h l). */ + + while (recorded++ < 0 && total_keys > 0) + { + if (total_keys < NUM_RECENT_KEYS) + total_keys--; + if (--recent_keys_index < 0) + recent_keys_index = NUM_RECENT_KEYS - 1; + ASET (recent_keys, recent_keys_index, Qnil); + } } - } - num_nonmacro_input_events++; + num_nonmacro_input_events++; + } /* Write c to the dribble file. If c is a lispy event, write the event's symbol to the dribble file, in . Bleaugh. commit 903603f8cd06c289ae84bf3f0bc8ac43609b6644 Author: Eli Zaretskii Date: Mon Feb 15 13:09:46 2016 +0200 Fix wording in a doc-view.el comment * lisp/doc-view.el (doc-view--current-cache-dir): Don't use "illegal" for something that is not against the law. diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 4cf4ce2..af7f199 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -696,11 +696,12 @@ It's a subdirectory of `doc-view-cache-directory'." (setq doc-view--current-cache-dir (file-name-as-directory (expand-file-name - (concat (thread-last (file-name-nondirectory doc-view--buffer-file-name) + (concat (thread-last + (file-name-nondirectory doc-view--buffer-file-name) ;; bug#13679 (subst-char-in-string ?% ?_) ;; arc-mode concatenates archive name and file name - ;; with colon, which is illegal on MS-Windows. + ;; with colon, which isn't allowed on MS-Windows. (subst-char-in-string ?: ?_)) "-" (let ((file doc-view--buffer-file-name)) commit cf79616133778ff6a0ec4a7745f0f8f9fb5bd8ee Author: Paul Eggert Date: Sun Feb 14 19:44:38 2016 -0800 ; Spelling fixes diff --git a/ChangeLog.2 b/ChangeLog.2 index f6d67e2..e441fd1 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1594,7 +1594,7 @@ that as the same name can be used for different locations in different SES sheets ; 2) use `local-variable-if-set-p' rather than `boundp' and `local-variable-p' to check if cell name is already in use in this - sheet or needs initialisation. + sheet or needs initialization. (ses-relocate-all): Cell value relocation : 1) like for name relocation use the `ses-cell' property rather than comparing actual name to corresponding standard name. 2) Correct bug introduced in @@ -9622,7 +9622,7 @@ (unexec): Don't search for bss style sections by name. Instead, use the last PT_LOAD header address range covered by p_memsz but not p_filesz and match any SHT_NOBITS section in that - address range. Simplify initialisation of section header vars. + address range. Simplify initialization of section header vars. Don't assume that section headers are above bss segment. Move copying of bss area out of section loop. Align .data2 section to 1, since it now covers the entire bss area. For SHT_NOBITS @@ -9680,7 +9680,7 @@ Separate out some of the more mechanical changes so following patches are smaller. - * src/unexelf.c (unexec): Rearrange initialisation of program + * src/unexelf.c (unexec): Rearrange initialization of program header vars. Use pointer vars in loops rather than indexing section header array via macros. Simplify _OBJC_ sym code and reloc handling code. diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13 index 041e8c0..d792889 100644 --- a/lisp/ChangeLog.13 +++ b/lisp/ChangeLog.13 @@ -7656,7 +7656,7 @@ 2007-11-07 Glenn Morris * emulation/tpu-mapper.el (tpu-map-key): Use unless rather than cond. - Remove superfluous concats. Move final set-buffer to + Remove superfluous concatenations. Move final set-buffer to non-emacs-specific code. 2007-11-07 Rob Riepel diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17 index 1785a33..ee03661 100644 --- a/lisp/ChangeLog.17 +++ b/lisp/ChangeLog.17 @@ -1758,7 +1758,7 @@ * net/shr.el (shr-insert): Make sure the space inserted has the right font (for width). - (shr-fill-line): Preserve background colours when indenting/folding. + (shr-fill-line): Preserve background colors when indenting/folding. (shr-ensure-paragraph): Don't insert a new paragraph as the first item in a
  • . diff --git a/lisp/doc-view.el b/lisp/doc-view.el index bc5c1d2..4cf4ce2 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -699,8 +699,8 @@ It's a subdirectory of `doc-view-cache-directory'." (concat (thread-last (file-name-nondirectory doc-view--buffer-file-name) ;; bug#13679 (subst-char-in-string ?% ?_) - ;; arc-mode concats archive name and file name - ;; with colon which is illegal on Windows. + ;; arc-mode concatenates archive name and file name + ;; with colon, which is illegal on MS-Windows. (subst-char-in-string ?: ?_)) "-" (let ((file doc-view--buffer-file-name)) diff --git a/lisp/gnus/ChangeLog.3 b/lisp/gnus/ChangeLog.3 index 5e7e95b..e6cbe04 100644 --- a/lisp/gnus/ChangeLog.3 +++ b/lisp/gnus/ChangeLog.3 @@ -1732,7 +1732,7 @@ * eww.el (eww-convert-widgets): Put `help-echo' on input fields so that we can navigate to them. - * shr.el (shr-colorize-region): Put the colours over the entire region. + * shr.el (shr-colorize-region): Put the colors over the entire region. (shr-inhibit-decoration): New variable. (shr-add-font): Use it to inhibit text property decorations while doing preliminary table renderings. This speeds up typical Wikipedia page @@ -1824,7 +1824,7 @@ * shr.el (shr-expand-url): Respect // URLs. * eww.el (eww-tag-body): Override the shr body rendering so that we can - put a background colour onto the entire buffer. + put a background color onto the entire buffer. (eww-render): When being redirected, use the redirect URL as the new base URL. @@ -3514,7 +3514,7 @@ * mm-archive.el (mm-archive-decoders): Add support for tar. - * gnus.el (gnus-logo-color-alist): Change the colours for Ma Gnus. + * gnus.el (gnus-logo-color-alist): Change the colors for Ma Gnus. * nnmail.el (nnmail-extra-headers): Add Cc to the default. diff --git a/src/emacs.c b/src/emacs.c index ab5d777..9bf996a 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1311,8 +1311,8 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem #endif #ifdef HAVE_NS - /* Initialise the locale from user defaults. */ - ns_init_locale(); + /* Initialize the locale from user defaults. */ + ns_init_locale (); #endif /* Initialize and GC-protect Vinitial_environment and commit f8bf1b35bf55ae1bb7703f86d3b526887f064b19 Author: Paul Eggert Date: Sun Feb 14 19:24:38 2016 -0800 CONTRIBUTE cleanups and updates * CONTRIBUTE: Mention URLs and info nodes more consistently, avoiding possibly-confusing punctuation adjacent to a URL, and giving full shell commands for 'info'. Start with a brief but complete how-to, for people who want to get started right away. Then briefly discuss how to join the development process in the typical order. Omit needless words. Update some of the now-obsolete file names, info node names, and quoting styles. Better document emacs-NN branches and how they are merged. * admin/notes/git-workflow: Change emacs-24 to emacs-25, and trunk to master. This file still needs work. diff --git a/CONTRIBUTE b/CONTRIBUTE index 74d340a..5102b4f 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -1,48 +1,51 @@ -This file contains information on Emacs developer processes. +* How developers contribute to GNU Emacs -For information on contributing to Emacs as a non-developer, see -(info "(emacs)Contributing") or +Here is how software developers can contribute to Emacs. (Non-developers: see http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html +or run the shell command 'info "(emacs)Contributing"'.) -* Information for Emacs Developers. +** The Emacs repository -An "Emacs Developer" is someone who contributes a lot of code or -documentation to the Emacs repository. Generally, they have write -access to the Emacs git repository on Savannah -https://savannah.gnu.org/git/?group=emacs. +Emacs development uses Git on Savannah for its main repository. +Briefly, the following shell commands build and run Emacs from scratch: -** Write access to the Emacs repository. + git config --global user.name 'Your Name' + git config --global user.email 'your.name@example.com' + git config --global transfer.fsckObjects true + git clone git://git.sv.gnu.org/emacs.git + cd emacs + ./autogen.sh + ./configure + make + src/emacs -Once you become a frequent contributor to Emacs, we can consider -giving you write access to the version-control repository. Request -access on the emacs-devel@gnu.org mailing list. Also, be sure to -subscribe to the emacs-devel@gnu.org mailing list and include the -"emacs-announce" topic, so that you get the announcements about -feature freeze and other important events. +For more details, see +http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs and +http://www.emacswiki.org/emacs/GitForEmacsDevs or see the file +admin/notes/git-workflow. -** Using the Emacs repository +** Getting involved with development -Emacs uses Git for the source code repository. +You can subscribe to the emacs-devel@gnu.org mailing list, paying +attention to postings with subject lines containing "emacs-announce", +as these discuss important events like feature freezes. See +http://lists.gnu.org/mailman/listinfo/emacs-devel for mailing list +instructions and archives. You can develop and commit changes in your +own copy of the repository, and discuss proposed changes on the +mailing list. Frequent contributors to Emacs can request write access +there. -See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get -started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more -advanced information. +** Committing changes by others -Alternately, see admin/notes/git-workflow. - -If committing changes written by someone else, make the commit in -their name, not yours. Git distinguishes between the author -and the committer; use the --author option on the commit command to -specify the actual author; the committer defaults to you. +If committing changes written by someone else, commit in their name, +not yours. You can use 'git commit --author="AUTHOR"' to specify a +change's author. ** Commit messages -Emacs development no longer stores descriptions of new changes in -ChangeLog files. Instead, a single ChangeLog file is generated from -the commit messages when a release is prepared. So changes you commit -should not touch any of the ChangeLog files in the repository, but -instead should contain the log entries in the commit message. Here is -an example of a commit message (indented): +Ordinarily, a change you commit should contain a log entry in its +commit message and should not touch the repository's ChangeLog files. +Here is an example commit message (indented): Deactivate shifted region @@ -53,12 +56,13 @@ an example of a commit message (indented): * src/frame.c (Fhandle_switch_frame, Fselected_frame): Deactivate the mark. -Below are some rules and recommendations for formatting commit -messages: +Occasionally, commit messages are collected and prepended to a +ChangeLog file, where they can be corrected. It saves time to get +them right the first time, so here are guidelines for formatting them: - Start with a single unindented summary line explaining the change; do not end this line with a period. If that line starts with a - semi-colon and a space "; ", the log message will be ignored when + semicolon and a space "; ", the commit message will be ignored when generating the ChangeLog file. Use this for minor commits that do not need separate ChangeLog entries, such as changes in etc/NEWS. @@ -104,19 +108,19 @@ messages: the rationale for a change; that can be done in the commit message between the summary line and the file entries. -- Emacs generally follows the GNU coding standards when it comes to - ChangeLogs: - http://www.gnu.org/prep/standards/html_node/Change-Logs.html or - "(info (standards)Change Logs"). One exception is that we still - sometimes quote `like-this' (as the standards used to recommend) - rather than 'like-this' (as they do now), because `...' is so widely - used elsewhere in Emacs. +- Emacs generally follows the GNU coding standards for ChangeLogs: see + http://www.gnu.org/prep/standards/html_node/Change-Logs.html + or run 'info "(standards)Change Logs"'. One exception is that + commits still sometimes quote `like-this' (as the standards used to + recommend) rather than 'like-this' or ‘like this’ (as they do now), + as `...' is so widely used elsewhere in Emacs. -- Some of the rules in the GNU coding standards section 5.2 - "Commenting Your Work" also apply to ChangeLog entries: they must be - in English, and be complete sentences starting with a capital and - ending with a period (except the summary line should not end in a - period). +- Some commenting rules in the GNU coding standards also apply + to ChangeLog entries: they must be in English, and be complete + sentences starting with a capital and ending with a period (except + the summary line should not end in a period). See + http://www.gnu.org/prep/standards/html_node/Comments.html + or run 'info "(standards)Comments"'. They are preserved indefinitely, and have a reasonable chance of being read in the future, so it's better that they have good @@ -145,15 +149,15 @@ messages: will suffice. - There is no need to mention files such as NEWS and MAINTAINERS, or - to indicate regeneration of files such as 'configure', in the + to indicate regeneration of files such as 'lib/gnulib.mk', in the ChangeLog entry. "There is no need" means you don't have to, but you can if you want to. ** Generating ChangeLog entries -- You can use various Emacs functions to ease the process of writing - ChangeLog entries; see (info "(emacs)Change Log Commands") or - http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html. +- You can use Emacs functions to write ChangeLog entries; see + http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html + or run 'info "(emacs)Change Log Commands"'. - If you use Emacs VC, one way to format ChangeLog entries is to create a top-level ChangeLog file manually, and update it with 'C-x 4 a' as @@ -171,32 +175,33 @@ messages: ** Branches -Development normally takes places on the trunk. -Sometimes specialized features are developed on separate branches -before possibly being merged to the trunk. - -Development is discussed on the emacs-devel mailing list. - -The trunk branch is named "master" in git; release branches are named -"emacs-nn" where "nn" is the major version. +Future development normally takes place on the master branch. +Sometimes specialized features are developed on other branches before +possibly being merged to the master. Release branches are named +"emacs-NN" where NN is the major version number, and are mainly +intended for more-conservative changes such as bug fixes. Typically, +collective development is active on the master branch and possibly on +the current release branch. Periodically, the current release branch +is merged into the master, using the gitmerge function described in +admin/notes-git-workflow. If you are fixing a bug that exists in the current release, be sure to commit it to the release branch; it will be merged to the master -branch later. +branch later by the gitmerge function. -However, if you know that the change will be difficult to merge to -master (eg because the code on master has changed a lot), you can +However, if you know that the change will be difficult to merge to the +master (e.g., because the code on master has changed a lot), you can apply the change to both master and branch yourself. It could also happen that a change is cherry-picked from master to the release branch, and so doesn't need to be merged back. In these cases, -indicate in the release branch commit log that there is no need to -merge the commit to master; start the commit message with "Backport:". -gitmerge.el will then exclude that commit from the merge to trunk. +say in the release branch commit message that there is no need to merge +the commit to master, by starting the commit message with "Backport:". +The gitmerge function excludes these commits from the merge to the master. Some changes should not be merged to master at all, for whatever reasons. These should be marked by including something like "Do not merge to master" or anything that matches gitmerge-skip-regexp (see -gitmerge.el) in the log message. +admin/gitmerge.el) in the commit message. ** Other process information @@ -206,10 +211,11 @@ Discussion about Emacs development takes place on emacs-devel@gnu.org. Bug reports and fixes, feature requests and implementations should be sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled -to the tracker at http://debbugs.gnu.org . +to the http://debbugs.gnu.org tracker. -You can subscribe to the mailing lists, or see the list archives, -by following links from http://savannah.gnu.org/mail/?group=emacs . +The Savannah info page http://savannah.gnu.org/mail/?group=emacs +describes how to subscribe to the mailing lists, or see the list +archives. To email a patch you can use a shell command like 'git format-patch -1' to create a file, and then attach the file to your email. This nicely @@ -219,16 +225,15 @@ such patch without additional remarks, you can use a command like ** Issue tracker (a.k.a. "bug tracker") -The Emacs issue tracker is at http://debbugs.gnu.org/. The form -presented by that page allows to view bug reports and search the -database for bugs matching several criteria. Messages posted to the -bug-gnu-emacs@gnu.org mailing list, mentioned above, are recorded by -the tracker with the corresponding bugs/issues. +The Emacs issue tracker at http://debbugs.gnu.org lets you view bug +reports and search the database for bugs matching several criteria. +Messages posted to the bug-gnu-emacs@gnu.org mailing list, mentioned +above, are recorded by the tracker with the corresponding bugs/issues. GNU ELPA has a 'debbugs' package that allows accessing the tracker database from Emacs. -** Document your changes. +** Documenting your changes Any change that matters to end-users should have an entry in etc/NEWS. @@ -239,21 +244,21 @@ know it does not, mark the NEWS entry with "---". If you know that *all* the necessary documentation updates have been made, mark the entry with "+++". Otherwise do not mark it. -Please see (info "(elisp)Documentation Tips") or -https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html -for more specific tips on Emacs's doc style. Use 'checkdoc' to check -for documentation errors before submitting a patch. +For more specific tips on Emacs's doc style, see +http://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html +Use 'checkdoc' to check for documentation errors before submitting a patch. -** Test your changes. +** Testing your changes Please test your changes before committing them or sending them to the list. If possible, add a new test along with any bug fix or new functionality you commit (of course, some changes cannot be easily tested). -Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info -"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/ -for more information on writing and running tests. +Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See +http://www.gnu.org/software/emacs/manual/html_node/ert/ +or run 'info "(ert)"' for for more information on writing and running +tests. If your test lasts longer than some few seconds, mark it in its 'ert-deftest' definition with ":tags '(:expensive-test)". @@ -264,27 +269,26 @@ top-level directory. Most tests are in the directory " to run the tests for .el(c). See "test/README" for more information. -** Understanding Emacs Internals. +** Understanding Emacs internals + +The best way to understand Emacs internals is to read the code. Some +source files, such as xdisp.c, have extensive comments describing the +design and implementation. The following resources may also help: + +http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html +http://www.gnu.org/software/emacs/manual/html_node/elisp/GNU-Emacs-Internals.html -The best way to understand Emacs Internals is to read the code, -but the nodes "Tips" and "GNU Emacs Internals" in the Appendix -of the Emacs Lisp Reference Manual may also help. Some source files, -such as xdisp.c, have large commentaries describing the design and -implementation in more detail. +or run 'info "(elisp)Tips"' or 'info "(elisp)GNU Emacs Internals"'. The file etc/DEBUG describes how to debug Emacs bugs. *** Non-ASCII characters in Emacs files -If you introduce non-ASCII characters into Emacs source files, it is a -good idea to add a 'coding' cookie to the file to state its encoding. -Please use the UTF-8 encoding unless it cannot do the job for some -good reason. As of Emacs 24.4, it is no longer necessary to have -explicit 'coding' cookies in *.el files if they are encoded in UTF-8, -but other files need them even if encoded in UTF-8. However, if -an *.el file is intended for use with older Emacs versions (e.g. if -it's also distributed via ELPA), having an explicit encoding -specification is still a good idea. +If you introduce non-ASCII characters into Emacs source files, use the +UTF-8 encoding unless it cannot do the job for some good reason. +Although it is generally a good idea to add 'coding:' cookies to +non-ASCII source files, cookies are not needed in UTF-8-encoded *.el +files intended for use only with Emacs version 24.5 and later. *** Useful files in the admin/ directory @@ -306,15 +310,15 @@ changed heuristic to deduce that a file was renamed. So if you are planning to make extensive changes to a file after renaming it (or moving it to another directory), you should: -- create a feature branch +- Create a feature branch. -- commit the rename without any changes +- Commit the rename without any changes. -- make other changes +- Make other changes. -- merge the feature branch to trunk, _not_ squashing the commits into - one. The commit message on this merge should summarize the renames - and all the changes. +- Merge the feature branch to the master branch, instead of squashing + the commits into one. The commit message on this merge should + summarize the renames and all the changes. @@ -336,4 +340,5 @@ along with GNU Emacs. If not, see . Local variables: mode: outline paragraph-separate: "[ ]*$" +coding: utf-8 end: diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index b6168c3..2e4bbac 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow @@ -19,17 +19,15 @@ Initial setup ============= Then we want to clone the repository. We normally want to have both -the current trunk and the emacs-24 branch. +the current master and the emacs-25 branch. mkdir ~/emacs cd ~/emacs -git clone @git.sv.gnu.org:/srv/git/emacs.git -mv emacs trunk -(cd trunk; git config push.default current) -./trunk/admin/git-new-workdir trunk emacs-24 -cd emacs-24 -git checkout emacs-24 -git config push.default current +git clone @git.sv.gnu.org:/srv/git/emacs.git master +(cd master; git config push.default current) +./master/admin/git-new-workdir master emacs-25 +cd emacs-25 +git checkout emacs-25 You now have both branches conveniently accessible, and you can do "git pull" in them once in a while to keep updated. @@ -59,13 +57,13 @@ you commit your change locally and then send a patch file as a bug report as described in ../../CONTRIBUTE. -Backporting to emacs-24 +Backporting to emacs-25 ======================= -If you have applied a fix to the trunk, but then decide that it should -be applied to the emacs-24 branch, too, then +If you have applied a fix to the master, but then decide that it should +be applied to the emacs-25 branch, too, then -cd ~/emacs/trunk +cd ~/emacs/master git log and find the commit you're looking for. Then find the commit ID, @@ -73,7 +71,7 @@ which will look like commit 958b768a6534ae6e77a8547a56fc31b46b63710b -cd ~/emacs/emacs-24 +cd ~/emacs/emacs-25 git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b and add "Backport:" to the commit string. Then @@ -81,17 +79,17 @@ and add "Backport:" to the commit string. Then git push -Merging emacs-24 to trunk/master -================================ +Merging emacs-25 to the master +============================== It is recommended to use the file gitmerge.el in the admin directory -for merging 'emacs-24' into 'master'. It will take care of many +for merging 'emacs-25' into 'master'. It will take care of many things which would otherwise have to be done manually, like ignoring commits that should not land in master, fixing up ChangeLogs and automatically dealing with certain types of conflicts. If you really want to, you can do the merge manually, but then you're on your own. If you still choose to do that, make absolutely sure that you *always* -use the 'merge' command to transport commits from 'emacs-24' to +use the 'merge' command to transport commits from 'emacs-25' to 'master'. *Never* use 'cherry-pick'! If you don't know why, then you shouldn't manually do the merge in the first place; just use gitmerge.el instead. @@ -104,11 +102,11 @@ up-to-date by doing a pull. Then start Emacs with emacs -l admin/gitmerge.el -f gitmerge You'll be asked for the branch to merge, which will default to -'origin/emacs-24', which you should accept. Merging a local tracking +'origin/emacs-25', which you should accept. Merging a local tracking branch is discouraged, since it might not be up-to-date, or worse, contain commits from you which are not yet pushed upstream. -You will now see the list of commits from 'emacs-24' which are not yet +You will now see the list of commits from 'emacs-25' which are not yet merged to 'master'. You might also see commits that are already marked for "skipping", which means that they will be merged with a different merge strategy ('ours'), which will effectively ignore the commit f3aaca3552ba961d13cd1ee935c1c6b075f2398a Author: Paul Eggert Date: Sun Feb 14 11:42:36 2016 -0800 Port USE_STACK_LISP_OBJECTS fix to Clang * src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false for Clang. Recent versions of Clang claim to be GCC 4.2.1 but do not have the GCC bug. diff --git a/src/lisp.h b/src/lisp.h index 8eb18e1..8eab38b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4522,7 +4522,8 @@ extern void *record_xmalloc (size_t) ATTRIBUTE_ALLOC_SIZE ((1)); This feature is experimental and requires careful debugging. Build with CPPFLAGS='-DUSE_STACK_LISP_OBJECTS=0' to disable it. */ -#if (!defined USE_STACK_LISP_OBJECTS && defined __GNUC__ \ +#if (!defined USE_STACK_LISP_OBJECTS \ + && defined __GNUC__ && !defined __clang__ \ && !(4 < __GNUC__ + (3 < __GNUC_MINOR__ + (2 <= __GNUC_PATCHLEVEL__)))) /* Work around GCC bugs 36584 and 35271, which were fixed in GCC 4.3.2. */ # define USE_STACK_LISP_OBJECTS false commit 1834ac7d24c60ecabb4fc2469d350a03db1798ab Author: Paul Eggert Date: Sun Feb 14 11:19:39 2016 -0800 Port to x86 GCC 4.3.1 and earlier This tries to port to x86 FreeBSD 9, where Emacs dumps core (Bug#22065). * src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false for GCC 4.3.1 and earlier. diff --git a/src/lisp.h b/src/lisp.h index af73c4b..8eb18e1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4522,6 +4522,11 @@ extern void *record_xmalloc (size_t) ATTRIBUTE_ALLOC_SIZE ((1)); This feature is experimental and requires careful debugging. Build with CPPFLAGS='-DUSE_STACK_LISP_OBJECTS=0' to disable it. */ +#if (!defined USE_STACK_LISP_OBJECTS && defined __GNUC__ \ + && !(4 < __GNUC__ + (3 < __GNUC_MINOR__ + (2 <= __GNUC_PATCHLEVEL__)))) + /* Work around GCC bugs 36584 and 35271, which were fixed in GCC 4.3.2. */ +# define USE_STACK_LISP_OBJECTS false +#endif #ifndef USE_STACK_LISP_OBJECTS # define USE_STACK_LISP_OBJECTS true #endif commit 84829495b5746417f5eaf9be693fb35f0509697a Author: Eli Zaretskii Date: Sun Feb 14 21:20:48 2016 +0200 Fix point movement under 'scroll-conservatively' * src/xdisp.c (redisplay_window): Correct a typo in computing the effective number of text lines in a window. (Bug#22637) diff --git a/src/xdisp.c b/src/xdisp.c index 840699d..fed5879 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -16920,7 +16920,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) if (scroll_conservatively > SCROLL_LIMIT) { int window_total_lines - = WINDOW_TOTAL_LINES (w) * FRAME_LINE_HEIGHT (f) * frame_line_height; + = WINDOW_TOTAL_LINES (w) * FRAME_LINE_HEIGHT (f) / frame_line_height; int margin = scroll_margin > 0 ? min (scroll_margin, window_total_lines / 4) commit c1313b5f270bb20901423815c23f72e926f7bf38 Author: Thomas Plass Date: Sun Feb 14 19:56:46 2016 +0100 Replace colon in file name (not legal on Windows) * lisp/doc-view.el (doc-view--current-cache-dir): Replace colon in file name (not legal on Windows). [tiny change] diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 06cf8dc..bc5c1d2 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -140,6 +140,7 @@ (require 'dired) (require 'image-mode) (require 'jka-compr) +(require 'subr-x) ;;;; Customization Options @@ -695,14 +696,18 @@ It's a subdirectory of `doc-view-cache-directory'." (setq doc-view--current-cache-dir (file-name-as-directory (expand-file-name - (concat (subst-char-in-string ?% ?_ ;; bug#13679 - (file-name-nondirectory doc-view--buffer-file-name)) - "-" - (let ((file doc-view--buffer-file-name)) - (with-temp-buffer - (set-buffer-multibyte nil) - (insert-file-contents-literally file) - (md5 (current-buffer))))) + (concat (thread-last (file-name-nondirectory doc-view--buffer-file-name) + ;; bug#13679 + (subst-char-in-string ?% ?_) + ;; arc-mode concats archive name and file name + ;; with colon which is illegal on Windows. + (subst-char-in-string ?: ?_)) + "-" + (let ((file doc-view--buffer-file-name)) + (with-temp-buffer + (set-buffer-multibyte nil) + (insert-file-contents-literally file) + (md5 (current-buffer))))) doc-view-cache-directory))))) ;;;###autoload commit f7af26c5edcc3a5145a67e0b0e956286f913a7a3 Author: Eli Zaretskii Date: Sun Feb 14 20:14:32 2016 +0200 Fix a typo in edt.texi * doc/misc/edt.texi: Fix a typo in an email address. Reported by "Herbert J. Skuhra" . diff --git a/doc/misc/edt.texi b/doc/misc/edt.texi index 2361313..cb22b82 100644 --- a/doc/misc/edt.texi +++ b/doc/misc/edt.texi @@ -30,7 +30,7 @@ modify this GNU manual.'' @titlepage @title EDT Emulation User's Manual @author Kevin Gallagher -@author @email{kevin.gal@verizon.net} +@author @email{kevin.gal@@verizon.net} @page @vskip 0pt plus 1filll @insertcopying commit 8badf953da5e629bc67db113719b72412270dabd Author: Eli Zaretskii Date: Sun Feb 14 19:46:29 2016 +0200 Make 'mmap_realloc' on MS-Windows more reliable * src/w32heap.c (mmap_alloc): If reserving memory succeeds, but committing fails, return NULL. Don't call GetLastError twice for the same API error. (mmap_realloc): Zero out MEMORY_BASIC_INFORMATION structures before calling VirtualQuery, to avoid using garbled values if the call fails. If committing more pages from the same block fails, fall back on mmap_alloc + CopyMemory. Enhance debugging printouts if the call to VirtualAlloc to commit more pages fails. (Bug#22526) diff --git a/src/w32heap.c b/src/w32heap.c index 00da86a..69706a3 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -652,15 +652,19 @@ mmap_alloc (void **var, size_t nbytes) { /* Now, commit pages for NBYTES. */ *var = VirtualAlloc (p, nbytes, MEM_COMMIT, PAGE_READWRITE); + if (*var == NULL) + p = *var; } if (!p) { - if (GetLastError () == ERROR_NOT_ENOUGH_MEMORY) + DWORD e = GetLastError (); + + if (e == ERROR_NOT_ENOUGH_MEMORY) errno = ENOMEM; else { - DebPrint (("mmap_alloc: error %ld\n", GetLastError ())); + DebPrint (("mmap_alloc: error %ld\n", e)); errno = EINVAL; } } @@ -683,6 +687,7 @@ void * mmap_realloc (void **var, size_t nbytes) { MEMORY_BASIC_INFORMATION memInfo, m2; + void *old_ptr; if (*var == NULL) return mmap_alloc (var, nbytes); @@ -694,12 +699,14 @@ mmap_realloc (void **var, size_t nbytes) return mmap_alloc (var, nbytes); } + memset (&memInfo, 0, sizeof (memInfo)); if (VirtualQuery (*var, &memInfo, sizeof (memInfo)) == 0) DebPrint (("mmap_realloc: VirtualQuery error = %ld\n", GetLastError ())); /* We need to enlarge the block. */ if (memInfo.RegionSize < nbytes) { + memset (&m2, 0, sizeof (m2)); if (VirtualQuery (*var + memInfo.RegionSize, &m2, sizeof(m2)) == 0) DebPrint (("mmap_realloc: VirtualQuery error = %ld\n", GetLastError ())); @@ -715,31 +722,31 @@ mmap_realloc (void **var, size_t nbytes) MEM_COMMIT, PAGE_READWRITE); if (!p /* && GetLastError() != ERROR_NOT_ENOUGH_MEMORY */) { - DebPrint (("realloc enlarge: VirtualAlloc error %ld\n", + DebPrint (("realloc enlarge: VirtualAlloc (%p + %I64x, %I64x) error %ld\n", + *var, (uint64_t)memInfo.RegionSize, + (uint64_t)(nbytes - memInfo.RegionSize), GetLastError ())); - errno = ENOMEM; + DebPrint (("next region: %p %p %I64x %x\n", m2.BaseAddress, + m2.AllocationBase, m2.RegionSize, m2.AllocationProtect)); } + else + return *var; + } + /* Else we must actually enlarge the block by allocating a new + one and copying previous contents from the old to the new one. */ + old_ptr = *var; + + if (mmap_alloc (var, nbytes)) + { + CopyMemory (*var, old_ptr, memInfo.RegionSize); + mmap_free (&old_ptr); return *var; } else { - /* Else we must actually enlarge the block by allocating a - new one and copying previous contents from the old to the - new one. */ - void *old_ptr = *var; - - if (mmap_alloc (var, nbytes)) - { - CopyMemory (*var, old_ptr, memInfo.RegionSize); - mmap_free (&old_ptr); - return *var; - } - else - { - /* We failed to enlarge the buffer. */ - *var = old_ptr; - return NULL; - } + /* We failed to reallocate the buffer. */ + *var = old_ptr; + return NULL; } } @@ -751,7 +758,7 @@ mmap_realloc (void **var, size_t nbytes) { /* Let's give some memory back to the system and release some pages. */ - void *old_ptr = *var; + old_ptr = *var; if (mmap_alloc (var, nbytes)) { commit 856cd948d1a5a016ad36721246a049d33451902f Author: Oscar Fuentes Date: Sun Feb 14 16:14:33 2016 +0100 Grep alias `all' shall not match parent directory * lisp/progmodes/grep.el (grep-files-aliases): Don't match parent directory for `all'. Fixes bug#22577 diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 7e6f157..f04a722 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -189,7 +189,7 @@ Customize or call the function `grep-apply-setting'." :group 'grep) (defcustom grep-files-aliases - '(("all" . "* .*") + '(("all" . "* .[!.]* ..?*") ;; Don't match `..'. See bug#22577 ("el" . "*.el") ("ch" . "*.[ch]") ("c" . "*.c") commit cc6d9064905418a11474585a2939fa60138fcfff Author: Glenn Morris Date: Sun Feb 14 07:26:10 2016 -0500 ; Auto-commit of ChangeLog files. diff --git a/ChangeLog.2 b/ChangeLog.2 index caa5135..f6d67e2 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,3 +1,15 @@ +2016-02-13 Nicolas Petton + + Bump version to 25.0.91 + + * README: + * configure.ac: + * msdos/sed2v2.inp: Bump version to 25.0.91. + +2016-02-13 Nicolas Petton + + * etc/AUTHORS: Update the AUTHORS file + 2016-02-13 Glenn Morris * lisp/dired-aux.el: Require cl-lib. (Bug#22613) @@ -27715,7 +27727,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to -commit 851decb15e0496cec0c48d980c88a5a9d7cc00da (inclusive). +commit 1af4493b1d487aa404e7ad72586971ebcb77afcb (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: commit 1af4493b1d487aa404e7ad72586971ebcb77afcb Author: Glenn Morris Date: Sun Feb 14 07:25:34 2016 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/dired.el b/lisp/dired.el index 64f4cee..24b128f 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3905,7 +3905,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;; Start of automatically extracted autoloads. -;;;### (autoloads nil "dired-aux" "dired-aux.el" "11abafc4f164a0e7599096a5f8deb455") +;;;### (autoloads nil "dired-aux" "dired-aux.el" "17b411edeac40022109eb6f705b83079") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ commit 23ca48d3d867cfff9f49ef600e2aad7a26c7a870 (tag: refs/tags/emacs-25.0.91) Author: Nicolas Petton Date: Sat Feb 13 20:30:37 2016 +0100 Bump version to 25.0.91 * README: * configure.ac: * msdos/sed2v2.inp: Bump version to 25.0.91. diff --git a/README b/README index 1f38965..fc17928 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ Copyright (C) 2001-2016 Free Software Foundation, Inc. See the end of the file for license conditions. -This directory tree holds version 25.0.90 of GNU Emacs, the extensible, +This directory tree holds version 25.0.91 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --git a/configure.ac b/configure.ac index 1ff9c49..26feb5b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see . AC_PREREQ(2.65) dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el. -AC_INIT(GNU Emacs, 25.0.90, bug-gnu-emacs@gnu.org) +AC_INIT(GNU Emacs, 25.0.91, bug-gnu-emacs@gnu.org) dnl Set emacs_config_options to the options of 'configure', quoted for the shell, dnl and then quoted again for a C string. Separate options with spaces. diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 1866585..ad4d5eb 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -66,7 +66,7 @@ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ /^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/ /^#undef PENDING_OUTPUT_COUNT/s/^.*$/#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)/ -/^#undef VERSION/s/^.*$/#define VERSION "25.0.90"/ +/^#undef VERSION/s/^.*$/#define VERSION "25.0.91"/ /^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/ /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ commit dacde7ee5d37a1fe685a489c65678a8f2c2535ce Author: Nicolas Petton Date: Sat Feb 13 20:30:18 2016 +0100 * etc/AUTHORS: Update the AUTHORS file diff --git a/etc/AUTHORS b/etc/AUTHORS index 7a58dc7..9a85a16 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -93,9 +93,9 @@ Alan Mackenzie: wrote cc-awk.el and co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el cc-fonts.el cc-langs.el cc-mode.el cc-styles.el cc-vars.el and changed cc-mode.texi bytecomp.el ispell.el isearch.el follow.el - font-lock.el programs.texi windows.texi cc-bytecomp.el lread.c subr.el - cconv.el display.texi frames.texi functions.texi syntax.c window.c - desktop.el edebug.el font-core.el jit-lock.el and 116 other files + font-lock.el programs.texi windows.texi cc-bytecomp.el frames.texi + lread.c subr.el cconv.el display.texi functions.texi syntax.c window.c + desktop.el edebug.el font-core.el jit-lock.el and 117 other files Alan Modra: changed unexelf.c @@ -105,6 +105,8 @@ Alan Shutko: changed diary-lib.el calendar.el bindings.el cal-hebrew.el easy-mmode.el gnus-sum.el ibuf-ext.el ibuffer.el lunar.el macros.el solar.el +Alan Third: changed emacs.c nsterm.h nsterm.m + Alastair Burt: changed gnus-art.el smiley.el Albert Krewinkel: co-wrote sieve-manage.el @@ -241,7 +243,7 @@ Andreas Rottmann: changed emacsclient.1 emacsclient.c misc.texi server.el Andreas Schwab: changed configure.ac lisp.h process.c xdisp.c alloc.c coding.c Makefile.in fileio.c files.el keyboard.c xterm.c lread.c editfns.c emacs.c fns.c src/Makefile.in print.c eval.c font.c sysdep.c - xfns.c and 634 other files + xfns.c and 635 other files Andreas Seltenreich: changed nnweb.el gnus.texi message.el gnus-sum.el gnus.el nnslashdot.el gnus-srvr.el gnus-util.el mm-url.el mm-uu.el @@ -352,10 +354,10 @@ Artur Malabarba: wrote character-fold-tests.el faces-tests.el isearch-tests.el let-alist.el simple-test.el sort-tests.el tabulated-list-test.el and changed package.el isearch.el character-fold.el files.el - tabulated-list.el package-test.el faces.el files-x.el menu-bar.el - replace.el align.el bytecomp.el help-fns.el cl-lib-tests.el custom.el - custom.texi map.el simple.el subr-tests.el variables.texi bindings.el - and 37 other files + tabulated-list.el package-test.el menu-bar.el faces.el files-x.el + help-fns.el replace.el align.el bytecomp.el custom.texi cl-lib-tests.el + custom.el map.el simple.el subr-tests.el variables.texi bindings.el + and 39 other files Arun Persaud: changed org-agenda.el org-src.el @@ -570,6 +572,8 @@ Carl Edman: co-wrote ns-win.el Carl Henrik Lunde: changed format-spec.el +Carlos Pita: changed erc-pcomplete.el + Carsten Bormann: changed ibmrs6000.h latin-post.el Carsten Dominik: wrote idlw-complete-structtag.el idlw-toolbar.el @@ -943,7 +947,8 @@ David De La Harpe Golden: changed files.el mouse.el simple.el fileio.c cus-start.el nsselect.m select.el w32-fns.el x-win.el xterm.c David Edmondson: changed message.el mml2015.el erc.el gnus-cite.el - imap.el mm-uu.el mm-view.el nnfolder.el nnimap.el nnml.el shr.el + imap.el mm-uu.el mm-view.el nnfolder.el nnimap.el nnml.el process.c + shr.el David Engster: wrote mairix.el nnmairix.el and co-wrote gitmerge.el @@ -1127,7 +1132,8 @@ and changed nntp.el message.el gnus-group.el gnus-sum.el gnus-msg.el Dieter Schuster: changed etags.c Dima Kogan: changed erc-backend.el font.c gud.el hideshow.el alloc.c - autorevert.el subword.el simple.el winner.el xfaces.c xgselect.c + autorevert.el image.c subword.el erc-button.el simple.el winner.el + xfaces.c xgselect.c Dirk Herrmann: co-wrote bibtex.el @@ -1153,7 +1159,7 @@ Dmitry Gutov: wrote elisp-mode-tests.el json-tests.el vc-hg.el and changed ruby-mode.el xref.el elisp-mode.el etags.el project.el ruby-mode-tests.el vc-git.el ruby.rb package.el vc.el js.el log-edit.el menu-bar.el vc-svn.el minibuffer.el package-test.el progmodes/grep.el - find-func.el lisp.el pulse.el simple.el and 81 other files + find-func.el lisp.el pulse.el simple.el and 82 other files Dmitry Kurochkin: changed isearch.el @@ -1235,8 +1241,8 @@ Eli Zaretskii: wrote [bidirectional display in xdisp.c] coding-tests.el rxvt.el tty-colors.el and changed xdisp.c msdos.c w32.c w32fns.c files.el display.texi fileio.c simple.el w32proc.c w32term.c dispnew.c emacs.c keyboard.c window.c - dispextern.h frames.texi INSTALL src/Makefile.in config.bat files.texi - sed1v2.inp and 959 other files + dispextern.h frames.texi src/Makefile.in INSTALL config.bat files.texi + sed1v2.inp and 979 other files Emanuele Giaquinta: changed configure.ac rxvt.el charset.c etags.c fontset.c frame.el gnus-faq.texi loadup.el lread.c sh-script.el @@ -1596,7 +1602,7 @@ and changed configure.ac Makefile.in src/Makefile.in calendar.el diary-lib.el lisp/Makefile.in files.el rmail.el progmodes/f90.el make-dist simple.el bytecomp.el emacs.texi misc/Makefile.in ack.texi lib-src/Makefile.in startup.el authors.el admin.el cal-menu.el - holidays.el and 1590 other files + holidays.el and 1593 other files Glynn Clements: wrote gamegrid.el snake.el tetris.el @@ -2393,7 +2399,7 @@ Karl Fogel: wrote bookmark.el mail-hist.el saveplace.el and changed simple.el files.el simple-test.el vc-svn.el doc-view.el image-mode.el info.el CONTRIBUTE INSTALL autogen.sh isearch.el menu-bar.el thingatpt.el vc-git.el vc-hg.el vc.el vc/vc-bzr.el - INSTALL.REPO comint.el configure configure.ac and 12 other files + INSTALL.REPO comint.el configure configure.ac and 13 other files Karl Heuer: changed keyboard.c lisp.h xdisp.c buffer.c xfns.c xterm.c alloc.c files.el frame.c configure.ac window.c data.c minibuf.c @@ -2424,7 +2430,7 @@ Katsumi Yamaoka: wrote canlock.el and changed gnus-art.el message.el gnus-sum.el gnus.texi mm-decode.el mm-util.el gnus-util.el mm-view.el gnus-msg.el gnus-group.el mml.el rfc2047.el gnus-start.el gnus.el shr.el nntp.el gnus-agent.el nnrss.el - mm-uu.el nnmail.el gnus-html.el and 153 other files + mm-uu.el nnmail.el emacs-mime.texi and 153 other files Kaushal Modi: changed calc-yank.el woman.el @@ -2504,6 +2510,8 @@ Kevin Blake: changed font-lock.el ring.el Kevin Broadey: wrote foldout.el +Kevin Brubeck Unhammer: changed erc-track.el + Kevin Christian: changed gnus-score.el Kevin Gallagher: wrote edt-lk201.el edt-mapper.el edt-pc.el edt-user.el @@ -2602,7 +2610,7 @@ Kurt Swanson: changed gnus-art.el gnus-salt.el gnus-sum.el gnus-ems.el Kyle Jones: wrote life.el and changed saveconf.el buffer.c mail-utils.el sendmail.el -Kyle Meyer: changed ox.el +Kyle Meyer: changed org-compat.el ox.el Kyotaro Horiguchi: changed coding.c indent.c @@ -2647,7 +2655,7 @@ and co-wrote gnus-kill.el gnus-mh.el gnus-msg.el gnus-score.el and changed gnus.texi gnus-cite.el smtpmail.el pop3.el gnus-xmas.el gnutls.c auth-source.el url-http.el files.el proto-stream.el subr.el dired.el simple.el imap.el image.c nnrss.el text.texi xml.c editfns.c - gnutls.el nnultimate.el and 248 other files + gnutls.el nnultimate.el and 249 other files Lars Rasmusson: changed ebrowse.c @@ -2690,7 +2698,7 @@ and changed octave.el ido.el rcirc.el lisp-mode.el files.el subr.el eldoc.el simple.el flymake.el smie.el abbrev.el progmodes/python.el cfengine.el cl-extra.el cl-macs.el emacs-lisp/cl-lib.el progmodes/compile.el register.el rng-valid.el window.el bindings.el - and 159 other files + and 160 other files Leonard H. Tower Jr.: changed rnews.el rnewspost.el emacsbug.el rmailout.el sendmail.el @@ -2919,8 +2927,8 @@ Martin Neitzel: changed supercite.el Martin Pohlack: changed iimage.el pc-select.el Martin Rudalics: changed window.el window.c windows.texi frame.c w32fns.c - xdisp.c w32term.c xterm.c frames.texi xfns.c frame.el help.el buffer.c - cus-start.el display.texi dispnew.c window.h dired.el nsfns.m frame.h + xdisp.c w32term.c frames.texi xterm.c xfns.c frame.el help.el buffer.c + display.texi cus-start.el dispnew.c window.h dired.el nsfns.m frame.h mouse.el and 177 other files Martin Stjernholm: wrote cc-bytecomp.el @@ -2974,6 +2982,8 @@ Matt Curtis: changed pulse.el Matt Fidler: changed package.el +Matthew Carter: changed sql.el + Matthew Junker: changed cal-tex.el Matthew Leach: changed arc-mode.el font-lock.el @@ -3033,7 +3043,7 @@ and changed tramp.texi dbusbind.c trampver.el trampver.texi tramp-adb.el ange-ftp.el dbus.texi files.el tramp-fish.el autorevert.el files.texi tramp-imap.el os.texi configure.ac lisp.h notifications.el gfilenotify.c keyboard.c tramp-vc.el inotify.c lisp/Makefile.in - and 122 other files + and 123 other files Michael Ben-Gershon: changed acorn.h configure.ac riscix1-1.h riscix1-2.h unexec.c @@ -3166,7 +3176,8 @@ Mike Haertel: changed 7300.h Mike Kazantsev: changed erc-dcc.el -Mike Kupfer: changed mh-comp.el mh-e.el mh-utils.el +Mike Kupfer: changed emacs-mime.texi gnus.texi mh-comp.el mh-e.el + mh-utils.el Mike Lamb: changed em-unix.el esh-util.el pcmpl-unix.el @@ -3318,10 +3329,10 @@ Nicolas Petton: wrote map-tests.el map.el seq-tests.el seq.el thunk-tests.el thunk.el and co-wrote auth-source-tests.el subr-tests.el and changed sequences.texi emacs.png emacs23.png obarray-tests.el - obarray.el arc-mode.el cl-extra.el emacs.svg Emacs.icns auth-source.el - authors.el emacs.ico Makefile.in README data.c emacs-document.svg - emacs-document23.svg emacs.texi emacs23.svg files.el fns.c - and 3 other files + obarray.el README arc-mode.el authors.el cl-extra.el emacs.svg + Emacs.icns Makefile.in auth-source.el configure.ac emacs.ico sed2v2.inp + data.c emacs-document.svg emacs-document23.svg emacs.texi emacs23.svg + and 5 other files Nicolas Richard: wrote cmds-tests.el and changed ffap.el package.el help.el keyboard.c landmark.el org.el @@ -3356,8 +3367,8 @@ and changed rsz-mini.el comint.el emacs-buffer.gdb files.el Makefile Noah Lavine: changed tramp.el -Noam Postavsky: changed buffer-tests.el cmdproxy.c process-tests.el - w32proc.c +Noam Postavsky: changed buffer-tests.el cmdproxy.c files.el + process-tests.el w32proc.c Nobuyoshi Nakada: co-wrote ruby-mode.el @@ -3379,6 +3390,8 @@ Nuutti Kotivuori: changed gnus-sum.el flow-fill.el gnus-cache.el Odd Gripenstam: wrote dcl-mode.el +Ogawa Hirofumi: changed gnus-sum.el nnimap.el + Ognyan Kulev: changed TUTORIAL.bg cyrillic.el Okazaki Tetsurou: changed cc-fonts.el vc-svn.el vc.el @@ -4097,7 +4110,7 @@ Sidney Markowitz: changed doctor.el nsmenu.m Sigbjorn Finne: changed gnus-srvr.el Simen Heggestøyl: changed css-mode.el json-tests.el json.el - scss-mode.scss files.el js.el scheme.el + scss-mode.scss css-mode.css files.el js.el scheme.el Simon Josefsson: wrote dig.el dns-mode.el flow-fill.el fringe.el imap.el mml-sec.el mml-smime.el password-cache.el rfc2104.el sieve-mode.el @@ -4330,8 +4343,8 @@ Ted Phelps: changed mh-search.el mh-e.el mh-folder.el mh-junk.el Ted Wiles: changed org-habit.el -Teemu Likonen: changed dired.el erc-backend.el gnus-agent.el indent.el - message.el +Teemu Likonen: changed dired.el erc-backend.el gnus-agent.el gnus.texi + indent.el message.el Teodor Zlatanov: wrote auth-source.el gnus-registry.el gnus-sync.el gnus-tests.el gnutls.el registry.el spam-report.el url-future-tests.el @@ -4592,7 +4605,7 @@ Valentin Wüstholz: changed org.el Valery Alexeev: changed cyril-util.el cyrillic.el -Vasilij Schneidermann: changed ielm.el tetris.el +Vasilij Schneidermann: changed eww.el ielm.el tetris.el Vasily Korytov: changed cyrillic.el message.el progmodes/python.el ruby-mode.el cperl-mode.el gnus-art.el gnus-dired.el gnus-msg.el commit 478ca5de5447900db471109c8114b8581e28c869 Author: Nicolas Petton Date: Sat Feb 13 20:28:54 2016 +0100 ; fix changelog entries diff --git a/ChangeLog.2 b/ChangeLog.2 index cfea4c7..caa5135 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -765,7 +765,7 @@ Improve newsticker-treeview-selection-face - * newst-treeview.el (newsticker-treeview-selection-face): Improve + * lisp/net/newst-treeview.el (newsticker-treeview-selection-face): Improve readability for dark background. 2016-02-04 Eli Zaretskii @@ -1022,7 +1022,7 @@ alias_method. Identify constants even if the assignment is not followed by whitespace. (Bug#22241) - * test/etags/ruby-src/test1.ruby: Add tests for constants, + * test/etags/ruby-src/test1.ru: Add tests for constants, accessors, and alias_method. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: @@ -1122,7 +1122,7 @@ * test/indent/css-mode.css: Add bang rule test case. - * test/indent/scss-mode.css: Add test cases for the introduced bang + * test/indent/scss-mode.scss: Add test cases for the introduced bang rules. 2016-02-01 Karl Fogel @@ -1191,7 +1191,7 @@ 2016-02-01 Kyle Meyer - * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399) + * lisp/org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399) 2016-01-31 Paul Eggert @@ -1440,7 +1440,7 @@ * etc/NEWS: Mention that constants are tagged by etags in Ruby. - * test/etags/ruby-src/test1.ruby: Add more tests. + * test/etags/ruby-src/test1.ru: Add more tests. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: @@ -5668,7 +5668,7 @@ (Ruby_help): Mention "module". * test/etags/ruby-src/test.rb: - * test/etags/ruby-src/test1.ruby: New files. + * test/etags/ruby-src/test1.ru: New files. * test/etags/Makefile (RBSRC): New tests. (SRCS): Add ${RBSRC}. * test/etags/ETAGS.good_1: commit 2b7d006460899f10ffc230ecbb632dfa39588dc7 Author: Nicolas Petton Date: Sat Feb 13 19:29:35 2016 +0100 ; make change-history-commit diff --git a/ChangeLog.2 b/ChangeLog.2 index 2226eb1..cfea4c7 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,3 +1,457 @@ +2016-02-13 Glenn Morris + + * lisp/dired-aux.el: Require cl-lib. (Bug#22613) + +2016-02-13 Eli Zaretskii + + Index tilde characters in names of backup files + + * doc/emacs/files.texi (Backup Names): Improve indexing. + (Bug#22625) + +2016-02-13 Eli Zaretskii + + Document deprecation of hi-lock-mode's 'C-x w' bindings + + * doc/emacs/display.texi (Highlight Interactively): Deprecate the + "C-x w" bindings of hi-lock-mode. + + * etc/NEWS: Mark the deprecation entry as documented. + +2016-02-13 Stefan Monnier + + Announce that the `C-x w' bindings are deprecated + +2016-02-13 Paul Eggert + + Suppress GNUstep hardening + + Fedora 23 normally hardens GNUstep applications, which causes + ‘./configure --with-ns’ to break Emacs’s funky way of undumping. + Fix this by eliding the hardening options (Bug#22518). + * src/Makefile.in (LIBS_GNUSTEP): Omit options like + ‘-specs=/usr/lib/rpm/redhat/redhat-hardened-ld’. + (GNU_OBJC_CFLAGS): Omit options like + ‘-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1’. + +2016-02-12 Eli Zaretskii + + Fix redisplay after a large insertion + + * src/xdisp.c (redisplay_internal): Don't accept the results of + "optimization 3" if the cursor ends up in a partially visible + glyph row. (Bug22637) + +2016-02-12 Andreas Schwab + + Revert "Fix gnus-group-get-new-news-this-group on group with closed server" + + This reverts commit 9dc77e37aa84c6df9b3ddb4609f3c09201b0580e. + + * lisp/gnus/nnimap.el (nnimap-change-group): Revert last + change. (Bug#22634) + +2016-02-11 Paul Eggert + + * lib-src/make-docfile.c: Include stdarg.h. + +2016-02-11 Alan Mackenzie + + Extend gpm-mouse-mode's doc string and doc to point out limitations. + + * lisp/t-mouse.el (gpm-mouse-mode): Extend doc string to indicate the + inability to transfer text between Emacs and other programs which use GPM. + + * doc/emacs/frames.texi (Text-Only Mouse): Note the inability to transfer text + between Emacs and other progrmas which use GPM. + +2016-02-11 Eli Zaretskii + + Revert "Backport: * lisp/isearch.el: Turn char-folding off by default" + + * lisp/isearch.el: Turn char-folding back oon by default. + + This reverts commit 12c50e82c9b432b2fc31f8fb2215f43ceea80822. + +2016-02-11 Lars Ingebrigtsen + + Revert "Support integer image rotation and respect EXIF rotations" + + This reverts commit 0f600496050bf435f55dc81056e06fcd45992dc8. + + This change does not work on Fedora. + +2016-02-11 Lars Ingebrigtsen + + Revert "Document EXIF image rotation" + + This reverts commit 10b8ed27ec91ff52f93eb0297dcc3abb214931aa. + + This change does not work on Fedora, for instance. + +2016-02-11 Paul Eggert + + Document OS X LANG default + + * doc/emacs/cmdargs.texi (General Variables): + Document OS X Language and Region system preference. + Suggested by Alan Third. + +2016-02-11 Alan Third + + Set locale when run from OS X GUI + + * src/emacs.c (main): Call ns_init_locale. + * src/nsterm.m (ns_init_locale): Get locale from OS and set LANG. + * src/nsterm.h: Include ns_init_locale. + +2016-02-10 Paul Eggert + + make-docfile cleanup for I/O, etc. + + * lib-src/make-docfile.c (progname, generate_globals, num_globals) + (num_globals_allocated, globals): Now static. + (generate_globals, struct rcsoc_state, read_c_string_or_comment): + (write_c_args, scan_c_stream, search_lisp_doc_at_eol, scan_lisp_file): + Use bool for boolean. + (verror): New function. + (fatal, error): Use it. API is now like printf. All callers changed. + (main): Remove err_count local that was always 0. + (main, scan_c_stream, scan_lisp_file): Check for I/O error. + (scan_file, scan_c_file, scan_c_stream, scan_lisp_file): + Return void, not 0. + (put_char, scan_keyword_or_put_char, scan_c_file): Use char for byte. + (scan_keyword_or_put_char): Check for missing ( and unexpected EOF. + (close_emacs_globals): Use ptrdiff_t for index, not int. + (scan_c_file, scan_lisp_file): Exit with failure if file cannot be + opened, rather than diagnosing but exiting with status 0. + (search_lisp_doc_at_eol): Don't worry about ungetc of EOF; it's + portable now. + +2016-02-10 Paul Eggert + + Memory-management cleanup in make-docfile + + I compiled it with -fsanitize=address and fixed the leaks it detected. + Also, I changed it to prefer signed to unsigned integer types, + and to check for integer overflow. + * lib-src/make-docfile.c: + Include , , , . + (memory_exhausted): New function. + (xmalloc, xrealloc): Use it. + (xmalloc, xrealloc, scan_file, struct rcsoc_state, write_c_args) + (uncompiled, scan_lisp_file): + Prefer signed integer types to unsigned. + (xstrdup): Remove. All uses removed. + (num_globals, num_globals_allocated, write_globals, scan_c_stream): + Use ptrdiff_t, not int, for indexes that in theory could exceed INT_MAX. + (add_global): Use const to pacify --enable-gcc-warnings. + Make a copy here, rather than relying on strdup calls later. + (add_global, write_globals, scan_c_stream): + Avoid integer overflow when calculating sizes. + (write_globals, scan_c_stream, scan_lisp_file): Avoid memory leak. + (scan_c_stream): Check for add_global failure. + +2016-02-10 Kevin Gallagher + + Kevin Gallagher has new email address + + * lisp/emulation/edt.el: + * lisp/emulation/edt-lk201.el: + * lisp/emulation/edt-mapper.el: + * lisp/emulation/edt-pc.el: + * lisp/emulation/edt-vt100.el: + * etc/edt-user.el: + * doc/misc/edt.texi: Update Kevin Gallagher's email address. + +2016-02-10 Eli Zaretskii + + Improve doc strings of 'forward/backward-word-strictly' + + * lisp/simple.el (backward-word): Refer to 'backward-word-strictly' + in the doc string. Suggested by Glenn Morris . + * lisp/subr.el (forward-word-strictly, backward-word-strictly): + Mention 'subword-mode' in the doc strings. + + * src/syntax.c (Fforward_word): Refer to 'forward-word-strictly' + in the doc string. (Bug#22560) + +2016-02-10 Michael Albinus + + Describe Makefile test targets in test/README + + * CONTRIBUTE: Move Makefile test targets to test/README. + + * Makefile.in: + * test/README: Describe Makefile test targets. + +2016-02-10 Artur Malabarba + + Backport: * lisp/isearch.el: Turn char-folding off by default + + (search-default-mode): Set default value to nil. + +2016-02-10 Lars Ingebrigtsen + + Document EXIF image rotation + + * doc/lispref/display.texi (ImageMagick Images): Mention EXIF rotation. + +2016-02-10 Dima Kogan + + Support integer image rotation and respect EXIF rotations + + * src/image.c (imagemagick_load_image): Allow integer rotations in + addition to floating point rotations (bug#22591). + * src/image.c (imagemagick_load_image): Images that have an + orientation given in EXIF and have no explicit :rotation tag are now + pre-rotated. All information such as width/height is reported for the + rotated image. + +2016-02-10 Matthew Carter + + Quote table names for postgres listings (sql-mode) + + * lisp/progmodes/sql.el (sql-postgres-completion-object): Avoid passing + unquoted table names to the completion list. + +2016-02-10 Juri Linkov + + * lisp/replace.el (replace-match-maybe-edit): Make arg `backward' optional. + + Doc fix. + (replace-search, replace-highlight): Make arg `backward' optional. + (Bug#18388) + +2016-02-10 Juri Linkov + + * lisp/simple.el (next-line-or-history-element): Reset temporary-goal-column. + + (previous-line-or-history-element): Reset temporary-goal-column. + Use end-of-visual-line instead of line-end-position. (Bug#22544) + +2016-02-10 Paul Eggert + + Suppress ACL ops if configured with --disable-acl + + Without this patch, some ACL operations were suppressed, but not all. + * src/fileio.c [!USE_ACL]: Do not include sys/acl.h. + (Ffile_acl, Fset_file_acl) [!USE_ACL]: Return nil in this case. + +2016-02-09 Katsumi Yamaoka + + Mention web bugs + + * doc/misc/emacs-mime.texi (Display Customization): + Mention web bugs in the mm-html-blocked-images section. + +2016-02-09 Katsumi Yamaoka + + Make mm-html-blocked-images default to "" again + + * lisp/gnus/mm-decode.el (mm-html-blocked-images): + Default to "" that blocks all external images. + + * doc/misc/emacs-mime.texi (Display Customization): + Mention that mm-html-blocked-images defaults to "". + +2016-02-09 Paul Eggert + + Minor alignas cleanup + + * src/lisp.h (alignas): Remove now-redundant #ifdef that was left + over from the old way of doing things, before Bug#20862 was fixed. + +2016-02-09 Paul Eggert + + Add lmalloc commentary and tweak laligned + + * src/alloc.c (laligned): Help compiler in a tiny way by putting + the more-commonly-failing disjunct first. + +2016-02-09 Eli Zaretskii + + Clarify documentation of key binding conventions + + * doc/lispref/tips.texi (Key Binding Conventions): Clarify which + "punctuation characters" are reserved after "C-c". (Bug#22604) + +2016-02-09 Oscar Fuentes + + * etc/NEWS: mention the `vc-faces' customization group + +2016-02-09 Paul Eggert + + Sync with gnulib + + This incorporates: + 2016-02-09 stdalign: port to clang 3.7.0 + 2016-02-06 misc: port better to gcc -fsanitize=address + * doc/misc/texinfo.tex, lib/stdalign.in.h, m4/acl.m4, m4/getgroups.m4: + Copy from gnulib. + +2016-02-09 Michael Albinus + + * CONTRIBUTE: Add more examples for $(SELECTOR) make variable. + +2016-02-09 Katsumi Yamaoka + + Make mm-html-inhibit-images and mm-html-blocked-images default to nil + + * lisp/gnus/mm-decode.el (mm-html-inhibit-images) + (mm-html-blocked-images): Default to nil. + + * doc/misc/emacs-mime.texi (Display Customization): Mention that + mm-html-inhibit-images and mm-html-blocked-images default to nil. + + * etc/NEWS (Gnus): Document mm-html-inhibit-images and + mm-html-blocked-images. + +2016-02-09 Paul Eggert + + Increase success rate of fallback lmalloc + + * src/alloc.c (lmalloc, lrealloc): Reallocate with (typically) + larger and larger sizes, to increase the probability that + the allocator will return a Lisp-aligned pointer. + +2016-02-09 Lars Ingebrigtsen + + Make backgrounds extend to the end of the lines in shr + + * lisp/net/shr.el (shr-face-background): Faces can also be on + the form `(:background "#fff)' (bug#22547). + +2016-02-09 Lars Ingebrigtsen + + Make the `R' command get the correct relative s + + * lisp/net/eww.el (eww-readable): Preserve the base URL so + that image expansions are fetched from the right place (bug#22605). + + (cherry picked from commit 8722e849f75ceafb82a1c17105e8ab76077a8ebc) + + Backport: + +2016-02-09 Mike Kupfer + + Fix typos in emacs-mime.texi and gnus.texi + + * doc/misc/emacs-mime.texi (Display Customization): + * doc/misc/gnus.texi (HTML): Fix typo. + +2016-02-09 Katsumi Yamaoka + + * doc/misc/emacs-mime.texi (Display Customization): + Doc fix for mm-html-inhibit-images. + +2016-02-09 Lars Ingebrigtsen + + Fix message-cross-post-followup-to group names + + * lisp/gnus/message.el (message-cross-post-followup-to): Don't + insert group names like "nntp+foo:zot", because those aren't valid. + +2016-02-09 David Edmondson + + Compare recipient and keys case-insensitively + + * lisp/gnus/mml2015.el: (mml-secure-check-user-id): When comparing a + recipient address with that from a key, do so in a case insensitive + manner (bug#22603). + +2016-02-08 Glenn Morris + + * lisp/gnus/mm-decode.el (mm-alist-to-plist): Doc fix. + +2016-02-08 Katsumi Yamaoka + + Refactor HTML images handling of Gnus and mm-* (a part of bug#21650) + + * doc/misc/emacs-mime.texi (Display Customization): + Remove mm-inline-text-html-with-images; add documentations for + mm-html-inhibit-images and mm-html-blocked-images. + + * lisp/gnus/gnus-art.el (gnus-article-show-images): + No need to bind mm-inline-text-html-with-images. + (gnus-bind-safe-url-regexp): Rename to gnus-bind-mm-vars. + (gnus-bind-mm-vars): Rename from gnus-bind-safe-url-regexp; + bind mm-html-inhibit-images and mm-html-blocked-images. + (gnus-mime-view-all-parts, gnus-mime-view-part-internally) + (gnus-mm-display-part, gnus-mime-display-single) + (gnus-mime-display-alternative): Use gnus-bind-mm-vars. + + * lisp/gnus/mm-decode.el (mm-inline-text-html-with-images): Remove. + (mm-html-inhibit-images, mm-html-blocked-images): New user options. + (mm-shr): Bind shr-inhibit-images and shr-blocked-images with + mm-html-inhibit-images and mm-html-blocked-images respectively + instead of gnus-inhibit-images and gnus-blocked-images. + + * lisp/gnus/mm-view.el (mm-setup-w3m): Use mm-html-inhibit-images + instead of mm-inline-text-html-with-images. + +2016-02-08 Paul Eggert + + Port to FreeBSD 11-CURRENT i386 + + Problem reported by Herbert J. Skuhra in: + http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00354.html + Instead of trying + * src/alloc.c (lmalloc, lrealloc, laligned): New functions. + (xmalloc, xzalloc, xrealloc, lisp_malloc): Use them. + (__alignof__) [!__GNUC__ && !__alignof__]: New macro. + (MALLOC_IS_GC_ALIGNED): New macro. + * src/lisp.h (NONPOINTER_BITS): Remove. All uses removed. + No longer needed now that alloc.c uses lmalloc and lrealloc. + +2016-02-08 Michael Albinus + + Some fixes in file-notify-tests.el + + * test/automated/file-notify-tests.el + (file-notify--test-with-events-check) + (file-notify--test-with-events-explainer): New defuns. + (file-notify--test-with-events): Use it. + (file-notify-test07-backup): Fix docstring. Some of the + backends fire two `changed' events. Backup by rename doesn't + work for kqueue. + +2016-02-07 Michael Albinus + + Fix Bug#22557 + + * lisp/filenotify.el (file-notify-callback): Do not send a + `stopped' event in case of backup by renaming. (Bug#22557) + + * test/automated/Makefile.in: Use $(SELECTOR_EXPENSIVE) for + all targets but check and check-maybe. + + * test/automated/file-notify-tests.el + (file-notify--test-read-event-timeout): New defconst. + (file-notify--deftest-remote, file-notify--wait-for-events) + (file-notify-test02-events) + (file-notify-test04-file-validity) + (file-notify-test06-many-events): Use it. + (file-notify--test-cleanup): Make it more robust. Delete also + backup file. + (file-notify-test07-backup): New test. + +2016-02-07 Paul Eggert + + Fix test for dladdr + + Problem reported by Andreas Schwab in: + http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00327.html + * configure.ac (dladdr): Link with LIBMODULES when checking for + this function. + +2016-02-07 Andreas Schwab + + Fix gnus-group-get-new-news-this-group on group with closed server + + * lisp/gnus/nnimap.el (nnimap-change-group): Lookup server + method and pass to nnimap-open-server. + 2016-02-07 Artur Malabarba * lisp/comint.el (comint-prompt-read-only): Clean tabs in docstring @@ -27261,7 +27715,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to -commit 4feb9621980f9534e920a8438e5776e98eefb752 (inclusive). +commit 851decb15e0496cec0c48d980c88a5a9d7cc00da (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: commit 851decb15e0496cec0c48d980c88a5a9d7cc00da Author: Glenn Morris Date: Sat Feb 13 13:18:17 2016 -0500 * lisp/dired-aux.el: Require cl-lib. (Bug#22613) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index ef1f387..d29abf3 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -35,6 +35,7 @@ ;;; Code: +(require 'cl-lib) ;; We need macros in dired.el to compile properly, ;; and we call subroutines in it too. (require 'dired) commit 47896c844614259de3663f55c7b9a8a46be9b0bb Author: Eli Zaretskii Date: Sat Feb 13 17:48:38 2016 +0200 ; Improve commentary in insdel.c * src/insdel.c (gap_left, gap_right, make_gap_larger) (make_gap_smaller): Improve commentary. diff --git a/src/insdel.c b/src/insdel.c index f0a4dcd..05f37d6 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -126,7 +126,10 @@ gap_left (ptrdiff_t charpos, ptrdiff_t bytepos, bool newgap) if (i == 0) break; /* If a quit is requested, stop copying now. - Change BYTEPOS to be where we have actually moved the gap to. */ + Change BYTEPOS to be where we have actually moved the gap to. + Note that this cannot happen when we are called to make the + gap larger or smaller, since make_gap_larger and + make_gap_smaller prevent QUIT by setting inhibit-quit. */ if (QUITP) { bytepos = new_s1; @@ -179,7 +182,10 @@ gap_right (ptrdiff_t charpos, ptrdiff_t bytepos) if (i == 0) break; /* If a quit is requested, stop copying now. - Change BYTEPOS to be where we have actually moved the gap to. */ + Change BYTEPOS to be where we have actually moved the gap to. + Note that this cannot happen when we are called to make the + gap larger or smaller, since make_gap_larger and + make_gap_smaller prevent QUIT by setting inhibit-quit. */ if (QUITP) { bytepos = new_s1; @@ -386,7 +392,9 @@ make_gap_larger (ptrdiff_t nbytes_added) enlarge_buffer_text (current_buffer, nbytes_added); - /* Prevent quitting in move_gap. */ + /* Prevent quitting in gap_left. We cannot allow a QUIT there, + because that would leave the buffer text in an inconsistent + state, with 2 gap holes instead of just one. */ tem = Vinhibit_quit; Vinhibit_quit = Qt; @@ -432,7 +440,9 @@ make_gap_smaller (ptrdiff_t nbytes_removed) if (GAP_SIZE - nbytes_removed < GAP_BYTES_MIN) nbytes_removed = GAP_SIZE - GAP_BYTES_MIN; - /* Prevent quitting in move_gap. */ + /* Prevent quitting in gap_right. We cannot allow a QUIT there, + because that would leave the buffer text in an inconsistent + state, with 2 gap holes instead of just one. */ tem = Vinhibit_quit; Vinhibit_quit = Qt; commit 53ca1e1acff83d5d1a55aa8c04071ceebf21b307 Author: Eli Zaretskii Date: Sat Feb 13 15:36:38 2016 +0200 Index tilde characters in names of backup files * doc/emacs/files.texi (Backup Names): Improve indexing. (Bug#22625) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 3d5562d..ab20d4a 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -530,11 +530,16 @@ another from the newly saved contents if you save again. @node Backup Names @subsubsection Single or Numbered Backups +@cindex backup file names +@cindex names of backup files +@cindex @file{~}, in names of backup files +@cindex tilde (@file{~}) at end of backup file name When Emacs makes a backup file, its name is normally constructed by appending @samp{~} to the file name being edited; thus, the backup file for @file{eval.c} would be @file{eval.c~}. +@cindex @file{~/.emacs.d/%backup%~} If access control stops Emacs from writing backup files under the usual names, it writes the backup file as @file{~/.emacs.d/%backup%~}. Only one such file can exist, so only the most recently made such commit d97f522d3d3fa18eba2962d53e6c197ace938cc2 Author: Eli Zaretskii Date: Sat Feb 13 11:02:28 2016 +0200 Document deprecation of hi-lock-mode's 'C-x w' bindings * doc/emacs/display.texi (Highlight Interactively): Deprecate the "C-x w" bindings of hi-lock-mode. * etc/NEWS: Mark the deprecation entry as documented. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 1b75a15..e3b2403 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -924,7 +924,10 @@ mode for all buffers, use @kbd{M-x global-hi-lock-mode} or place Hi Lock mode works like Font Lock mode (@pxref{Font Lock}), except that you specify explicitly the regular expressions to highlight. You -control them with these commands: +control them with the commands described below. (The key bindings +below that begin with @kbd{C-x w} are deprecated in favor of the +global @kbd{M-s h} bindings, and will be removed in some future Emacs +version.) @table @kbd @item M-s h r @var{regexp} @key{RET} @var{face} @key{RET} diff --git a/etc/NEWS b/etc/NEWS index 4eec4a6..f4ea3a0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -321,6 +321,7 @@ default. unsaved customizations and prompts user to customize (if found). It is intended for adding to 'kill-emacs-query-functions'. ++++ ** The old `C-x w' bindings in hi-lock-mode are officially deprecated in favor of the global `M-s h' bindings introduced in Emacs-23.1. They'll disappear soon. commit b55f06d83d0b59524405213eb6e26e85d4c8599c Author: Xue Fuqiao Date: Sat Feb 13 13:51:09 2016 +0800 ; * etc/NEWS: Use double spaces to end a sentence. diff --git a/etc/NEWS b/etc/NEWS index c2ea278..4eec4a6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -975,7 +975,7 @@ replace the face `compare-windows', which is now an obsolete alias for --- *** The VC state indicator in the mode line now has different faces -corresponding to each of the possible states. See the `vc-faces' +corresponding to each of the possible states. See the `vc-faces' customization group. --- commit 28bb21439add95e595230b5229a979df162a2d14 Author: Stefan Monnier Date: Fri Feb 12 22:33:30 2016 -0500 Announce that the `C-x w' bindings are deprecated diff --git a/etc/NEWS b/etc/NEWS index 70f9476..c2ea278 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -321,6 +321,10 @@ default. unsaved customizations and prompts user to customize (if found). It is intended for adding to 'kill-emacs-query-functions'. +** The old `C-x w' bindings in hi-lock-mode are officially deprecated +in favor of the global `M-s h' bindings introduced in Emacs-23.1. +They'll disappear soon. + * Changes in Specialized Modes and Packages in Emacs 25.1 commit 1c98f989911442e552f597c74606a220f9315ae8 Author: Paul Eggert Date: Fri Feb 12 16:23:25 2016 -0800 Suppress GNUstep hardening Fedora 23 normally hardens GNUstep applications, which causes ‘./configure --with-ns’ to break Emacs’s funky way of undumping. Fix this by eliding the hardening options (Bug#22518). * src/Makefile.in (LIBS_GNUSTEP): Omit options like ‘-specs=/usr/lib/rpm/redhat/redhat-hardened-ld’. (GNU_OBJC_CFLAGS): Omit options like ‘-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1’. diff --git a/src/Makefile.in b/src/Makefile.in index f99a2f4..1f0df6f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -214,8 +214,8 @@ LIBX_OTHER=@LIBX_OTHER@ ## configure, which should set it to nil in non-X builds. LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE) -## Only used for GNUstep -LIBS_GNUSTEP=@LIBS_GNUSTEP@ +## Used only for GNUstep. +LIBS_GNUSTEP=$(patsubst -specs=%-hardened-ld,,@LIBS_GNUSTEP@) LIBSOUND= @LIBSOUND@ CFLAGS_SOUND= @CFLAGS_SOUND@ @@ -268,8 +268,8 @@ MSDOS_X_OBJ = NS_OBJ=@NS_OBJ@ ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o ns_fontfile if HAVE_NS. NS_OBJC_OBJ=@NS_OBJC_OBJ@ -## Only set if NS_IMPL_GNUSTEP. -GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@ +## Used only for GNUstep. +GNU_OBJC_CFLAGS=$(patsubst -specs=%-hardened-cc1,,@GNU_OBJC_CFLAGS@) ## w32fns.o w32menu.c w32reg.o fringe.o fontset.o w32font.o w32term.o ## w32xfns.o w32select.o image.o w32uniscribe.o if HAVE_W32, else ## empty. commit d82f24ba8530eb8de04a319cc80742a0a953040e Author: Eli Zaretskii Date: Fri Feb 12 21:38:44 2016 +0200 Fix redisplay after a large insertion * src/xdisp.c (redisplay_internal): Don't accept the results of "optimization 3" if the cursor ends up in a partially visible glyph row. (Bug22637) diff --git a/src/xdisp.c b/src/xdisp.c index 8f1e98d..840699d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -825,6 +825,7 @@ static Lisp_Object redisplay_window_1 (Lisp_Object); static bool set_cursor_from_row (struct window *, struct glyph_row *, struct glyph_matrix *, ptrdiff_t, ptrdiff_t, int, int); +static bool cursor_row_fully_visible_p (struct window *, bool, bool); static bool update_menu_bar (struct frame *, bool, bool); static bool try_window_reusing_current_matrix (struct window *); static int try_window_id (struct window *); @@ -13881,11 +13882,16 @@ redisplay_internal (void) eassert (this_line_vpos == it.vpos); eassert (this_line_y == it.current_y); set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); + if (cursor_row_fully_visible_p (w, false, true)) + { #ifdef GLYPH_DEBUG - *w->desired_matrix->method = 0; - debug_method_add (w, "optimization 3"); + *w->desired_matrix->method = 0; + debug_method_add (w, "optimization 3"); #endif - goto update; + goto update; + } + else + goto cancel; } else goto cancel; commit 85a2753d96c5316f63eca20759fc9a1126545ad7 Author: Andreas Schwab Date: Fri Feb 12 11:41:29 2016 +0100 Revert "Fix gnus-group-get-new-news-this-group on group with closed server" This reverts commit 9dc77e37aa84c6df9b3ddb4609f3c09201b0580e. * lisp/gnus/nnimap.el (nnimap-change-group): Revert last change. (Bug#22634) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 130658c..c285bef 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1831,9 +1831,7 @@ Return the server's response to the SELECT or EXAMINE command." (let ((open-result t)) (when (and server (not (nnimap-server-opened server))) - (let ((method (gnus-server-to-method server))) - (setq open-result (nnimap-open-server (nth 1 method) (nthcdr 2 method) - no-reconnect)))) + (setq open-result (nnimap-open-server server nil no-reconnect))) (cond ((not open-result) nil) commit e8e3bd0ff020b2edf6bd8955de97e45837ef98d4 Author: Eli Zaretskii Date: Fri Feb 12 09:04:52 2016 +0200 ; Improve merge documentation in CONTRIBUTE * CONTRIBUTE (branches): Tell how to avoid merging of non-backported changes. diff --git a/CONTRIBUTE b/CONTRIBUTE index d8e102d..74d340a 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -184,15 +184,19 @@ If you are fixing a bug that exists in the current release, be sure to commit it to the release branch; it will be merged to the master branch later. -However, if you know that the change will be difficult to merge to the -trunk (eg because the trunk code has changed a lot), you can apply the -change to both trunk and branch yourself. It could also happen that a -change is cherry-picked from master to the release branch, and so -doesn't need to be merged back. In these cases, indicate in the -release branch commit log that there is no need to merge the commit to -the trunk; start the commit message with "Backport:". gitmerge.el -will then exclude that commit from the merge to trunk. - +However, if you know that the change will be difficult to merge to +master (eg because the code on master has changed a lot), you can +apply the change to both master and branch yourself. It could also +happen that a change is cherry-picked from master to the release +branch, and so doesn't need to be merged back. In these cases, +indicate in the release branch commit log that there is no need to +merge the commit to master; start the commit message with "Backport:". +gitmerge.el will then exclude that commit from the merge to trunk. + +Some changes should not be merged to master at all, for whatever +reasons. These should be marked by including something like "Do not +merge to master" or anything that matches gitmerge-skip-regexp (see +gitmerge.el) in the log message. ** Other process information commit 5eb9989f9b573d3823d609a9c19c8934f4acb298 Author: Paul Eggert Date: Thu Feb 11 12:50:48 2016 -0800 * lib-src/make-docfile.c: Include stdarg.h. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 12222c3..e266207 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -36,6 +36,7 @@ along with GNU Emacs. If not, see . */ #include +#include #include #include #include commit c95ebbf8605496439fdede3684628daa96da14d8 Author: Alan Mackenzie Date: Thu Feb 11 09:54:36 2016 +0000 Extend gpm-mouse-mode's doc string and doc to point out limitations. * lisp/t-mouse.el (gpm-mouse-mode): Extend doc string to indicate the inability to transfer text between Emacs and other programs which use GPM. * doc/emacs/frames.texi (Text-Only Mouse): Note the inability to transfer text between Emacs and other progrmas which use GPM. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 5fbe0fc..35b3f83 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -1275,7 +1275,10 @@ again. @findex gpm-mouse-mode In the console on GNU/Linux, you can use @kbd{M-x gpm-mouse-mode} to enable mouse support. You must have the gpm server installed and -running on your system in order for this to work. +running on your system in order for this to work. Note that when +this mode is enabled, you cannot use the mouse to transfer text +between Emacs and other programs which use GPM. This is due to +limitations in GPM and the Linux kernel. @iftex @xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}, diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el index bbdd08a..5ea1bdd 100644 --- a/lisp/t-mouse.el +++ b/lisp/t-mouse.el @@ -73,7 +73,11 @@ the mode if ARG is omitted or nil. This allows the use of the mouse when operating on a GNU/Linux console, in the same way as you can use the mouse under X11. -It relies on the `gpm' daemon being activated." +It relies on the `gpm' daemon being activated. + +Note that when `gpm-mouse-mode' is enabled, you cannot use the +mouse to transfer text between Emacs and other programs which use +GPM. This is due to limitations in GPM and the Linux kernel." :global t :group 'mouse :init-value t (dolist (terminal (terminal-list)) (when (and (eq t (terminal-live-p terminal)) commit a91b4b51ddf2575d821adb8b84fdf32cff83886e Author: Eli Zaretskii Date: Thu Feb 11 05:37:20 2016 +0200 Revert "Backport: * lisp/isearch.el: Turn char-folding off by default" * lisp/isearch.el: Turn char-folding back oon by default. This reverts commit 12c50e82c9b432b2fc31f8fb2215f43ceea80822. diff --git a/lisp/isearch.el b/lisp/isearch.el index 98f55a9..2efa4c7 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -224,7 +224,7 @@ Default value, nil, means edit the string instead." (autoload 'character-fold-to-regexp "character-fold") -(defcustom search-default-mode nil +(defcustom search-default-mode #'character-fold-to-regexp "Default mode to use when starting isearch. Value is nil, t, or a function. commit f5d6b9bb5b307067547f0b26c74e9f538464bfc6 Author: Lars Ingebrigtsen Date: Thu Feb 11 14:05:24 2016 +1100 Revert "Support integer image rotation and respect EXIF rotations" This reverts commit 0f600496050bf435f55dc81056e06fcd45992dc8. This change does not work on Fedora. diff --git a/src/image.c b/src/image.c index 45abfc7..144fe30 100644 --- a/src/image.c +++ b/src/image.c @@ -8546,16 +8546,6 @@ imagemagick_load_image (struct frame *f, struct image *img, return 0; } - /* If no :rotation is explicitly specified, apply the automatic - rotation from EXIF. */ - if (NILP (image_spec_value (img->spec, QCrotation, NULL))) - if (MagickAutoOrientImage (image_wand) == MagickFalse) - { - image_error ("Error applying automatic orientation in image `%s'", img->spec); - DestroyMagickWand (image_wand); - return 0; - } - if (ino < 0 || ino >= MagickGetNumberImages (image_wand)) { image_error ("Invalid image number `%s' in image `%s'", image, img->spec); @@ -8656,7 +8646,7 @@ imagemagick_load_image (struct frame *f, struct image *img, image_spec_value (img->spec, QCbackground, NULL); if (!STRINGP (specified_bg). */ value = image_spec_value (img->spec, QCrotation, NULL); - if (FLOATP (value) || INTEGERP (value)) + if (FLOATP (value)) { rotation = extract_float (value); status = MagickRotateImage (image_wand, bg_wand, rotation); commit afe7d1f72f78cfd8ce4b6fec6b0be49f49751fd2 Author: Lars Ingebrigtsen Date: Thu Feb 11 14:05:02 2016 +1100 Revert "Document EXIF image rotation" This reverts commit 10b8ed27ec91ff52f93eb0297dcc3abb214931aa. This change does not work on Fedora, for instance. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 1ba9123..3238959 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -5205,9 +5205,7 @@ when the image does not have an associated file name, to provide a hint to ImageMagick to help it detect the image type. @item :rotation @var{angle} -Specifies a rotation angle in degrees. If no rotation is explicitly -specified, and the @acronym{EXIF} headers specify a rotation, the -rotation from the @acronym{EXIF} headers are used instead. +Specifies a rotation angle in degrees. @item :index @var{frame} @c Doesn't work: http://debbugs.gnu.org/7978 diff --git a/etc/NEWS b/etc/NEWS index c133868..70f9476 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -634,10 +634,6 @@ text in the region. The search engine to use for this is specified by the customizable variable `eww-search-prefix'. +++ -*** Images that have rotation specified in the EXIF headers are now -automatically rotated (if displayed as ImageMagick images). - -+++ *** Query-replace history is enhanced. When query-replace reads the FROM string from the minibuffer, typing `M-p' will now show previous replacements as "FROM SEP TO", where FROM commit c6f377cbae09a77d4f77e092d29bf611a3a37ff3 Author: Paul Eggert Date: Wed Feb 10 18:35:26 2016 -0800 Document OS X LANG default * doc/emacs/cmdargs.texi (General Variables): Document OS X Language and Region system preference. Suggested by Alan Third. diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index a1b0b09..a842cb8 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -550,10 +550,11 @@ variables is not set, the category defaults to the value of the @env{LANG} is not set. But if @env{LC_ALL} is specified, it overrides the settings of all the other locale environment variables. -On MS-Windows, if @env{LANG} is not already set in the environment -when Emacs starts, Emacs sets it based on the system-wide default -language, which you can set in the @samp{Regional Settings} Control Panel -on some versions of MS-Windows. +On MS-Windows and OS X, if @env{LANG} is not already set in the +environment, Emacs sets it based on the system-wide default. You can +set this in the ``Regional Settings'' Control Panel on some versions +of MS-Windows, and in the ``Language and Region'' System Preference on +OS X. The value of the @env{LC_CTYPE} category is matched against entries in @code{locale-language-names}, commit eb4a18c7db2286bcb9d9ea8f392175a28a86772c Author: Alan Third Date: Wed Feb 10 18:27:50 2016 -0800 Set locale when run from OS X GUI * src/emacs.c (main): Call ns_init_locale. * src/nsterm.m (ns_init_locale): Get locale from OS and set LANG. * src/nsterm.h: Include ns_init_locale. diff --git a/src/emacs.c b/src/emacs.c index e3cfad0..ab5d777 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1310,6 +1310,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem init_ntproc (dumping); /* must precede init_editfns. */ #endif +#ifdef HAVE_NS + /* Initialise the locale from user defaults. */ + ns_init_locale(); +#endif + /* Initialize and GC-protect Vinitial_environment and Vprocess_environment before set_initial_environment fills them in. */ diff --git a/src/nsterm.h b/src/nsterm.h index 6ca584e..fa5399c 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -1141,6 +1141,8 @@ extern void ns_retain_object (void *obj); extern void *ns_alloc_autorelease_pool (void); extern void ns_release_autorelease_pool (void *); extern const char *ns_get_defaults_value (const char *key); +extern void ns_init_locale (void); + /* in nsmenu */ extern void update_frame_tool_bar (struct frame *f); diff --git a/src/nsterm.m b/src/nsterm.m index f77aadb..43d1377 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -586,6 +586,27 @@ ns_load_path (void) void +ns_init_locale (void) +/* OS X doesn't set any environment variables for the locale when run + from the GUI. Get the locale from the OS and set LANG. */ +{ + NSLocale *locale = [NSLocale currentLocale]; + + NSTRACE ("ns_init_locale"); + + @try + { + /* Set LANG to locale, but not if LANG is already set. */ + setenv("LANG", [[locale localeIdentifier] UTF8String], 0); + } + @catch (NSException *e) + { + NSLog (@"Locale detection failed: %@: %@", [e name], [e reason]); + } +} + + +void ns_release_object (void *obj) /* -------------------------------------------------------------------------- Release an object (callable from C) commit 456c0a3137bf58ee61a8e442cff0ca5d808e8d32 Author: Paul Eggert Date: Wed Feb 10 11:40:09 2016 -0800 make-docfile cleanup for I/O, etc. * lib-src/make-docfile.c (progname, generate_globals, num_globals) (num_globals_allocated, globals): Now static. (generate_globals, struct rcsoc_state, read_c_string_or_comment): (write_c_args, scan_c_stream, search_lisp_doc_at_eol, scan_lisp_file): Use bool for boolean. (verror): New function. (fatal, error): Use it. API is now like printf. All callers changed. (main): Remove err_count local that was always 0. (main, scan_c_stream, scan_lisp_file): Check for I/O error. (scan_file, scan_c_file, scan_c_stream, scan_lisp_file): Return void, not 0. (put_char, scan_keyword_or_put_char, scan_c_file): Use char for byte. (scan_keyword_or_put_char): Check for missing ( and unexpected EOF. (close_emacs_globals): Use ptrdiff_t for index, not int. (scan_c_file, scan_lisp_file): Exit with failure if file cannot be opened, rather than diagnosing but exiting with status 0. (search_lisp_doc_at_eol): Don't worry about ungetc of EOF; it's portable now. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 4ab3729..12222c3 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -65,46 +65,58 @@ along with GNU Emacs. If not, see . */ #define IS_SLASH(c) ((c) == '/') #endif /* not DOS_NT */ -static int scan_file (char *filename); -static int scan_lisp_file (const char *filename, const char *mode); -static int scan_c_file (char *filename, const char *mode); -static int scan_c_stream (FILE *infile); +static void scan_file (char *filename); +static void scan_lisp_file (const char *filename, const char *mode); +static void scan_c_file (char *filename, const char *mode); +static void scan_c_stream (FILE *infile); static void start_globals (void); static void write_globals (void); #include /* Name this program was invoked with. */ -char *progname; +static char *progname; -/* Nonzero if this invocation is generating globals.h. */ -int generate_globals; +/* True if this invocation is generating globals.h. */ +static bool generate_globals; -/* Print error message. `s1' is printf control string, `s2' is arg for it. */ +/* Print error message. Args are like vprintf. */ -/* VARARGS1 */ -static void -error (const char *s1, const char *s2) +static void ATTRIBUTE_FORMAT_PRINTF (1, 0) +verror (char const *m, va_list ap) { fprintf (stderr, "%s: ", progname); - fprintf (stderr, s1, s2); + vfprintf (stderr, m, ap); fprintf (stderr, "\n"); } -/* Print error message and exit. */ +/* Print error message. Args are like printf. */ -/* VARARGS1 */ -static _Noreturn void -fatal (const char *s1, const char *s2) +static void ATTRIBUTE_FORMAT_PRINTF (1, 2) +error (char const *m, ...) +{ + va_list ap; + va_start (ap, m); + verror (m, ap); + va_end (ap); +} + +/* Print error message and exit. Args are like printf. */ + +static _Noreturn void ATTRIBUTE_FORMAT_PRINTF (1, 2) +fatal (char const *m, ...) { - error (s1, s2); + va_list ap; + va_start (ap, m); + verror (m, ap); + va_end (ap); exit (EXIT_FAILURE); } static _Noreturn void memory_exhausted (void) { - fatal ("virtual memory exhausted", 0); + fatal ("virtual memory exhausted"); } /* Like malloc but get fatal error if memory is exhausted. */ @@ -134,7 +146,6 @@ int main (int argc, char **argv) { int i; - int err_count = 0; progname = argv[0]; @@ -169,7 +180,7 @@ main (int argc, char **argv) } if (argc > i && !strcmp (argv[i], "-g")) { - generate_globals = 1; + generate_globals = true; ++i; } @@ -191,14 +202,17 @@ main (int argc, char **argv) if (strcmp (argv[i], argv[j]) == 0) break; if (j == i) - err_count += scan_file (argv[i]); + scan_file (argv[i]); } } - if (err_count == 0 && generate_globals) + if (generate_globals) write_globals (); - return (err_count > 0 ? EXIT_FAILURE : EXIT_SUCCESS); + if (ferror (stdout) || fclose (stdout) != 0) + fatal ("write error"); + + return EXIT_SUCCESS; } /* Add a source file name boundary marker in the output file. */ @@ -217,9 +231,9 @@ put_filename (char *filename) } /* Read file FILENAME and output its doc strings to stdout. - Return 1 if file is not found, 0 if it is found. */ + Return true if file is found, false otherwise. */ -static int +static void scan_file (char *filename) { ptrdiff_t len = strlen (filename); @@ -227,11 +241,11 @@ scan_file (char *filename) if (!generate_globals) put_filename (filename); if (len > 4 && !strcmp (filename + len - 4, ".elc")) - return scan_lisp_file (filename, "rb"); + scan_lisp_file (filename, "rb"); else if (len > 3 && !strcmp (filename + len - 3, ".el")) - return scan_lisp_file (filename, "r"); + scan_lisp_file (filename, "r"); else - return scan_c_file (filename, "r"); + scan_c_file (filename, "r"); } static void @@ -265,16 +279,16 @@ struct rcsoc_state the input stream. */ const char *cur_keyword_ptr; /* Set to true if we saw an occurrence of KEYWORD. */ - int saw_keyword; + bool saw_keyword; }; /* Output CH to the file or buffer in STATE. Any pending newlines or spaces are output first. */ static void -put_char (int ch, struct rcsoc_state *state) +put_char (char ch, struct rcsoc_state *state) { - int out_ch; + char out_ch; do { if (state->pending_newlines > 0) @@ -305,7 +319,7 @@ put_char (int ch, struct rcsoc_state *state) keyword, but were in fact not. */ static void -scan_keyword_or_put_char (int ch, struct rcsoc_state *state) +scan_keyword_or_put_char (char ch, struct rcsoc_state *state) { if (state->keyword && *state->cur_keyword_ptr == ch @@ -317,7 +331,7 @@ scan_keyword_or_put_char (int ch, struct rcsoc_state *state) if (*++state->cur_keyword_ptr == '\0') /* Saw the whole keyword. Set SAW_KEYWORD flag to true. */ { - state->saw_keyword = 1; + state->saw_keyword = true; /* Reset the scanning pointer. */ state->cur_keyword_ptr = state->keyword; @@ -328,22 +342,29 @@ scan_keyword_or_put_char (int ch, struct rcsoc_state *state) /* Skip any whitespace between the keyword and the usage string. */ + int c; do - ch = getc (state->in_file); - while (ch == ' ' || ch == '\n'); + c = getc (state->in_file); + while (c == ' ' || c == '\n'); /* Output the open-paren we just read. */ - put_char (ch, state); + if (c != '(') + fatal ("Missing '(' after keyword"); + put_char (c, state); /* Skip the function name and replace it with `fn'. */ do - ch = getc (state->in_file); - while (ch != ' ' && ch != ')'); + { + c = getc (state->in_file); + if (c == EOF) + fatal ("Unexpected EOF after keyword"); + } + while (c != ' ' && c != ')'); put_char ('f', state); put_char ('n', state); /* Put back the last character. */ - ungetc (ch, state->in_file); + ungetc (c, state->in_file); } } else @@ -367,18 +388,19 @@ scan_keyword_or_put_char (int ch, struct rcsoc_state *state) /* Skip a C string or C-style comment from INFILE, and return the - character that follows. COMMENT non-zero means skip a comment. If + byte that follows, or EOF. COMMENT means skip a comment. If PRINTFLAG is positive, output string contents to stdout. If it is negative, store contents in buf. Convert escape sequences \n and \t to newline and tab; discard \ followed by newline. - If SAW_USAGE is non-zero, then any occurrences of the string `usage:' + If SAW_USAGE is non-null, then any occurrences of the string "usage:" at the beginning of a line will be removed, and *SAW_USAGE set to true if any were encountered. */ static int -read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usage) +read_c_string_or_comment (FILE *infile, int printflag, bool comment, + bool *saw_usage) { - register int c; + int c; struct rcsoc_state state; state.in_file = infile; @@ -388,7 +410,7 @@ read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usa state.pending_newlines = 0; state.keyword = (saw_usage ? "usage:" : 0); state.cur_keyword_ptr = state.keyword; - state.saw_keyword = 0; + state.saw_keyword = false; c = getc (infile); if (comment) @@ -467,7 +489,7 @@ static void write_c_args (char *func, char *buf, int minargs, int maxargs) { char *p; - int in_ident = 0; + bool in_ident = false; char *ident_start IF_LINT (= NULL); ptrdiff_t ident_length = 0; @@ -489,12 +511,12 @@ write_c_args (char *func, char *buf, int minargs, int maxargs) { if (!in_ident) { - in_ident = 1; + in_ident = true; ident_start = p; } else { - in_ident = 0; + in_ident = false; ident_length = p - ident_start; } } @@ -573,9 +595,9 @@ enum { DEFUN_noreturn = 1, DEFUN_const = 2 }; /* All the variable names we saw while scanning C sources in `-g' mode. */ -ptrdiff_t num_globals; -ptrdiff_t num_globals_allocated; -struct global *globals; +static ptrdiff_t num_globals; +static ptrdiff_t num_globals_allocated; +static struct global *globals; static struct global * add_global (enum global_type type, char const *name, int value, @@ -636,7 +658,7 @@ compare_globals (const void *a, const void *b) } static void -close_emacs_globals (int num_symbols) +close_emacs_globals (ptrdiff_t num_symbols) { printf (("};\n" "extern struct emacs_globals globals;\n" @@ -644,7 +666,7 @@ close_emacs_globals (int num_symbols) "#ifndef DEFINE_SYMBOLS\n" "extern\n" "#endif\n" - "struct Lisp_Symbol alignas (GCALIGNMENT) lispsym[%d];\n"), + "struct Lisp_Symbol alignas (GCALIGNMENT) lispsym[%td];\n"), num_symbols); } @@ -700,7 +722,7 @@ write_globals (void) } break; default: - fatal ("not a recognized DEFVAR_", 0); + fatal ("not a recognized DEFVAR_"); } if (type) @@ -761,11 +783,11 @@ write_globals (void) Looks for DEFUN constructs such as are defined in ../src/lisp.h. Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED. */ -static int +static void scan_c_file (char *filename, const char *mode) { FILE *infile; - int extension = filename[strlen (filename) - 1]; + char extension = filename[strlen (filename) - 1]; if (extension == 'o') filename[strlen (filename) - 1] = 'c'; @@ -781,16 +803,15 @@ scan_c_file (char *filename, const char *mode) filename[strlen (filename) - 1] = 'c'; /* Don't confuse people. */ } - /* No error if non-ex input file. */ if (infile == NULL) { perror (filename); - return 0; + exit (EXIT_FAILURE); } /* Reset extension to be able to detect duplicate files. */ filename[strlen (filename) - 1] = extension; - return scan_c_stream (infile); + scan_c_stream (infile); } /* Return 1 if next input from INFILE is equal to P, -1 if EOF, @@ -810,7 +831,7 @@ stream_match (FILE *infile, const char *p) return 1; } -static int +static void scan_c_stream (FILE *infile) { int commas, minargs, maxargs; @@ -818,10 +839,10 @@ scan_c_stream (FILE *infile) while (!feof (infile)) { - int doc_keyword = 0; - int defunflag = 0; - int defvarperbufferflag = 0; - int defvarflag = 0; + bool doc_keyword = false; + bool defunflag = false; + bool defvarperbufferflag = false; + bool defvarflag = false; enum global_type type = INVALID; static char *name; static ptrdiff_t name_size; @@ -870,7 +891,7 @@ scan_c_stream (FILE *infile) if (c != '_') continue; - defvarflag = 1; + defvarflag = true; c = getc (infile); defvarperbufferflag = (c == 'P'); @@ -924,7 +945,7 @@ scan_c_stream (FILE *infile) c = getc (infile); if (c != '"') continue; - c = read_c_string_or_comment (infile, -1, 0, 0); + c = read_c_string_or_comment (infile, -1, false, 0); } if (generate_globals) @@ -970,7 +991,7 @@ scan_c_stream (FILE *infile) while (c == ' ' || c == '\t' || c == '\n' || c == '\r'); if (c != '"') continue; - c = read_c_string_or_comment (infile, -1, 0, 0); + c = read_c_string_or_comment (infile, -1, false, 0); svalue = input_buffer; } @@ -1102,7 +1123,7 @@ scan_c_stream (FILE *infile) c = getc (infile); if (c == '"') - c = read_c_string_or_comment (infile, 0, 0, 0); + c = read_c_string_or_comment (infile, 0, false, 0); while (c != EOF && c != ',' && c != '/') c = getc (infile); @@ -1115,7 +1136,7 @@ scan_c_stream (FILE *infile) c = getc (infile); if (c == ':') { - doc_keyword = 1; + doc_keyword = true; c = getc (infile); while (c == ' ' || c == '\n' || c == '\r' || c == '\t') c = getc (infile); @@ -1128,8 +1149,8 @@ scan_c_stream (FILE *infile) ungetc (c, infile), c == '*'))) { - int comment = c != '"'; - int saw_usage; + bool comment = c != '"'; + bool saw_usage; printf ("\037%c%s\n", defvarflag ? 'V' : 'F', input_buffer); @@ -1183,8 +1204,8 @@ scan_c_stream (FILE *infile) } } eof: - fclose (infile); - return 0; + if (ferror (infile) || fclose (infile) != 0) + fatal ("read error"); } /* Read a file of Lisp code, compiled or interpreted. @@ -1260,7 +1281,7 @@ read_lisp_symbol (FILE *infile, char *buffer) skip_white (infile); } -static int +static bool search_lisp_doc_at_eol (FILE *infile) { int c = 0, c1 = 0, c2 = 0; @@ -1280,16 +1301,15 @@ search_lisp_doc_at_eol (FILE *infile) #ifdef DEBUG fprintf (stderr, "## non-docstring found\n"); #endif - if (c != EOF) - ungetc (c, infile); - return 0; + ungetc (c, infile); + return false; } - return 1; + return true; } #define DEF_ELISP_FILE(fn) { #fn, sizeof(#fn) - 1 } -static int +static void scan_lisp_file (const char *filename, const char *mode) { FILE *infile; @@ -1309,22 +1329,22 @@ scan_lisp_file (const char *filename, const char *mode) DEF_ELISP_FILE (cp51932.el), DEF_ELISP_FILE (eucjp-ms.el) }; - int i, match; + int i; int flen = strlen (filename); if (generate_globals) - fatal ("scanning lisp file when -g specified", 0); + fatal ("scanning lisp file when -g specified"); if (flen > 3 && !strcmp (filename + flen - 3, ".el")) { - for (i = 0, match = 0; i < sizeof (uncompiled) / sizeof (uncompiled[0]); - i++) + bool match = false; + for (i = 0; i < sizeof (uncompiled) / sizeof (uncompiled[0]); i++) { if (uncompiled[i].fl <= flen && !strcmp (filename + flen - uncompiled[i].fl, uncompiled[i].fn) && (flen == uncompiled[i].fl || IS_SLASH (filename[flen - uncompiled[i].fl - 1]))) { - match = 1; + match = true; break; } } @@ -1336,7 +1356,7 @@ scan_lisp_file (const char *filename, const char *mode) if (infile == NULL) { perror (filename); - return 0; /* No error. */ + exit (EXIT_FAILURE); } c = '\n'; @@ -1374,10 +1394,10 @@ scan_lisp_file (const char *filename, const char *mode) } if (length <= 1) - fatal ("invalid dynamic doc string length", ""); + fatal ("invalid dynamic doc string length"); if (c != ' ') - fatal ("space not found after dynamic doc string length", ""); + fatal ("space not found after dynamic doc string length"); /* The next character is a space that is counted in the length but not part of the doc string. @@ -1585,7 +1605,7 @@ scan_lisp_file (const char *filename, const char *mode) buffer, filename); continue; } - read_c_string_or_comment (infile, 0, 0, 0); + read_c_string_or_comment (infile, 0, false, 0); if (saved_string == 0) if (!search_lisp_doc_at_eol (infile)) @@ -1621,11 +1641,11 @@ scan_lisp_file (const char *filename, const char *mode) saved_string = 0; } else - read_c_string_or_comment (infile, 1, 0, 0); + read_c_string_or_comment (infile, 1, false, 0); } free (saved_string); - fclose (infile); - return 0; + if (ferror (infile) || fclose (infile) != 0) + fatal ("%s: read error", filename); } commit 25ec995c064d4e658fe3f9af084f120ae21a021a Author: Paul Eggert Date: Wed Feb 10 10:14:50 2016 -0800 Memory-management cleanup in make-docfile I compiled it with -fsanitize=address and fixed the leaks it detected. Also, I changed it to prefer signed to unsigned integer types, and to check for integer overflow. * lib-src/make-docfile.c: Include , , , . (memory_exhausted): New function. (xmalloc, xrealloc): Use it. (xmalloc, xrealloc, scan_file, struct rcsoc_state, write_c_args) (uncompiled, scan_lisp_file): Prefer signed integer types to unsigned. (xstrdup): Remove. All uses removed. (num_globals, num_globals_allocated, write_globals, scan_c_stream): Use ptrdiff_t, not int, for indexes that in theory could exceed INT_MAX. (add_global): Use const to pacify --enable-gcc-warnings. Make a copy here, rather than relying on strdup calls later. (add_global, write_globals, scan_c_stream): Avoid integer overflow when calculating sizes. (write_globals, scan_c_stream, scan_lisp_file): Avoid memory leak. (scan_c_stream): Check for add_global failure. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 02b5e76..4ab3729 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -37,6 +37,8 @@ along with GNU Emacs. If not, see . */ #include #include +#include +#include #include #include /* config.h unconditionally includes this anyway */ @@ -48,6 +50,8 @@ along with GNU Emacs. If not, see . */ #endif /* WINDOWSNT */ #include +#include +#include #ifdef DOS_NT /* Defined to be sys_chdir in ms-w32.h, but only #ifdef emacs, so this @@ -97,36 +101,31 @@ fatal (const char *s1, const char *s2) exit (EXIT_FAILURE); } -/* Like malloc but get fatal error if memory is exhausted. */ - -static void * -xmalloc (unsigned int size) +static _Noreturn void +memory_exhausted (void) { - void *result = (void *) malloc (size); - if (result == NULL) - fatal ("virtual memory exhausted", 0); - return result; + fatal ("virtual memory exhausted", 0); } -/* Like strdup, but get fatal error if memory is exhausted. */ +/* Like malloc but get fatal error if memory is exhausted. */ -static char * -xstrdup (char *s) +static void * +xmalloc (ptrdiff_t size) { - char *result = strdup (s); - if (! result) - fatal ("virtual memory exhausted", 0); + void *result = malloc (size); + if (result == NULL) + memory_exhausted (); return result; } /* Like realloc but get fatal error if memory is exhausted. */ static void * -xrealloc (void *arg, unsigned int size) +xrealloc (void *arg, ptrdiff_t size) { - void *result = (void *) realloc (arg, size); + void *result = realloc (arg, size); if (result == NULL) - fatal ("virtual memory exhausted", 0); + memory_exhausted (); return result; } @@ -223,8 +222,7 @@ put_filename (char *filename) static int scan_file (char *filename) { - - size_t len = strlen (filename); + ptrdiff_t len = strlen (filename); if (!generate_globals) put_filename (filename); @@ -250,7 +248,7 @@ static char input_buffer[128]; struct rcsoc_state { /* A count of spaces and newlines that have been read, but not output. */ - unsigned pending_spaces, pending_newlines; + intmax_t pending_spaces, pending_newlines; /* Where we're reading from. */ FILE *in_file; @@ -468,10 +466,10 @@ read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usa static void write_c_args (char *func, char *buf, int minargs, int maxargs) { - register char *p; + char *p; int in_ident = 0; char *ident_start IF_LINT (= NULL); - size_t ident_length = 0; + ptrdiff_t ident_length = 0; fputs ("(fn", stdout); @@ -575,34 +573,38 @@ enum { DEFUN_noreturn = 1, DEFUN_const = 2 }; /* All the variable names we saw while scanning C sources in `-g' mode. */ -int num_globals; -int num_globals_allocated; +ptrdiff_t num_globals; +ptrdiff_t num_globals_allocated; struct global *globals; static struct global * -add_global (enum global_type type, char *name, int value, char const *svalue) +add_global (enum global_type type, char const *name, int value, + char const *svalue) { /* Ignore the one non-symbol that can occur. */ if (strcmp (name, "...")) { - ++num_globals; - - if (num_globals_allocated == 0) - { - num_globals_allocated = 100; - globals = xmalloc (num_globals_allocated * sizeof (struct global)); - } - else if (num_globals == num_globals_allocated) + if (num_globals == num_globals_allocated) { - num_globals_allocated *= 2; - globals = xrealloc (globals, - num_globals_allocated * sizeof (struct global)); + ptrdiff_t num_globals_max = (min (PTRDIFF_MAX, SIZE_MAX) + / sizeof *globals); + if (num_globals_allocated == num_globals_max) + memory_exhausted (); + if (num_globals_allocated < num_globals_max / 2) + num_globals_allocated = 2 * num_globals_allocated + 1; + else + num_globals_allocated = num_globals_max; + globals = xrealloc (globals, num_globals_allocated * sizeof *globals); } + ++num_globals; + + ptrdiff_t namesize = strlen (name) + 1; + char *buf = xmalloc (namesize + (svalue ? strlen (svalue) + 1 : 0)); globals[num_globals - 1].type = type; - globals[num_globals - 1].name = name; + globals[num_globals - 1].name = strcpy (buf, name); if (svalue) - globals[num_globals - 1].v.svalue = svalue; + globals[num_globals - 1].v.svalue = strcpy (buf + namesize, svalue); else globals[num_globals - 1].v.value = value; globals[num_globals - 1].flags = 0; @@ -649,10 +651,10 @@ close_emacs_globals (int num_symbols) static void write_globals (void) { - int i, j; + ptrdiff_t i, j; bool seen_defun = false; - int symnum = 0; - int num_symbols = 0; + ptrdiff_t symnum = 0; + ptrdiff_t num_symbols = 0; qsort (globals, num_globals, sizeof (struct global), compare_globals); j = 0; @@ -665,6 +667,7 @@ write_globals (void) && globals[i].v.value != globals[i + 1].v.value) error ("function '%s' defined twice with differing signatures", globals[i].name); + free (globals[i].name); i++; } num_symbols += globals[i].type == SYMBOL; @@ -707,7 +710,7 @@ write_globals (void) globals[i].name, globals[i].name); } else if (globals[i].type == SYMBOL) - printf (("#define i%s %d\n" + printf (("#define i%s %td\n" "DEFINE_LISP_SYMBOL (%s)\n"), globals[i].name, symnum++, globals[i].name); else @@ -736,7 +739,7 @@ write_globals (void) puts ("#ifdef DEFINE_SYMBOLS"); puts ("static char const *const defsym_name[] = {"); - for (int i = 0; i < num_globals; i++) + for (ptrdiff_t i = 0; i < num_globals; i++) if (globals[i].type == SYMBOL) printf ("\t\"%s\",\n", globals[i].v.svalue); puts ("};"); @@ -745,9 +748,9 @@ write_globals (void) puts ("#define Qnil builtin_lisp_symbol (0)"); puts ("#if DEFINE_NON_NIL_Q_SYMBOL_MACROS"); num_symbols = 0; - for (int i = 0; i < num_globals; i++) + for (ptrdiff_t i = 0; i < num_globals; i++) if (globals[i].type == SYMBOL && num_symbols++ != 0) - printf ("# define %s builtin_lisp_symbol (%d)\n", + printf ("# define %s builtin_lisp_symbol (%td)\n", globals[i].name, num_symbols - 1); puts ("#endif"); } @@ -820,7 +823,8 @@ scan_c_stream (FILE *infile) int defvarperbufferflag = 0; int defvarflag = 0; enum global_type type = INVALID; - char *name IF_LINT (= 0); + static char *name; + static ptrdiff_t name_size; if (c != '\n' && c != '\r') { @@ -925,7 +929,7 @@ scan_c_stream (FILE *infile) if (generate_globals) { - int i = 0; + ptrdiff_t i = 0; char const *svalue = 0; /* Skip "," and whitespace. */ @@ -947,7 +951,16 @@ scan_c_stream (FILE *infile) || c == '\n' || c == '\r')); input_buffer[i] = '\0'; - name = xmalloc (i + 1); + if (name_size <= i) + { + free (name); + name_size = i + 1; + ptrdiff_t doubled; + if (! INT_MULTIPLY_WRAPV (name_size, 2, &doubled) + && doubled <= SIZE_MAX) + name_size = doubled; + name = xmalloc (name_size); + } memcpy (name, input_buffer, i + 1); if (type == SYMBOL) @@ -958,7 +971,7 @@ scan_c_stream (FILE *infile) if (c != '"') continue; c = read_c_string_or_comment (infile, -1, 0, 0); - svalue = xstrdup (input_buffer); + svalue = input_buffer; } if (!defunflag) @@ -1024,6 +1037,8 @@ scan_c_stream (FILE *infile) if (generate_globals) { struct global *g = add_global (FUNCTION, name, maxargs, 0); + if (!g) + continue; /* The following code tries to recognize function attributes specified after the docstring, e.g.: @@ -1278,7 +1293,7 @@ static int scan_lisp_file (const char *filename, const char *mode) { FILE *infile; - register int c; + int c; char *saved_string = 0; /* These are the only files that are loaded uncompiled, and must follow the conventions of the doc strings expected by this @@ -1286,7 +1301,7 @@ scan_lisp_file (const char *filename, const char *mode) byte compiler when it produces the .elc files. */ static struct { const char *fn; - size_t fl; + int fl; } const uncompiled[] = { DEF_ELISP_FILE (loaddefs.el), DEF_ELISP_FILE (loadup.el), @@ -1295,7 +1310,7 @@ scan_lisp_file (const char *filename, const char *mode) DEF_ELISP_FILE (eucjp-ms.el) }; int i, match; - size_t flen = strlen (filename); + int flen = strlen (filename); if (generate_globals) fatal ("scanning lisp file when -g specified", 0); @@ -1345,15 +1360,17 @@ scan_lisp_file (const char *filename, const char *mode) c = getc (infile); if (c == '@') { - size_t length = 0; - size_t i; + ptrdiff_t length = 0; + ptrdiff_t i; /* Read the length. */ while ((c = getc (infile), c >= '0' && c <= '9')) { - length *= 10; - length += c - '0'; + if (INT_MULTIPLY_WRAPV (length, 10, &length) + || INT_ADD_WRAPV (length, c - '0', &length) + || SIZE_MAX < length) + memory_exhausted (); } if (length <= 1) @@ -1369,7 +1386,7 @@ scan_lisp_file (const char *filename, const char *mode) /* Read in the contents. */ free (saved_string); - saved_string = (char *) xmalloc (length); + saved_string = xmalloc (length); for (i = 0; i < length; i++) saved_string[i] = getc (infile); /* The last character is a ^_. @@ -1606,6 +1623,7 @@ scan_lisp_file (const char *filename, const char *mode) else read_c_string_or_comment (infile, 1, 0, 0); } + free (saved_string); fclose (infile); return 0; } commit 02d925e9e55089fabfe03e5a911c391b9322978f Author: Kevin Gallagher Date: Wed Feb 10 20:40:28 2016 +0200 Kevin Gallagher has new email address * lisp/emulation/edt.el: * lisp/emulation/edt-lk201.el: * lisp/emulation/edt-mapper.el: * lisp/emulation/edt-pc.el: * lisp/emulation/edt-vt100.el: * etc/edt-user.el: * doc/misc/edt.texi: Update Kevin Gallagher's email address. diff --git a/doc/misc/edt.texi b/doc/misc/edt.texi index 4f3fdae..2361313 100644 --- a/doc/misc/edt.texi +++ b/doc/misc/edt.texi @@ -30,7 +30,7 @@ modify this GNU manual.'' @titlepage @title EDT Emulation User's Manual @author Kevin Gallagher -@author @email{Kevin.Gallagher@@boeing.com} +@author @email{kevin.gal@verizon.net} @page @vskip 0pt plus 1filll @insertcopying @@ -106,7 +106,8 @@ how to customize it to your liking. @file{edt.texi}---This manual. @item -@file{edt-user.el}---An example customization file. +@file{edt-user.el}---An example customization file (located in the +Emacs distribution etc directory). @item @file{edt.el}---EDT emulation functions and default configuration. diff --git a/etc/edt-user.el b/etc/edt-user.el index 5541ce6..cf1acbc 100644 --- a/etc/edt-user.el +++ b/etc/edt-user.el @@ -3,8 +3,8 @@ ;; Copyright (C) 1986, 1992-1993, 2000-2016 Free Software Foundation, ;; Inc. -;; Author: Kevin Gallagher -;; Maintainer: Kevin Gallagher +;; Author: Kevin Gallagher +;; Maintainer: Kevin Gallagher ;; Keywords: emulations ;; This file is part of GNU Emacs. diff --git a/lisp/emulation/edt-lk201.el b/lisp/emulation/edt-lk201.el index c30a84d..bb8577c 100644 --- a/lisp/emulation/edt-lk201.el +++ b/lisp/emulation/edt-lk201.el @@ -3,8 +3,8 @@ ;; Copyright (C) 1986, 1992-1993, 1995, 2001-2016 Free Software ;; Foundation, Inc. -;; Author: Kevin Gallagher -;; Maintainer: Kevin Gallagher +;; Author: Kevin Gallagher +;; Maintainer: Kevin Gallagher ;; Keywords: emulations ;; Package: edt diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index df32ac0..0bba9e3 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el @@ -2,8 +2,8 @@ ;; Copyright (C) 1994-1995, 2000-2016 Free Software Foundation, Inc. -;; Author: Kevin Gallagher -;; Maintainer: Kevin Gallagher +;; Author: Kevin Gallagher +;; Maintainer: Kevin Gallagher ;; Keywords: emulations ;; Package: edt diff --git a/lisp/emulation/edt-pc.el b/lisp/emulation/edt-pc.el index 13b60fb..1f55f4a 100644 --- a/lisp/emulation/edt-pc.el +++ b/lisp/emulation/edt-pc.el @@ -3,8 +3,8 @@ ;; Copyright (C) 1986, 1994-1995, 2001-2016 Free Software Foundation, ;; Inc. -;; Author: Kevin Gallagher -;; Maintainer: Kevin Gallagher +;; Author: Kevin Gallagher +;; Maintainer: Kevin Gallagher ;; Keywords: emulations ;; Package: edt diff --git a/lisp/emulation/edt-vt100.el b/lisp/emulation/edt-vt100.el index 1f134f7..019283e 100644 --- a/lisp/emulation/edt-vt100.el +++ b/lisp/emulation/edt-vt100.el @@ -3,8 +3,8 @@ ;; Copyright (C) 1986, 1992-1993, 1995, 2002-2016 Free Software ;; Foundation, Inc. -;; Author: Kevin Gallagher -;; Maintainer: Kevin Gallagher +;; Author: Kevin Gallagher +;; Maintainer: Kevin Gallagher ;; Keywords: emulations ;; Package: edt diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 1e55fd8..6bda15b 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -3,8 +3,8 @@ ;; Copyright (C) 1986, 1992-1995, 2000-2016 Free Software Foundation, ;; Inc. -;; Author: Kevin Gallagher -;; Maintainer: Kevin Gallagher +;; Author: Kevin Gallagher +;; Maintainer: Kevin Gallagher ;; Keywords: emulations ;; This file is part of GNU Emacs. @@ -59,7 +59,8 @@ ;; The EDT emulation consists of the following files: ;; ;; edt.texi - User manual -;; edt-user.el - Sample Customization File +;; edt-user.el - Sample Customization File (located in Emacs +;; distribution etc directory) ;; edt.el - EDT Emulation Functions and Default Configuration ;; edt-lk201.el - Built-in support for DEC LK-201 Keyboards ;; edt-vt100.el - Built-in support for DEC VT-100 (and above) terminals commit 4ef153b55a543e67dec280accb1b2a3543089060 Author: Eli Zaretskii Date: Wed Feb 10 20:30:12 2016 +0200 Improve doc strings of 'forward/backward-word-strictly' * lisp/simple.el (backward-word): Refer to 'backward-word-strictly' in the doc string. Suggested by Glenn Morris . * lisp/subr.el (forward-word-strictly, backward-word-strictly): Mention 'subword-mode' in the doc strings. * src/syntax.c (Fforward_word): Refer to 'forward-word-strictly' in the doc string. (Bug#22560) diff --git a/lisp/simple.el b/lisp/simple.el index e39c864..0b04b80 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6736,7 +6736,13 @@ current object." (defun backward-word (&optional arg) "Move backward until encountering the beginning of a word. With argument ARG, do this that many times. -If ARG is omitted or nil, move point backward one word." +If ARG is omitted or nil, move point backward one word. + +The word boundaries are normally determined by the buffer's syntax +table, but `find-word-boundary-function-table', such as set up +by `subword-mode', can change that. If a Lisp program needs to +move by words determined strictly by the syntax table, it should +use `backward-word-strictly' instead." (interactive "^p") (forward-word (- (or arg 1)))) diff --git a/lisp/subr.el b/lisp/subr.el index 3113481..cf26fe3 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4137,7 +4137,8 @@ and the function returns nil. Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. This function is like `forward-word', but it is not affected -by `find-word-boundary-function-table'. It is also not interactive." +by `find-word-boundary-function-table' (as set up by +e.g. `subword-mode'). It is also not interactive." (let ((find-word-boundary-function-table (if (char-table-p word-move-empty-char-table) word-move-empty-char-table @@ -4150,7 +4151,8 @@ With argument ARG, do this that many times. If ARG is omitted or nil, move point backward one word. This function is like `forward-word', but it is not affected -by `find-word-boundary-function-table'. It is also not interactive." +by `find-word-boundary-function-table' (as set up by +e.g. `subword-mode'). It is also not interactive." (let ((find-word-boundary-function-table (if (char-table-p word-move-empty-char-table) word-move-empty-char-table diff --git a/src/syntax.c b/src/syntax.c index 8b5cc1d..7e98854 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1536,9 +1536,15 @@ DEFUN ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p", doc: /* Move point forward ARG words (backward if ARG is negative). If ARG is omitted or nil, move point forward one word. Normally returns t. -If an edge of the buffer or a field boundary is reached, point is left there -and the function returns nil. Field boundaries are not noticed if -`inhibit-field-text-motion' is non-nil. */) +If an edge of the buffer or a field boundary is reached, point is +left there and the function returns nil. Field boundaries are not +noticed if `inhibit-field-text-motion' is non-nil. + +The word boundaries are normally determined by the buffer's syntax +table, but `find-word-boundary-function-table', such as set up +by `subword-mode', can change that. If a Lisp program needs to +move by words determined strictly by the syntax table, it should +use `forward-word-strictly' instead. */) (Lisp_Object arg) { Lisp_Object tmp; commit 3ad05a0dc46093dd6b8958747a0475b8baba954f Author: Michael Albinus Date: Wed Feb 10 12:18:30 2016 +0100 Describe Makefile test targets in test/README * CONTRIBUTE: Move Makefile test targets to test/README. * Makefile.in: * test/README: Describe Makefile test targets. diff --git a/CONTRIBUTE b/CONTRIBUTE index 5a5cb5d..d8e102d 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -257,26 +257,8 @@ If your test lasts longer than some few seconds, mark it in its To run tests on the entire Emacs tree, run "make check" from the top-level directory. Most tests are in the directory "test/automated". From the "test/automated" directory, run "make -" to run the tests for .el(c). See -"test/automated/Makefile" for more information. - -Tests which are tagged ":expensive-test" are enabled additionally, if -you run "make check-expensive" from the top-level directory. "make -" as mentioned above incorporates expensive tests for -.el(c). You can also define any ert selector on the command -line. So "make check SELECTOR=nil" is equivalent to "make -check-expensive". - -You could also use predefined selectors of the Makefile. "make - SELECTOR='$(SELECTOR_DEFAULT)'" runs all tests for -.el(c) except the tests tagged as expensive. - -Selectors can be defined with different methods, see (info "(ert)Test -Selectors") or -https://www.gnu.org/software/emacs/manual/html_node/ert/Test-Selectors.html -If your test file contains the tests "test-foo", "test2-foo" and -"test-foo-remote", and you want to run only the former two tests, you -could use a regexp: "make SELECTOR='\"foo$$\"'" . +" to run the tests for .el(c). See "test/README" +for more information. ** Understanding Emacs Internals. diff --git a/Makefile.in b/Makefile.in index 75fd150..b212c91 100644 --- a/Makefile.in +++ b/Makefile.in @@ -57,6 +57,10 @@ # # make docs # Make Emacs documentation files from their sources; requires makeinfo. +# +# make check or make check-expensive +# Run Emacs test suite. check-expensive runs also tests which +# take more time to perform. SHELL = @SHELL@ diff --git a/test/README b/test/README index 244832d..d2aee9b 100644 --- a/test/README +++ b/test/README @@ -1,4 +1,62 @@ +Copyright (C) 2008-2016 Free Software Foundation, Inc. +See the end of the file for license conditions. + This directory contains files intended to test various aspects of Emacs's functionality. Please help add tests! +Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info +"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/ +for more information on writing and running tests. + +All ERT test files are supposed to run from subdirectory automated/. +The Makefile in that directory supports the following targets: + +* make check + Run all tests as defined in the directory. Expensive tests are + suppressed. The result of the tests for .el is stored in + .log. + +* make check-maybe + Like "make check", but run only the tests for files which have + unresolved prerequisites. + +* make check-expensive + Like "make check", but run also the tests marked as expensive. + +* make or make .log + Run all tests declared in .el. This includes expensive + tests. In the former case the output is shown on the terminal, in + the latter case the output is written to .log. + +ERT offers selectors, which make it possible to filter out which test +cases shall run. The make variable $(SELECTOR) gives you a simple +mean to use your own selectors. The ERT manual describes how +selectors are constructed, see (info "(ert)Test Selectors") or +https://www.gnu.org/software/emacs/manual/html_node/ert/Test-Selectors.html + +You could use predefined selectors of the Makefile. "make +SELECTOR='$(SELECTOR_DEFAULT)'" runs all tests for .el +except the tests tagged as expensive. + +If your test file contains the tests "test-foo", "test2-foo" and +"test-foo-remote", and you want to run only the former two tests, you +could use a selector regexp: "make SELECTOR='\"foo$$\"'". + + (Also, see etc/compilation.txt for compilation mode font lock tests.) + + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . commit 12c50e82c9b432b2fc31f8fb2215f43ceea80822 Author: Artur Malabarba Date: Wed Feb 10 07:44:16 2016 +0000 Backport: * lisp/isearch.el: Turn char-folding off by default (search-default-mode): Set default value to nil. diff --git a/lisp/isearch.el b/lisp/isearch.el index 2efa4c7..98f55a9 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -224,7 +224,7 @@ Default value, nil, means edit the string instead." (autoload 'character-fold-to-regexp "character-fold") -(defcustom search-default-mode #'character-fold-to-regexp +(defcustom search-default-mode nil "Default mode to use when starting isearch. Value is nil, t, or a function. commit 10b8ed27ec91ff52f93eb0297dcc3abb214931aa Author: Lars Ingebrigtsen Date: Wed Feb 10 15:45:37 2016 +1100 Document EXIF image rotation * doc/lispref/display.texi (ImageMagick Images): Mention EXIF rotation. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 3238959..1ba9123 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -5205,7 +5205,9 @@ when the image does not have an associated file name, to provide a hint to ImageMagick to help it detect the image type. @item :rotation @var{angle} -Specifies a rotation angle in degrees. +Specifies a rotation angle in degrees. If no rotation is explicitly +specified, and the @acronym{EXIF} headers specify a rotation, the +rotation from the @acronym{EXIF} headers are used instead. @item :index @var{frame} @c Doesn't work: http://debbugs.gnu.org/7978 diff --git a/etc/NEWS b/etc/NEWS index 70f9476..c133868 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -634,6 +634,10 @@ text in the region. The search engine to use for this is specified by the customizable variable `eww-search-prefix'. +++ +*** Images that have rotation specified in the EXIF headers are now +automatically rotated (if displayed as ImageMagick images). + ++++ *** Query-replace history is enhanced. When query-replace reads the FROM string from the minibuffer, typing `M-p' will now show previous replacements as "FROM SEP TO", where FROM commit 0f600496050bf435f55dc81056e06fcd45992dc8 Author: Dima Kogan Date: Wed Feb 10 15:40:03 2016 +1100 Support integer image rotation and respect EXIF rotations * src/image.c (imagemagick_load_image): Allow integer rotations in addition to floating point rotations (bug#22591). * src/image.c (imagemagick_load_image): Images that have an orientation given in EXIF and have no explicit :rotation tag are now pre-rotated. All information such as width/height is reported for the rotated image. diff --git a/src/image.c b/src/image.c index 144fe30..45abfc7 100644 --- a/src/image.c +++ b/src/image.c @@ -8546,6 +8546,16 @@ imagemagick_load_image (struct frame *f, struct image *img, return 0; } + /* If no :rotation is explicitly specified, apply the automatic + rotation from EXIF. */ + if (NILP (image_spec_value (img->spec, QCrotation, NULL))) + if (MagickAutoOrientImage (image_wand) == MagickFalse) + { + image_error ("Error applying automatic orientation in image `%s'", img->spec); + DestroyMagickWand (image_wand); + return 0; + } + if (ino < 0 || ino >= MagickGetNumberImages (image_wand)) { image_error ("Invalid image number `%s' in image `%s'", image, img->spec); @@ -8646,7 +8656,7 @@ imagemagick_load_image (struct frame *f, struct image *img, image_spec_value (img->spec, QCbackground, NULL); if (!STRINGP (specified_bg). */ value = image_spec_value (img->spec, QCrotation, NULL); - if (FLOATP (value)) + if (FLOATP (value) || INTEGERP (value)) { rotation = extract_float (value); status = MagickRotateImage (image_wand, bg_wand, rotation); commit 7dd45b61b1cdcf0e5bd1620ab7e63a0b5095ffb8 Author: Matthew Carter Date: Tue Feb 9 22:05:15 2016 -0500 Quote table names for postgres listings (sql-mode) * lisp/progmodes/sql.el (sql-postgres-completion-object): Avoid passing unquoted table names to the completion list. diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 65e94ba..fd59f46 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -4948,8 +4948,8 @@ Try to set `comint-output-filter-functions' like this: ;; Return the list of table names (public schema name can be omitted) (mapcar #'(lambda (tbl) (if (string= (car tbl) "public") - (cadr tbl) - (format "%s.%s" (car tbl) (cadr tbl)))) + (format "\"%s\"" (cadr tbl)) + (format "\"%s\".\"%s\"" (car tbl) (cadr tbl)))) cl)))) commit 6bac035d6014662e19bf400ce51585b84a1d655b Author: Juri Linkov Date: Wed Feb 10 02:46:37 2016 +0200 * lisp/replace.el (replace-match-maybe-edit): Make arg `backward' optional. Doc fix. (replace-search, replace-highlight): Make arg `backward' optional. (Bug#18388) diff --git a/lisp/replace.el b/lisp/replace.el index dfe8cd7..488eff7 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1980,13 +1980,15 @@ but coerced to the correct value of INTEGERS." new))) (match-data integers reuse t))) -(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data backward) +(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data + &optional backward) "Make a replacement with `replace-match', editing `\\?'. FIXEDCASE, LITERAL are passed to `replace-match' (which see). After possibly editing it (if `\\?' is present), NEWTEXT is also passed to `replace-match'. If NOEDIT is true, no check for `\\?' is made (to save time). MATCH-DATA is used for the replacement. -In case editing is done, it is changed to use markers. +In case editing is done, it is changed to use markers. BACKWARD is +used to reverse the replacement direction. The return value is non-nil if there has been no `\\?' or NOEDIT was passed in. If LITERAL is set, no checking is done, anyway." @@ -2027,7 +2029,7 @@ It is called with three arguments, as if it were `re-search-forward'.") (defun replace-search (search-string limit regexp-flag delimited-flag - case-fold-search backward) + case-fold-search &optional backward) "Search for the next occurrence of SEARCH-STRING to replace." ;; Let-bind global isearch-* variables to values used ;; to search the next replacement. These let-bindings @@ -2061,7 +2063,7 @@ It is called with three arguments, as if it were (defun replace-highlight (match-beg match-end range-beg range-end search-string regexp-flag delimited-flag - case-fold-search backward) + case-fold-search &optional backward) (if query-replace-highlight (if replace-overlay (move-overlay replace-overlay match-beg match-end (current-buffer)) commit ee909aa2bb3c30eb3b842426088a32a4504a0d0d Author: Juri Linkov Date: Wed Feb 10 02:31:40 2016 +0200 * lisp/simple.el (next-line-or-history-element): Reset temporary-goal-column. (previous-line-or-history-element): Reset temporary-goal-column. Use end-of-visual-line instead of line-end-position. (Bug#22544) diff --git a/lisp/simple.el b/lisp/simple.el index cfdea74..e39c864 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2041,6 +2041,10 @@ next element of the minibuffer history in the minibuffer." ;; the end of the line when it fails to go to the next line. (goto-char old-point) (next-history-element arg) + ;; Reset `temporary-goal-column' because a correct value is not + ;; calculated when `next-line' above fails by bumping against + ;; the bottom of the minibuffer (bug#22544). + (setq temporary-goal-column 0) ;; Restore the original goal column on the last line ;; of possibly multi-line input. (goto-char (point-max)) @@ -2071,6 +2075,10 @@ previous element of the minibuffer history in the minibuffer." ;; the beginning of the line when it fails to go to the previous line. (goto-char old-point) (previous-history-element arg) + ;; Reset `temporary-goal-column' because a correct value is not + ;; calculated when `previous-line' above fails by bumping against + ;; the top of the minibuffer (bug#22544). + (setq temporary-goal-column 0) ;; Restore the original goal column on the first line ;; of possibly multi-line input. (goto-char (minibuffer-prompt-end)) @@ -2078,7 +2086,15 @@ previous element of the minibuffer history in the minibuffer." (if (= (line-number-at-pos) 1) (move-to-column (+ old-column (1- (minibuffer-prompt-end)))) (move-to-column old-column)) - (goto-char (line-end-position))))))) + ;; Put the cursor at the end of the visual line instead of the + ;; logical line, so the next `previous-line-or-history-element' + ;; would move to the previous history element, not to a possible upper + ;; visual line from the end of logical line in `line-move-visual' mode. + (end-of-visual-line) + ;; Since `end-of-visual-line' puts the cursor at the beginning + ;; of the next visual line, move it one char back to the end + ;; of the first visual line (bug#22544). + (unless (eolp) (backward-char 1))))))) (defun next-complete-history-element (n) "Get next history element which completes the minibuffer before the point. commit 0a289d38b5b6aed734040314621b3f84200140df Author: Paul Eggert Date: Tue Feb 9 15:01:44 2016 -0800 Suppress ACL ops if configured with --disable-acl Without this patch, some ACL operations were suppressed, but not all. * src/fileio.c [!USE_ACL]: Do not include sys/acl.h. (Ffile_acl, Fset_file_acl) [!USE_ACL]: Return nil in this case. diff --git a/src/fileio.c b/src/fileio.c index f185f38..0372f46 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -36,7 +36,7 @@ along with GNU Emacs. If not, see . */ #include #endif -#ifdef HAVE_ACL_SET_FILE +#if USE_ACL && defined HAVE_ACL_SET_FILE #include #endif @@ -2937,16 +2937,17 @@ Return nil if file does not exist or is not accessible, or if Emacs was unable to determine the ACL entries. */) (Lisp_Object filename) { +#if USE_ACL Lisp_Object absname; Lisp_Object handler; -#ifdef HAVE_ACL_SET_FILE +# ifdef HAVE_ACL_SET_FILE acl_t acl; Lisp_Object acl_string; char *str; -# ifndef HAVE_ACL_TYPE_EXTENDED +# ifndef HAVE_ACL_TYPE_EXTENDED acl_type_t ACL_TYPE_EXTENDED = ACL_TYPE_ACCESS; +# endif # endif -#endif absname = expand_and_dir_to_file (filename, BVAR (current_buffer, directory)); @@ -2957,7 +2958,7 @@ was unable to determine the ACL entries. */) if (!NILP (handler)) return call2 (handler, Qfile_acl, absname); -#ifdef HAVE_ACL_SET_FILE +# ifdef HAVE_ACL_SET_FILE absname = ENCODE_FILE (absname); acl = acl_get_file (SSDATA (absname), ACL_TYPE_EXTENDED); @@ -2976,6 +2977,7 @@ was unable to determine the ACL entries. */) acl_free (acl); return acl_string; +# endif #endif return Qnil; @@ -2993,13 +2995,14 @@ Setting ACL for local files requires Emacs to be built with ACL support. */) (Lisp_Object filename, Lisp_Object acl_string) { +#if USE_ACL Lisp_Object absname; Lisp_Object handler; -#ifdef HAVE_ACL_SET_FILE +# ifdef HAVE_ACL_SET_FILE Lisp_Object encoded_absname; acl_t acl; bool fail; -#endif +# endif absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); @@ -3009,7 +3012,7 @@ support. */) if (!NILP (handler)) return call3 (handler, Qset_file_acl, absname, acl_string); -#ifdef HAVE_ACL_SET_FILE +# ifdef HAVE_ACL_SET_FILE if (STRINGP (acl_string)) { acl = acl_from_text (SSDATA (acl_string)); @@ -3030,6 +3033,7 @@ support. */) acl_free (acl); return fail ? Qnil : Qt; } +# endif #endif return Qnil; commit 1a9dbf52d1ce016d38e67ec627ee91b6dac8010f Author: Katsumi Yamaoka Date: Tue Feb 9 22:41:58 2016 +0000 Mention web bugs * doc/misc/emacs-mime.texi (Display Customization): Mention web bugs in the mm-html-blocked-images section. diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index 9c4f10e..c9c4b7c 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi @@ -436,7 +436,12 @@ It is effective when @code{mm-text-html-renderer} (@pxref{Display Customization}) is @code{shr}. In Gnus, this is overridden by the value of @code{gnus-blocked-images} or the return value of the function that @code{gnus-blocked-images} is set to (@pxref{HTML, ,HTML, gnus, Gnus -manual}). The default is @code{""} that blocks all external images. +manual}). + +Some @acronym{HTML} mails might have the trick of spammers using +@samp{} tags. It is likely to be intended to verify whether you +have read the mail. You can prevent your personal information from +leaking by setting this option to @code{""} (which is the default). @item mm-w3m-safe-url-regexp @vindex mm-w3m-safe-url-regexp commit fa55da20db11fd09a30c6e5c2205565929aee30e Author: Katsumi Yamaoka Date: Tue Feb 9 22:24:25 2016 +0000 Make mm-html-blocked-images default to "" again * lisp/gnus/mm-decode.el (mm-html-blocked-images): Default to "" that blocks all external images. * doc/misc/emacs-mime.texi (Display Customization): Mention that mm-html-blocked-images defaults to "". diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index b7c58d7..9c4f10e 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi @@ -436,7 +436,7 @@ It is effective when @code{mm-text-html-renderer} (@pxref{Display Customization}) is @code{shr}. In Gnus, this is overridden by the value of @code{gnus-blocked-images} or the return value of the function that @code{gnus-blocked-images} is set to (@pxref{HTML, ,HTML, gnus, Gnus -manual}). The default is @code{nil}. +manual}). The default is @code{""} that blocks all external images. @item mm-w3m-safe-url-regexp @vindex mm-w3m-safe-url-regexp diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index c45258e..f70877d 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -151,7 +151,7 @@ nil : use external viewer (default web browser)." :type 'boolean :group 'mime-display) -(defcustom mm-html-blocked-images nil +(defcustom mm-html-blocked-images "" "Regexp matching image URLs to be blocked, or nil meaning not to block. Note that cid images that are embedded in a message won't be blocked." :version "25.1"