From fb0b531e9e5a260addf79ad1603cc8b7c2c03d1f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 7 Apr 2016 16:26:55 -0400 Subject: * lisp/emacs-lisp/package.el: Change from a few days ago needs seq. ; Warning 'foo' is not known to be defined is always a bug. --- lisp/emacs-lisp/package.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 29de2c9b07f..7a5b020203e 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -146,6 +146,7 @@ (eval-when-compile (require 'subr-x)) (eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'epg)) ;For setf accessors. +(require 'seq) (require 'tabulated-list) (require 'macroexp) -- cgit v1.2.1 From f36df4b97ba6f335c24ada099203a9244ac84ce5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 7 Apr 2016 16:52:01 -0700 Subject: =?UTF-8?q?Don=E2=80=99t=20recommend=20obsolete=20EMACS=20env=20va?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/misc/efaq.texi (Escape sequences in shell output): Remove long-obsolete (and now-confusing) notes about the EMACS environment variable in Emacs 21.1 and earlier. * doc/misc/efaq.texi (^M in the shell buffer): * etc/PROBLEMS: Remove obsolescent recommendation to consult the EMACS environment variable. --- doc/misc/efaq.texi | 15 ++++----------- etc/PROBLEMS | 8 +++----- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 5008db31f25..1fa46492080 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -2664,11 +2664,6 @@ by typing @kbd{M-x ansi-color-for-comint-mode} in the Shell buffer, or by adding @code{(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)} to your init file. -In Emacs versions before 21.1, the @code{ansi-color} package is not -included. In that case, you need to unalias @code{ls} for interactive -shells running in Emacs; this can be done by checking the @code{EMACS} -variable in the environment. - @node Fullscreen mode on MS-Windows @section How can I start Emacs in fullscreen mode on MS-Windows? @cindex Maximize frame @@ -2757,11 +2752,9 @@ For @code{tcsh}, put this in your @file{.cshrc} (or @file{.tcshrc}) file: @example -if ($?EMACS) then - if ("$EMACS" =~ /*) then - if ($?tcsh) unset edit - stty nl - endif +if ($?INSIDE_EMACS && $?tcsh) + unset edit + stty -icrnl -onlcr -echo susp ^Z endif @end example @@ -2769,7 +2762,7 @@ Or put this in your @file{.emacs_tcsh} or @file{~/.emacs.d/init_tcsh.sh} file: @example unset edit -stty nl +stty -icrnl -onlcr -echo susp ^Z @end example Alternatively, use @code{csh} in your shell buffers instead of diff --git a/etc/PROBLEMS b/etc/PROBLEMS index d5313677113..b0c21ee25dd 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -459,11 +459,9 @@ smart. It sees that the Shell uses terminal type 'unknown' and turns on the flag to output ^M at the end of each line. You can fix the problem by adding this to your .cshrc file: - if ($?EMACS) then - if ("$EMACS" =~ /*) then - unset edit - stty -icrnl -onlcr -echo susp ^Z - endif + if ($?INSIDE_EMACS && $?tcsh) + unset edit + stty -icrnl -onlcr -echo susp ^Z endif *** Emacs startup on GNU/Linux systems (and possibly other systems) is slow. -- cgit v1.2.1 From a3f1ac2e3b546951f3182a7b42cad7f64a94e0b8 Mon Sep 17 00:00:00 2001 From: Marcin Borkowski Date: Fri, 8 Apr 2016 10:57:21 +0300 Subject: Avoid infinite loop in 'studlify-word' * lisp/play/studly.el (studlify-region): Call 'forward-word-strictly' and 'backward-word-strictly' instead of 'forward-word' and 'backward-word'. (Bug#19940) --- lisp/play/studly.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/play/studly.el b/lisp/play/studly.el index f6aae4548b1..ff1bf03e118 100644 --- a/lisp/play/studly.el +++ b/lisp/play/studly.el @@ -25,10 +25,10 @@ (setq begin (point)) (while (and (<= (point) end) (not (looking-at "\\W*\\'"))) - (forward-word 1) - (backward-word 1) + (forward-word-strictly 1) + (backward-word-strictly 1) (setq begin (max (point) begin)) - (forward-word 1) + (forward-word-strictly 1) (let ((offset 0) (word-end (min (point) end)) c) @@ -55,7 +55,7 @@ "Studlify-case the current word, or COUNT words if given an argument." (interactive "*p") (let ((begin (point)) end rb re) - (forward-word count) + (forward-word-strictly count) (setq end (point)) (setq rb (min begin end) re (max begin end)) (studlify-region rb re))) -- cgit v1.2.1 From 7ad1d075b940f276adaf3b6bb0c024079c403f80 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Apr 2016 11:05:20 +0300 Subject: Avoid signaling errors in 'M-n' at the 'C-x C-f' prompt * lisp/ffap.el (ffap-guess-file-name-at-point): Ignore errors while 'ffap-guesser' runs. (Bug#23218) --- lisp/ffap.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ffap.el b/lisp/ffap.el index 36727b3747d..8343b475c1b 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1966,7 +1966,9 @@ Only intended for interactive use." (defun ffap-guess-file-name-at-point () "Try to get a file name at point. This hook is intended to be put in `file-name-at-point-functions'." - (let ((guess (ffap-guesser))) + ;; ffap-guesser can signal an error, and we don't want that when, + ;; e.g., the user types M-n at the "C-x C-f" prompt. + (let ((guess (ignore-errors (ffap-guesser)))) (when (stringp guess) (let ((url (ffap-url-p guess))) (or url -- cgit v1.2.1 From f6497c6e760b3b50015f35d7ce5a36df628ee498 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Fri, 8 Apr 2016 15:52:55 +0200 Subject: Set locale encoding to UTF-8 when run from OS X GUI. * src/nsterm.m (ns_init_locale): Append .UTF-8 when setting LANG. --- src/nsterm.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index 4048ac46546..34c5395b630 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -596,8 +596,15 @@ ns_init_locale (void) @try { + /* It seems OS X should probably use UTF-8 everywhere. + 'localeIdentifier' does not specify the encoding, and I can't + find any way to get the OS to tell us which encoding to use, + so hard-code '.UTF-8'. */ + NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8", + [locale localeIdentifier]]; + /* Set LANG to locale, but not if LANG is already set. */ - setenv("LANG", [[locale localeIdentifier] UTF8String], 0); + setenv("LANG", [localeID UTF8String], 0); } @catch (NSException *e) { -- cgit v1.2.1 From c93ae7a1e5a94541189a8f36984014344d561ffc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Apr 2016 16:54:18 +0300 Subject: Allow to customize names of executables used by grep.el * lisp/progmodes/grep.el (grep-find-program): Renamed from 'find-program', which was a variable. All uses changed. (grep-xargs-program): Renamed from 'xargs-program', which was a variable. All uses changed. (grep-program): Now a defcustom rather than a simple variable. (Bug#23219) --- lisp/progmodes/grep.el | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index f04a7226d18..5d1b68a192d 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -411,21 +411,34 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies This gets tacked on the end of the generated expressions.") ;;;###autoload -(defvar grep-program (purecopy "grep") +(defcustom grep-program (purecopy "grep") "The default grep program for `grep-command' and `grep-find-command'. -This variable's value takes effect when `grep-compute-defaults' is called.") +This variable's value takes effect when `grep-compute-defaults' is called." + :type 'string + :version "25.1" + :group 'grep) ;;;###autoload -(defvar find-program (purecopy "find") +(defcustom grep-find-program (purecopy "find") "The default find program. This is used by commands like `grep-find-command', `find-dired' -and others.") +and others." + :type 'string + :version "25.1" + :group 'grep) + +(define-obsolete-variable-alias 'find-program 'grep-find-program "25.1") ;;;###autoload -(defvar xargs-program (purecopy "xargs") +(defcustom grep-xargs-program (purecopy "xargs") "The default xargs program for `grep-find-command'. See `grep-find-use-xargs'. -This variable's value takes effect when `grep-compute-defaults' is called.") +This variable's value takes effect when `grep-compute-defaults' is called." + :type 'string + :version "25.1" + :group 'grep) + +(define-obsolete-variable-alias 'xargs-program 'grep-xargs-program "25.1") ;;;###autoload (defvar grep-find-use-xargs nil @@ -595,13 +608,14 @@ This function is called from `compilation-filter-hook'." (unless grep-find-use-xargs (setq grep-find-use-xargs (cond - ((grep-probe find-program + ((grep-probe grep-find-program `(nil nil nil ,null-device "-exec" "echo" "{}" "+")) 'exec-plus) ((and - (grep-probe find-program `(nil nil nil ,null-device "-print0")) - (grep-probe xargs-program `(nil nil nil "-0" "echo"))) + (grep-probe grep-find-program + `(nil nil nil ,null-device "-print0")) + (grep-probe grep-xargs-program `(nil nil nil "-0" "echo"))) 'gnu) (t 'exec)))) @@ -612,10 +626,11 @@ This function is called from `compilation-filter-hook'." ;; after the pipe symbol be quoted if they use ;; forward slashes as directory separators. (format "%s . -type f -print0 | \"%s\" -0 %s" - find-program xargs-program grep-command)) + grep-find-program grep-xargs-program + grep-command)) ((memq grep-find-use-xargs '(exec exec-plus)) (let ((cmd0 (format "%s . -type f -exec %s" - find-program grep-command)) + grep-find-program grep-command)) (null (if grep-use-null-device (format "%s " null-device) ""))) @@ -627,7 +642,8 @@ This function is called from `compilation-filter-hook'." (1+ (length cmd0))))) (t (format "%s . -type f -print | \"%s\" %s" - find-program xargs-program grep-command))))) + grep-find-program grep-xargs-program + grep-command))))) (unless grep-find-template (setq grep-find-template (let ((gcmd (format "%s %s " @@ -637,17 +653,17 @@ This function is called from `compilation-filter-hook'." ""))) (cond ((eq grep-find-use-xargs 'gnu) (format "%s -type f -print0 | \"%s\" -0 %s" - find-program xargs-program gcmd)) + grep-find-program grep-xargs-program gcmd)) ((eq grep-find-use-xargs 'exec) (format "%s -type f -exec %s {} %s%s" - find-program gcmd null + grep-find-program gcmd null (shell-quote-argument ";"))) ((eq grep-find-use-xargs 'exec-plus) (format "%s -type f -exec %s %s{} +" - find-program gcmd null)) + grep-find-program gcmd null)) (t (format "%s -type f -print | \"%s\" %s" - find-program xargs-program gcmd)))))))) + grep-find-program grep-xargs-program gcmd)))))))) ;; Save defaults for this host. (setq grep-host-defaults-alist -- cgit v1.2.1 From 5c288909b96452ed5d01befc8b624e94511620ed Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 8 Apr 2016 14:02:24 -0400 Subject: * lisp/subr.el (read-key): Don't let the prompt linger (bug#22714) --- lisp/subr.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/subr.el b/lisp/subr.el index dde76916230..cbcc27baad1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2086,6 +2086,10 @@ some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." (aref keys 1) key))) (cancel-timer timer) + ;; For some reason, `read-key(-sequence)' leaves the prompt in the echo + ;; area, whereas `read-event' seems to empty it just before returning + ;; (bug#22714). So, let's mimick the behavior of `read-event'. + (message nil) (use-global-map old-global-map)))) (defvar read-passwd-map -- cgit v1.2.1 From a1f221bd82eb4393ccba83a361b435a4992b532a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 8 Apr 2016 13:39:17 -0700 Subject: Comint and compile no longer set EMACS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This mostly restores the change that I reverted on March 23, fixing most of Bug#20202. The only part of the change that is still reverted is the change to M-x term, where compatibility with current Bash constrains us from moving too quickly (Bug#20484). Problem reported by Phillip Lord in: http://bugs.gnu.org/20484#108 * etc/NEWS: Document this. * lisp/comint.el (comint-exec-1): * lisp/net/tramp-sh.el (tramp-remote-process-environment): * lisp/progmodes/compile.el (compilation-start): Don’t set EMACS=t in the subsidiary process. --- etc/NEWS | 6 ++++-- lisp/comint.el | 7 ------- lisp/net/tramp-sh.el | 1 - lisp/progmodes/compile.el | 8 -------- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 95265882ec3..78d725bddf2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1398,8 +1398,10 @@ symbol-function was changed not to signal 'void-function' any more. *** As a consequence, the second arg of 'indirect-function' is now obsolete. +++ -** Although comint, term, and compile still set the EMACS variable, -this is now considered deprecated and will be removed in a future release. +** M-x shell and M-x compile no longer set the EMACS environment variable. +This avoids clashing when other programs use the variable for other purposes. +Although M-x term still sets EMACS for compatibility with Bash 4.3 and earlier, +this is deprecated and will be phased out when Bash 4.4 or later takes over. Use the INSIDE_EMACS environment variable instead. +++ diff --git a/lisp/comint.el b/lisp/comint.el index cb79c175f0e..dcd4a5ae4cf 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -816,13 +816,6 @@ series of processes in the same Comint buffer. The hook (format "COLUMNS=%d" (window-width))) (list "TERM=emacs" (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width)))) - - ;; This hack is for backward compatibility with Bash 4.3 and - ;; earlier. It can break common uses of 'configure', so - ;; remove it once Bash 4.4 or later is common. - (unless (getenv "EMACS") - (list "EMACS=t")) - (list (format "INSIDE_EMACS=%s,comint" emacs-version)) process-environment)) (default-directory diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 79ff1bea4c2..4d529f7aa32 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -520,7 +520,6 @@ as given in your `~/.profile'." (defcustom tramp-remote-process-environment `("TMOUT=0" "LC_CTYPE=''" ,(format "TERM=%s" tramp-terminal-type) - "EMACS=t" ;; Deprecated; remove this line once Bash 4.4-or-later is common. ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version) "CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "PAGER=cat" "autocorrect=" "correct=") diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 0b15a283090..b7ab408f744 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1702,14 +1702,6 @@ Returns the compilation buffer created." (list "TERM=emacs" (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width)))) - - ;; Set the EMACS variable, but - ;; don't override users' setting of $EMACS. - ;; Remove this hack once Bash 4.4-or-later is common, - ;; since it can break 'configure'. - (unless (getenv "EMACS") - (list "EMACS=t")) - (list (format "INSIDE_EMACS=%s,compile" emacs-version)) (copy-sequence process-environment)))) (set (make-local-variable 'compilation-arguments) -- cgit v1.2.1 From 32832712532449ec32dfcbc5c21c2f5e52faa435 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 8 Apr 2016 16:29:59 -0700 Subject: * src/xsmfns.c (syms_of_xsmfns): Remove stray "s in doc strings. --- src/xsmfns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xsmfns.c b/src/xsmfns.c index 0819e877780..42e23401c7d 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -545,7 +545,7 @@ syms_of_xsmfns (void) Changing the value does not change the session id used by Emacs. The value is nil if no session manager is running. See also `x-session-previous-id', `emacs-save-session-functions', -`emacs-session-save' and `emacs-session-restore'." */); +`emacs-session-save' and `emacs-session-restore'. */); Vx_session_id = Qnil; DEFVAR_LISP ("x-session-previous-id", Vx_session_previous_id, @@ -568,7 +568,7 @@ The session id Emacs has while it is running is in the variable same, depending on how the session manager works. See also `emacs-save-session-functions', `emacs-session-save' and -`emacs-session-restore'." */); +`emacs-session-restore'. */); Vx_session_previous_id = Qnil; defsubr (&Shandle_save_session); -- cgit v1.2.1 From 9f1786e4165aba30ddb16116c5557a0531233008 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 8 Apr 2016 20:59:21 -0400 Subject: Faces names should not end in "-face". * lisp/rect.el (rectangle-preview): Rename from rectangle-preview-face. * lisp/vc/vc-hooks.el (vc-state-base): Rename from vc-state-base-face. --- lisp/rect.el | 5 +++-- lisp/vc/vc-hooks.el | 18 +++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lisp/rect.el b/lisp/rect.el index 73790f2f92a..685213a0635 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -398,8 +398,9 @@ With a prefix (or a FILL) argument, also fill too short lines." (defun rectangle--space-to (col) (propertize " " 'display `(space :align-to ,col))) -(defface rectangle-preview-face '((t :inherit region)) - "The face to use for the `string-rectangle' preview.") +(defface rectangle-preview '((t :inherit region)) + "The face to use for the `string-rectangle' preview." + :version "25.1") (defcustom rectangle-preview t "If non-nil, `string-rectangle' will show an-the-fly preview." diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 22c4d17f6aa..0826744c7cd 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -40,7 +40,7 @@ :group 'mode-line :version "25.1") -(defface vc-state-base-face +(defface vc-state-base '((default)) "Base face for VC state indicator." :group 'vc-faces @@ -48,49 +48,49 @@ :version "25.1") (defface vc-up-to-date-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base)) "Face for VC modeline state when the file is up to date." :version "25.1" :group 'vc-faces) (defface vc-needs-update-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base)) "Face for VC modeline state when the file needs update." :version "25.1" :group 'vc-faces) (defface vc-locked-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base)) "Face for VC modeline state when the file locked." :version "25.1" :group 'vc-faces) (defface vc-locally-added-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base)) "Face for VC modeline state when the file is locally added." :version "25.1" :group 'vc-faces) (defface vc-conflict-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base)) "Face for VC modeline state when the file contains merge conflicts." :version "25.1" :group 'vc-faces) (defface vc-removed-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base)) "Face for VC modeline state when the file was removed from the VC system." :version "25.1" :group 'vc-faces) (defface vc-missing-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base)) "Face for VC modeline state when the file is missing from the file system." :version "25.1" :group 'vc-faces) (defface vc-edited-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base)) "Face for VC modeline state when the file is edited." :version "25.1" :group 'vc-faces) -- cgit v1.2.1 From e87fbc07801a4ac291d335f0af957ca32cd26381 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 9 Apr 2016 12:30:59 +0300 Subject: Improve Lisp-level documentation of tooltips * doc/lispref/display.texi (Tooltips): New section. (Bug#23246) (Display): Update the chapter menu. * doc/lispref/text.texi (Special Properties): Make the "tooltip" index entry more concrete. Change the cross-reference to point to "Tooltips" in the ELisp manual. * doc/lispref/elisp.texi (Top): Update the master menu. * doc/emacs/frames.texi (Tooltips): Include more customization variables. Add a cross-reference to the ELisp manual. --- doc/emacs/frames.texi | 50 ++++++++++++++++++++++++------- doc/lispref/display.texi | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/lispref/elisp.texi | 1 + doc/lispref/text.texi | 5 ++-- 4 files changed, 119 insertions(+), 13 deletions(-) diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 35b3f83ab33..383ae7fd6ee 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -1152,11 +1152,11 @@ change the variable @code{x-gtk-file-dialog-help-text} to @code{nil}. @section Tooltips @cindex tooltips - @dfn{Tooltips} are small windows that display text information at -the current mouse position. They activate when there is a pause in -mouse movement over some significant piece of text in a window, or the -mode line, or some other part of the Emacs frame such as a tool bar -button or menu item. + @dfn{Tooltips} are small special frames that display text +information at the current mouse position. They activate when there +is a pause in mouse movement over some significant piece of text in a +window, or the mode line, or some other part of the Emacs frame such +as a tool bar button or menu item. @findex tooltip-mode You can toggle the use of tooltips with the command @kbd{M-x @@ -1164,11 +1164,41 @@ tooltip-mode}. When Tooltip mode is disabled, the help text is displayed in the echo area instead. To control the use of tooltips at startup, customize the variable @code{tooltip-mode}. -@vindex tooltip-delay - The variables @code{tooltip-delay} specifies how long Emacs should -wait before displaying a tooltip. For additional customization -options for displaying tooltips, use @kbd{M-x customize-group -@key{RET} tooltip @key{RET}}. +The following variables provide customization options for tooltip +display: + +@vtable @code +@item tooltip-delay +This variable specifies how long Emacs should wait before displaying +the first tooltip. The value is in seconds. + +@item tooltip-short-delay +This variable specifies how long Emacs should wait before displaying +subsequent tooltips on different items, having already displayed the +first tooltip. The value is in seconds. + +@item tooltip-hide-delay +The number of seconds since displaying a tooltip to hide it, if the +mouse doesn't move. + +@item tooltip-x-offset +@itemx tooltip-y-offset +The X and Y offsets, in pixels, of the left top corner of the tooltip +from the mouse pointer position. Note that these are ignored if +@code{tooltip-frame-parameters} was customized to include, +respectively, the @code{left} and @code{top} parameters. The values +of the offsets should be chosen so that the tooltip doesn't cover the +mouse pointer's hot spot, or it might interfere with clicking the +mouse. + +@item tooltip-frame-parameters +The frame parameters used for displaying tooltips. @xref{Frame +Parameters,,, elisp, The Emacs Lisp Reference Manual}, and also +@ref{Tooltips,,, elisp, The Emacs Lisp Reference Manual}. +@end vtable + +For additional customization options for displaying tooltips, use +@kbd{M-x customize-group @key{RET} tooltip @key{RET}}. @vindex x-gtk-use-system-tooltips If Emacs is built with GTK+ support, it displays tooltips via GTK+, diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 9ea9548582f..010dcb2fd1f 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -34,6 +34,7 @@ that Emacs presents to the user. * Character Display:: How Emacs displays individual characters. * Beeping:: Audible signal to the user. * Window Systems:: Which window system is being used. +* Tooltips:: Tooltip display in Emacs. * Bidirectional Display:: Display of bidirectional scripts, such as Arabic and Farsi. @end menu @@ -6968,6 +6969,81 @@ indicator of Emacs capabilities on a given display type. Instead, use @code{display-graphic-p} or any of the other @code{display-*-p} predicates described in @ref{Display Feature Testing}. +@node Tooltips +@section Tooltips +@cindex tooltips +@dfn{Tooltips} are special frames (@pxref{Frames}) that are used to +display helpful hints (a.k.a.@: ``tips'') related to the current +position of the mouse pointer. Emacs uses tooltips to display help +strings about active portions of text (@pxref{Special Properties}) and +about various UI elements, such as menu items (@pxref{Extended Menu +Items}) and tool-bar buttons (@pxref{Tool Bar}). + +@defun tooltip-mode +Tooltip Mode is a minor mode that enables display of tooltips. +Turning off this mode causes the tooltips be displayed in the echo +area. On text-mode (a.k.a.@: ``TTY'') frames, tooltips are always +displayed in the echo area. +@end defun + +@vindex x-gtk-use-system-tooltips +When Emacs is built with GTK+ support, it by default displays tooltips +using GTK+ functions, and the appearance of the tooltips is then +controlled by GTK+ settings. GTK+ tooltips can be disabled by +changing the value of the variable @code{x-gtk-use-system-tooltips} to +@code{nil}. The rest of this subsection describes how to control +non-GTK+ tooltips, which are presented by Emacs itself. + +Since tooltips are special frames, they have their frame parameters +(@pxref{Frame Parameters}). Unlike other frames, the frame parameters +for tooltips are stored in a special variable. + +@defvar tooltip-frame-parameters +This customizable option holds the frame parameters used for +displaying tooltips. Any font and color parameters are ignored, and +the corresponding attributes of the @code{tooltip} face are used +instead. If @code{left} or @code{top} parameters are included, they +are used as absolute frame-relative coordinates where the tooltip +should be shown. (Mouse-relative position of the tooltip can be +customized using the variables described in @ref{Tooltips,,, emacs, +The GNU Emacs Manual}.) Note that the @code{left} and @code{top} +parameters, if present, override the values of mouse-relative offsets. +@end defvar + +@vindex tooltip@r{ face} +The @code{tooltip} face determines the appearance of text shown in +tooltips. It should generally use a variable-pitch font of size that +is preferably smaller than the default frame font. + +@findex tooltip-help-tips +@defvar tooltip-functions +This abnormal hook is a list of functions to call when Emacs needs to +display a tooltip. Each function is called with a single argument +@var{event} which is a copy of the last mouse movement event. If a +function on this list actually displays the tooltip, it should return +non-@code{nil}, and then the rest of the functions will not be +called. The default value of this variable is a single function +@code{tooltip-help-tips}. +@end defvar + +If you write your own function to be put on the +@code{tooltip-functions} list, you may need to know the buffer of the +mouse event that triggered the tooltip display. The following +function provides that information. + +@defun tooltip-event-buffer event +This function returns the buffer over which @var{event} occurred. +Call it with the argument of the function from +@code{tooltip-functions} to obtain the buffer whose text triggered the +tooltip. Note that the event might occur not over a buffer (e.g., +over the tool bar), in which case this function will return +@code{nil}. +@end defun + +Other aspects of tooltip display are controlled by several +customizable settings; see @ref{Tooltips,,, emacs, The GNU Emacs +Manual}. + @node Bidirectional Display @section Bidirectional Display @cindex bidirectional display diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 4c1541e98c6..a3bff0b07ac 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -1380,6 +1380,7 @@ Emacs Display * Character Display:: How Emacs displays individual characters. * Beeping:: Audible signal to the user. * Window Systems:: Which window system is being used. +* Tooltips:: Tooltip display in Emacs. * Bidirectional Display:: Display of bidirectional scripts, such as Arabic and Farsi. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 37492929e74..1ad665f0e5b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -3202,12 +3202,11 @@ or shorter, higher or lower, wider or narrow, or replaced with an image. @item help-echo @kindex help-echo @r{(text property)} -@cindex tooltip +@cindex tooltip for help strings @anchor{Text help-echo} If text has a string as its @code{help-echo} property, then when you move the mouse onto that text, Emacs displays that string in the echo -area, or in the tooltip window (@pxref{Tooltips,,, emacs, The GNU Emacs -Manual}). +area, or in the tooltip window (@pxref{Tooltips}). If the value of the @code{help-echo} property is a function, that function is called with three arguments, @var{window}, @var{object} and -- cgit v1.2.1 From 97211f3630d0f5b76a5416075f7c7182e1ee3abd Mon Sep 17 00:00:00 2001 From: Joakim Verona Date: Sat, 9 Apr 2016 15:04:54 +0300 Subject: Fix clipping of xwidgets * src/xwidget.c (x_draw_xwidget_glyph_string): Use window_box instead of calculating the clipping borders manually. Suggested by YAMAMOTO Mitsuharu . --- src/xwidget.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/xwidget.c b/src/xwidget.c index 8ff4c23b1f2..7e96307bdd8 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -578,24 +578,22 @@ x_draw_xwidget_glyph_string (struct glyph_string *s) other time to know things like window placement etc. */ xv = xwidget_init_view (xww, s, x, y); - /* Calculate clipping, which is used for all manner of onscreen - xwidget views. Each widget border can get clipped by other emacs - objects so there are four clipping variables. */ - clip_right = - min (xww->width, - WINDOW_RIGHT_EDGE_X (s->w) - x - - WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w) - - WINDOW_RIGHT_FRINGE_WIDTH (s->w)); - clip_left = - max (0, - WINDOW_LEFT_EDGE_X (s->w) - x + - WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (s->w) + - WINDOW_LEFT_FRINGE_WIDTH (s->w)); - - clip_bottom = - min (xww->height, - WINDOW_BOTTOM_EDGE_Y (s->w) - WINDOW_MODE_LINE_HEIGHT (s->w) - y); - clip_top = max (0, WINDOW_TOP_EDGE_Y (s->w) - y); + int text_area_x, text_area_y, text_area_width, text_area_height; + + window_box (s->w, + ANY_AREA, + &text_area_x, + &text_area_y, + &text_area_width, + &text_area_height); + clip_right = min (xww->width, + text_area_width); + clip_left = max (0, + text_area_x); + + clip_bottom = min (xww->height, + text_area_height); + clip_top = max (0, text_area_y); /* We are concerned with movement of the onscreen area. The area might sit still when the widget actually moves. This happens -- cgit v1.2.1 From b57076929f0e904864e1457d5789f2fe6652fc84 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Thu, 31 Mar 2016 23:10:40 +0200 Subject: Remove undefined behavior in OS X dumper. Found by Address Sanitizer. * src/unexmacosx.c (unexec_write): Use Mach virtual memory API to avoid undefined behavior when reading arbitrary memory. --- src/unexmacosx.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 827eda56e08..bdacc8b540b 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -103,9 +103,11 @@ along with GNU Emacs. If not, see . */ #include #include #include +#include #include #include #include +#include #include #include #ifdef HAVE_MALLOC_MALLOC_H @@ -217,10 +219,27 @@ unexec_read (void *dest, size_t n) static int unexec_write (off_t dest, const void *src, size_t count) { + task_t task = mach_task_self(); + if (task == MACH_PORT_NULL || task == MACH_PORT_DEAD) + return false; + if (lseek (outfd, dest, SEEK_SET) != dest) return 0; - return write (outfd, src, count) == count; + /* We use the Mach virtual memory API to read our process memory + because using src directly would be undefined behavior and fails + under Address Sanitizer. */ + bool success = false; + vm_offset_t data; + mach_msg_type_number_t data_count; + if (vm_read (task, (uintptr_t) src, count, &data, &data_count) + == KERN_SUCCESS) + { + success = + write (outfd, (const void *) (uintptr_t) data, data_count) == count; + vm_deallocate (task, data, data_count); + } + return success; } /* Write COUNT bytes of zeros to outfd starting at offset DEST. -- cgit v1.2.1 From 668c7bc5ba761551ef0d08dc96080eb5aa169da1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 10 Apr 2016 19:04:33 +0300 Subject: Improve handling of non-ASCII characters in Git log messages * lisp/vc/vc-git.el (vc-git-commits-coding-system): Now a defcustom. (vc-git-log-output-coding-system): New defcustom. (vc-git-print-log, vc-git-command, vc-git--call): Use 'vc-git-log-output-coding-system' for reading stuff from Git. Don't override values of 'coding-system-for-read/write' if they are bound by caller -- this allows the user to force an encoding via "C-x RET c". (vc-git-checkin): On MS-Windows, pass the log message via a temporary file, to work around the limitations on passing non-ASCII characters via command-line arguments. Force using the 'locale-coding-system' for Git command-line arguments. This fixes problems with non-ASCII commit log messages on MS-Windows. (Bug#23076) * etc/NEWS: Mention the new vc-git related defcustoms. --- etc/NEWS | 11 ++++++++++ lisp/vc/vc-git.el | 66 ++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 62 insertions(+), 15 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 78d725bddf2..f5e5548ad63 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -987,6 +987,17 @@ back-end for the buffer's file, or remove it from version control. the color range from 'vc-annotate-color-map' is applied to the background or to the foreground. +--- +*** New options for customizing encoding of Git commit log messages. +The new options `vc-git-commits-coding-system' and +`vc-git-log-output-coding-system' allow to customize the encoding of +the log messages sent to Git when committing, and the decoding of the +log messages read from Git history commands. Both default to UTF-8; +if you customize them, make sure they are consistent with the Git +config variables i18n.commitEncoding and i18n.logOutputEncoding. +(`vc-git-commits-coding-system' existed previously, but was a +variable, not a user option.) + +++ *** 'compare-windows' now compares text with the most recently selected window instead of the next window. If you want the previous behavior of diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2921b6470da..f8b0b6fcd54 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -165,8 +165,20 @@ matching the resulting Git log output, and KEYWORDS is a list of :type '(list string string (repeat sexp)) :version "24.1") -(defvar vc-git-commits-coding-system 'utf-8 - "Default coding system for git commits.") +(defcustom vc-git-commits-coding-system 'utf-8 + "Default coding system for sending commit log messages to Git. + +Should be consistent with the Git config value i18n.commitEncoding, +and should also be consistent with `locale-coding-system'." + :type '(coding-system :tag "Coding system to encode Git commit logs") + :version "25.1") + +(defcustom vc-git-log-output-coding-system 'utf-8 + "Default coding system for receiving log output from Git. + +Should be consistent with the Git config value i18n.logOutputEncoding." + :type '(coding-system :tag "Coding system to decode Git log output") + :version "25.1") ;; History of Git commands. (defvar vc-git-history nil) @@ -680,21 +692,43 @@ It is based on `log-edit-mode', and has Git-specific extensions.") (default-directory (expand-file-name root)) (only (or (cdr files) (not (equal root (abbreviate-file-name file1))))) - (coding-system-for-write vc-git-commits-coding-system)) + (pcsw coding-system-for-write) + (coding-system-for-write + ;; On MS-Windows, we must encode command-line arguments in + ;; the system codepage. + (if (eq system-type 'windows-nt) + locale-coding-system + (or coding-system-for-write vc-git-commits-coding-system))) + (msg-file + ;; On MS-Windows, pass the commit log message through a + ;; file, to work around the limitation that command-line + ;; arguments must be in the system codepage, and therefore + ;; might not support the non-ASCII characters in the log + ;; message. + (if (eq system-type 'windows-nt) (make-temp-file "git-msg")))) (cl-flet ((boolean-arg-fn (argument) (lambda (value) (when (equal value "yes") (list argument))))) ;; When operating on the whole tree, better pass "-a" than ".", since "." ;; fails when we're committing a merge. (apply 'vc-git-command nil 0 (if only files) - (nconc (list "commit" "-m") - (log-edit-extract-headers - `(("Author" . "--author") - ("Date" . "--date") - ("Amend" . ,(boolean-arg-fn "--amend")) - ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) - comment) - (if only (list "--only" "--") '("-a"))))))) + (nconc (if msg-file (list "commit" "-F" msg-file) + (list "commit" "-m")) + (let ((args + (log-edit-extract-headers + `(("Author" . "--author") + ("Date" . "--date") + ("Amend" . ,(boolean-arg-fn "--amend")) + ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) + comment))) + (when msg-file + (let ((coding-system-for-write + (or pcsw vc-git-commits-coding-system))) + (write-region (car args) nil msg-file)) + (setq args (cdr args))) + args) + (if only (list "--only" "--") '("-a"))))) + (if (and msg-file (file-exists-p msg-file)) (delete-file msg-file)))) (defun vc-git-find-revision (file rev buffer) (let* (process-file-side-effects @@ -854,7 +888,7 @@ If SHORTLOG is non-nil, use a short format based on `vc-git-root-log-format'. If START-REVISION is non-nil, it is the newest revision to show. If LIMIT is non-nil, show no more than this many entries." (let ((coding-system-for-read - (or coding-system-for-read vc-git-commits-coding-system))) + (or coding-system-for-read vc-git-log-output-coding-system))) ;; `vc-do-command' creates the buffer, but we need it before running ;; the command. (vc-setup-buffer buffer) @@ -1387,7 +1421,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]." The difference to vc-do-command is that this function always invokes `vc-git-program'." (let ((coding-system-for-read - (or coding-system-for-read vc-git-commits-coding-system)) + (or coding-system-for-read vc-git-log-output-coding-system)) (coding-system-for-write (or coding-system-for-write vc-git-commits-coding-system))) (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program @@ -1412,8 +1446,10 @@ The difference to vc-do-command is that this function always invokes ;; directories. We enable `inhibit-null-byte-detection', otherwise ;; Tramp's eol conversion might be confused. (let ((inhibit-null-byte-detection t) - (coding-system-for-read vc-git-commits-coding-system) - (coding-system-for-write vc-git-commits-coding-system) + (coding-system-for-read + (or coding-system-for-read vc-git-log-output-coding-system)) + (coding-system-for-write + (or coding-system-for-write vc-git-commits-coding-system)) (process-environment (cons "PAGER=" process-environment))) (apply 'process-file vc-git-program nil buffer nil command args))) -- cgit v1.2.1 From 85f257c9bc5b89043b2d7019e6763e552f4c89e7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 10 Apr 2016 19:15:13 +0300 Subject: Improve documentation of 'with-eval-after-load' * lisp/subr.el (with-eval-after-load): Doc fix. (Bug#23258) --- lisp/subr.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index cbcc27baad1..4202cc74d48 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3945,7 +3945,8 @@ This function makes or adds to an entry on `after-load-alist'." (defmacro with-eval-after-load (file &rest body) "Execute BODY after FILE is loaded. FILE is normally a feature name, but it can also be a file name, -in case that file does not provide any feature." +in case that file does not provide any feature. See `eval-after-load' +for more details about the different forms of FILE and their semantics." (declare (indent 1) (debug t)) `(eval-after-load ,file (lambda () ,@body))) -- cgit v1.2.1 From 0e7bcec103073eceecc2621c19e4d290b2d97e8d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 10 Apr 2016 19:50:39 +0300 Subject: Avoid crashes due to unreasonably large or small text scaling * lisp/face-remap.el (text-scale-min-amount) (text-scale-max-amount): New functions. (text-scale-set, text-scale-increase): Use them to limit the text scaling to a reasonable range of values. (Bug#23259) --- lisp/face-remap.el | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/lisp/face-remap.el b/lisp/face-remap.el index 0da6be7430b..9c2cae14b38 100644 --- a/lisp/face-remap.el +++ b/lisp/face-remap.el @@ -256,6 +256,23 @@ disable `text-scale-mode' as necessary)." text-scale-mode-amount)))) (force-window-update (current-buffer))) +(defun text-scale-min-amount () + "Return the minimum amount of text-scaling we allow." + ;; When the resulting pixel-height of characters will become smaller + ;; than 1 pixel, we can expect trouble from the display engine. + ;; E.g., it requires that the character glyph's ascent is + ;; non-negative. + (log (/ 1.0 (frame-char-height)) text-scale-mode-step)) + +(defun text-scale-max-amount () + "Return the maximum amount of text-scaling we allow." + ;; The display engine uses a 16-bit short for pixel-width of + ;; characters, thus the 0xffff limitation. It also makes no sense + ;; to have characters wider than the display. + (log (/ (min (display-pixel-width) #xffff) + (frame-char-width)) + text-scale-mode-step)) + ;;;###autoload (defun text-scale-set (level) "Set the scale factor of the default face in the current buffer to LEVEL. @@ -266,7 +283,8 @@ Each step scales the height of the default face by the variable `text-scale-mode-step' (a negative number decreases the height by the same amount)." (interactive "p") - (setq text-scale-mode-amount level) + (setq text-scale-mode-amount + (max (min level (text-scale-max-amount)) (text-scale-min-amount))) (text-scale-mode (if (zerop text-scale-mode-amount) -1 1))) ;;;###autoload @@ -279,8 +297,13 @@ Each step scales the height of the default face by the variable height by the same amount). As a special case, an argument of 0 will remove any scaling currently active." (interactive "p") - (setq text-scale-mode-amount - (if (= inc 0) 0 (+ (if text-scale-mode text-scale-mode-amount 0) inc))) + (let* ((current-value (if text-scale-mode text-scale-mode-amount 0)) + (new-value (if (= inc 0) 0 (+ current-value inc)))) + (if (or (> new-value (text-scale-max-amount)) + (< new-value (text-scale-min-amount))) + (user-error "Cannot %s the default face height more than it already is" + (if (> inc 0) "increase" "decrease"))) + (setq text-scale-mode-amount new-value)) (text-scale-mode (if (zerop text-scale-mode-amount) -1 1))) ;;;###autoload -- cgit v1.2.1 From 9b1aab91fc479be9a923af1874801eadc1c19b20 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2016 22:47:03 -0700 Subject: Port run-prolog EMACS to SWI-Prolog 7.2.3 * lisp/progmodes/prolog.el (prolog-ensure-process): Work around incompatibility of SWI-Prolog 7.2.3 and earlier with the new way of dealing with the EMACS and INSIDE_EMACS environment variables. --- lisp/progmodes/prolog.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 9ee405b31e1..212a5fa69ab 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1374,8 +1374,20 @@ the variable `prolog-prompt-regexp'." () (with-current-buffer (get-buffer-create "*prolog*") (prolog-inferior-mode) - (apply 'make-comint-in-buffer "prolog" (current-buffer) - (prolog-program-name) nil (prolog-program-switches)) + + ;; The "INFERIOR=yes" hack is for SWI-Prolog 7.2.3 and earlier, + ;; which assumes it is running under Emacs if either INFERIOR=yes or + ;; if EMACS is set to a nonempty value. The EMACS setting is + ;; obsolescent, so set INFERIOR. Newer versions of SWI-Prolog should + ;; know about INSIDE_EMACS (which replaced EMACS) and should not need + ;; this hack. + (let ((process-environment + (if (getenv "INFERIOR") + process-environment + (cons "INFERIOR=yes" process-environment)))) + (apply 'make-comint-in-buffer "prolog" (current-buffer) + (prolog-program-name) nil (prolog-program-switches))) + (unless prolog-system ;; Setup auto-detection. (setq-local -- cgit v1.2.1 From 488a72f8e390d5da37da3bb7792e1d6ca5079b07 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2016 23:54:33 -0700 Subject: ; Spelling fixes --- ChangeLog.2 | 2 +- etc/NEWS | 2 +- lisp/ChangeLog.15 | 2 +- lisp/subr.el | 2 +- src/ChangeLog.12 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog.2 b/ChangeLog.2 index b2dc6c5dd30..2197c41b1c4 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -16990,7 +16990,7 @@ 2015-09-01 Paul Eggert - terminal-init-w32console mimicks command-line + terminal-init-w32console mimics command-line Problem reported by Eli Zaretskii. * lisp/startup.el (startup--setup-quote-display): New function, refactored from a part of ‘command-line’. diff --git a/etc/NEWS b/etc/NEWS index f5e5548ad63..fe7df96ecea 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1785,7 +1785,7 @@ function 'encode-time', which already accepted a simple time zone rule argument, has been extended to accept all the new forms. *** Incompatible change in the third argument of 'format-time-string'. -Previously, any non-nil argument was interpeted as specifying Universal Time. +Previously, any non-nil argument was interpreted as specifying Universal Time. This is no longer true; packages that want Universal Time should pass t as the third argument. diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15 index 88f5487ca74..46fa01acc5e 100644 --- a/lisp/ChangeLog.15 +++ b/lisp/ChangeLog.15 @@ -5820,7 +5820,7 @@ * epa.el (epa-passphrase-callback-function): Say what we're querying the password for. - * ibuffer.el (ibuffer-visit-buffer): To mimick list-buffers + * ibuffer.el (ibuffer-visit-buffer): To mimic list-buffers behavior, don't bury the ibuffer buffer when visiting other buffers. 2010-10-08 Chong Yidong diff --git a/lisp/subr.el b/lisp/subr.el index 4202cc74d48..0fb4a2ec256 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2088,7 +2088,7 @@ some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." (cancel-timer timer) ;; For some reason, `read-key(-sequence)' leaves the prompt in the echo ;; area, whereas `read-event' seems to empty it just before returning - ;; (bug#22714). So, let's mimick the behavior of `read-event'. + ;; (bug#22714). So, let's mimic the behavior of `read-event'. (message nil) (use-global-map old-global-map)))) diff --git a/src/ChangeLog.12 b/src/ChangeLog.12 index 3045ecdca92..b2df482ba77 100644 --- a/src/ChangeLog.12 +++ b/src/ChangeLog.12 @@ -2895,7 +2895,7 @@ (wait_reading_process_output, init_process_emacs): Assume O_NONBLOCK. (wait_reading_process_output): Put in a special case for WINDOWSNT - to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK. + to mimic the older behavior where it had O_NDELAY but not O_NONBLOCK. It's not clear this is needed, but it's a more-conservative change. (create_process): Assume FD_CLOEXEC. (create_process, create_pty): Assume O_NOCTTY. -- cgit v1.2.1 From bb30fa951c23911f5c3a14d9d46d1a3260a50fe0 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 11 Apr 2016 20:19:38 +0800 Subject: Fix last change on 2016-01-02 * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Move `cl-errs-re' before `lisp--el-match-keyword'; don't use `prepend' which highlights `cl-errs-re' even in comments or strings. --- lisp/emacs-lisp/lisp-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 3f345557582..315b3d56343 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -396,6 +396,9 @@ This will generate compile-time constants from BINDINGS." lisp-el-font-lock-keywords-1 `( ;; Regexp negated char group. ("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend) + ;; Erroneous structures. + (,(concat "(" el-errs-re "\\_>") + (1 font-lock-warning-face)) ;; Control structures. Common Lisp forms. (lisp--el-match-keyword . 1) ;; Exit/Feature symbols as constants. @@ -403,9 +406,6 @@ This will generate compile-time constants from BINDINGS." "[ \t']*\\(" lisp-mode-symbol-regexp "\\)?") (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) - ;; Erroneous structures. - (,(concat "(" el-errs-re "\\_>") - (1 font-lock-warning-face prepend)) ;; Words inside \\[] tend to be for `substitute-command-keys'. (,(concat "\\\\\\\\\\[\\(" lisp-mode-symbol-regexp "\\)\\]") (1 font-lock-constant-face prepend)) -- cgit v1.2.1 From b134c206bc07dbbb9e74b3be2db269c4f1196e40 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Apr 2016 09:02:00 -0700 Subject: Sync with gnulib This is for picky compilers whose stdint.h fails our C11 tests. Problem reported for clang by Philipp Stephani (Bug#23261). This incorporates: 2016-04-11 stdint: port to strict C11 left shift * doc/misc/texinfo.tex, lib/stdint.in.h: Copy from gnulib. --- doc/misc/texinfo.tex | 70 +++++++++++++++++++++++++++++++++++++++++++++++----- lib/stdint.in.h | 9 ++----- 2 files changed, 66 insertions(+), 13 deletions(-) diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 75017af5035..d164d451b89 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2016-03-25.17} +\def\texinfoversion{2016-03-29.15} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -1550,8 +1550,7 @@ output) for that.)} \fi \turnoffactive \makevalueexpandable - % In the case of XeTeX, xdvipdfmx converts strings to UTF-16. - % Therefore \txiescapepdf is not necessary. + \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % @@ -1566,9 +1565,12 @@ output) for that.)} \fi { \turnoffactive - % In the case of XeTeX, xdvipdfmx converts strings to UTF-16. - % Therefore \txiescapepdf is not necessary. - \special{pdf:out [-] #2 << /Title (#1) /A << /S /GoTo /D (name\pdfoutlinedest) >> >> }% + \txiescapepdf\pdfoutlinedest + \edef\pdfoutlinetext{#1}% + \txiescapepdf\pdfoutlinetext + % + \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A + << /S /GoTo /D (name\pdfoutlinedest) >> >> }% } } % @@ -1624,6 +1626,20 @@ output) for that.)} % ``\special{pdf:dest ...}'' can not handle non-ASCII strings. % It fixed by xdvipdfmx 20160106 (TeX Live SVN r39753). % + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces + \addtokens{\filename}{\PP}% + \advance\filenamelength by 1 + \fi + \nextsp} + \def\getfilename#1{% + \filenamelength=0 + % If we don't expand the argument now, \skipspaces will get + % snagged on things like "@value{foo}". + \edef\temp{#1}% + \expandafter\skipspaces\temp|\relax + } % make a live url in pdf output. \def\pdfurl#1{% \begingroup @@ -8760,6 +8776,7 @@ end % % Make link in pdf output. \ifpdf + % For pdfTeX and LuaTeX {\indexnofonts \turnoffactive \makevalueexpandable @@ -8786,6 +8803,47 @@ end \fi }% \setcolor{\linkcolor}% + \else + \ifx\XeTeXrevision\thisisundefined + \else + % For XeTeX + {\indexnofonts + \turnoffactive + \makevalueexpandable + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. + \getfilename{#4}% + % + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \iftxiuseunicodedestname + \def\pdfxrefdest{#1}% Pass through Unicode characters. + \else + \edef\pdfxrefdest{#1}% Replace Unicode characters to ASCII. + \fi + \ifx\pdfxrefdest\empty + \def\pdfxrefdest{Top}% no empty targets + \else + \txiescapepdf\pdfxrefdest % escape PDF special chars + \fi + % + \leavevmode + \ifnum\filenamelength>0 + % By the default settings, + % XeTeX (xdvipdfmx) replaces link destination names with integers. + % In this case, the replaced destination names of + % remote PDF cannot be known. In order to avoid replacement, + % you can use commandline option `-C 0x0010' for xdvipdfmx. + \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A + << /S /GoToR /F (\the\filename.pdf) /D (name\pdfxrefdest) >> >>}% + \else + \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A + << /S /GoTo /D (name\pdfxrefdest) >> >>}% + \fi + }% + \setcolor{\linkcolor}% + \fi \fi {% % Have to otherify everything special to allow the \csname to diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 0bb9ad41b29..cf65ec62e97 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -118,15 +118,10 @@ picky compilers. */ #define _STDINT_MIN(signed, bits, zero) \ - ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) + ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero)) #define _STDINT_MAX(signed, bits, zero) \ - ((signed) \ - ? ~ _STDINT_MIN (signed, bits, zero) \ - : /* The expression for the unsigned case. The subtraction of (signed) \ - is a nop in the unsigned case and avoids "signed integer overflow" \ - warnings in the signed case. */ \ - ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) + (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) #if !GNULIB_defined_stdint_types -- cgit v1.2.1