aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2017-01-01 01:02:47 -0800
committerPaul Eggert2017-01-01 01:02:47 -0800
commit61848d2da32bb889d714fcddcb7dfd6dfa1b502d (patch)
treebec14e4a5ad9051ad310273db7fcc1d2164488b7
parentbbb683f04aa0960422b12af5ef79679344fac19c (diff)
parent697167b5432a89db009238cf5cbddc61e69ad339 (diff)
downloademacs-61848d2da32bb889d714fcddcb7dfd6dfa1b502d.tar.gz
emacs-61848d2da32bb889d714fcddcb7dfd6dfa1b502d.zip
Merge from origin/emacs-25
697167b ; Improve wording of previous change in variables.texi d7973e8 Document 'default-toplevel-value' and 'set-default-toplevel-v... 8b71826 Don't modify minibuffer variables globally 5b5e036 Revert to pre-25.1 behavior in ffap 19994a1 * lisp/ffap.el: Fix obsolete comment referencing ffap-bug. 3ace730 Attempt to fix 64-bit AIX build f69bd79 Clarify usage of 'ediff-cleanup-hook' (Bug#24675) c04ac8a Document that variable binding order is unspecified 272554a * lisp/desktop.el (desktop-buffers-not-to-save): Doc fix. 08de101 Fix M-x hints on Mac port 86a297a Work around reporting a dpi change in apply_xft_settings cf1f985 ; lisp/skeleton.el (skeleton-insert): Fix typo in last change 9e1209d Amend the version number of CC Mode 5.33 -> 5.32.99. Don't m... 88cdf14 Improve skeleton docstrings
-rw-r--r--doc/lispref/variables.texi51
-rw-r--r--doc/misc/cl.texi5
-rw-r--r--doc/misc/ediff.texi11
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/desktop.el5
-rw-r--r--lisp/ffap.el10
-rw-r--r--lisp/files.el14
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/simple.el1
-rw-r--r--lisp/skeleton.el12
-rw-r--r--src/unexaix.c10
-rw-r--r--src/xsettings.c19
12 files changed, 119 insertions, 28 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index d9096dac018..4936f7a921a 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -223,6 +223,18 @@ Here is an example of this: @code{z} is bound to the old value of
223 @result{} (1 2) 223 @result{} (1 2)
224@end group 224@end group
225@end example 225@end example
226
227On the other hand, the order of @emph{bindings} is unspecified: in the
228following example, either 1 or 2 might be printed.
229
230@example
231(let ((x 1)
232 (x 2))
233 (print x))
234@end example
235
236Therefore, avoid binding a variable more than once in a single
237@code{let} form.
226@end defspec 238@end defspec
227 239
228@defspec let* (bindings@dots{}) forms@dots{} 240@defspec let* (bindings@dots{}) forms@dots{}
@@ -1630,6 +1642,45 @@ an ordinary evaluated argument.
1630@end example 1642@end example
1631@end defun 1643@end defun
1632 1644
1645 A variable can be let-bound (@pxref{Local Variables}) to a value.
1646This makes its global value shadowed by the binding;
1647@code{default-value} will then return the value from that binding, not
1648the global value, and @code{set-default} will be prevented from
1649setting the global value (it will change the let-bound value instead).
1650The following two functions allow to reference the global value even
1651if it's shadowed by a let-binding.
1652
1653@cindex top-level default value
1654@defun default-toplevel-value symbol
1655This function returns the @dfn{top-level} default value of
1656@var{symbol}, which is its value outside of any let-binding.
1657@end defun
1658
1659@example
1660@group
1661(defvar variable 'global-value)
1662 @result{} variable
1663@end group
1664@group
1665(let ((variable 'let-binding))
1666 (default-value 'variable))
1667 @result{} let-binding
1668@end group
1669@group
1670(let ((variable 'let-binding))
1671 (default-toplevel-value 'variable))
1672 @result{} global-value
1673@end group
1674@end example
1675
1676@defun set-default-toplevel-value symbol value
1677This function sets the top-level default value of @var{symbol} to the
1678specified @var{value}. This comes in handy when you want to set the
1679global value of @var{symbol} regardless of whether your code runs in
1680the context of @var{symbol}'s let-binding.
1681@end defun
1682
1683
1633@node File Local Variables 1684@node File Local Variables
1634@section File Local Variables 1685@section File Local Variables
1635@cindex file local variables 1686@cindex file local variables
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 4f15cf53d4a..5af41a4465e 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -1179,6 +1179,11 @@ behavior. (@code{point} and @code{point-marker} are equivalent
1179as @code{setf} places; each will accept either an integer or a 1179as @code{setf} places; each will accept either an integer or a
1180marker as the stored value.) 1180marker as the stored value.)
1181 1181
1182Like in the case of @code{let}, the @var{value} forms are evaluated in
1183the order they appear, but the order of bindings is unspecified.
1184Therefore, avoid binding the same @var{place} more than once in a
1185single @code{cl-letf} form.
1186
1182Since generalized variables look like lists, @code{let}'s shorthand 1187Since generalized variables look like lists, @code{let}'s shorthand
1183of using @samp{foo} for @samp{(foo nil)} as a @var{binding} would 1188of using @samp{foo} for @samp{(foo nil)} as a @var{binding} would
1184be ambiguous in @code{cl-letf} and is not allowed. 1189be ambiguous in @code{cl-letf} and is not allowed.
diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi
index 376aaeea46e..896a6041e86 100644
--- a/doc/misc/ediff.texi
+++ b/doc/misc/ediff.texi
@@ -1247,9 +1247,14 @@ merged (see @code{ediff-cleanup-hook}, below).
1247@vindex ediff-cleanup-hook 1247@vindex ediff-cleanup-hook
1248This hook is run just before @code{ediff-quit-hook}. This is a good 1248This hook is run just before @code{ediff-quit-hook}. This is a good
1249place to do various cleanups, such as deleting the variant buffers. 1249place to do various cleanups, such as deleting the variant buffers.
1250Ediff provides a function, @code{ediff-janitor}, as one such possible 1250Ediff provides a helper function, @code{ediff-janitor}, that you can
1251hook, which you can add to @code{ediff-cleanup-hook} with 1251invoke from a private hook function. For example:
1252@code{add-hook}. 1252
1253@example
1254(defun my-ediff-janitor ()
1255 (ediff-janitor nil nil))
1256(add-hook 'ediff-cleanup-hook #'my-ediff-janitor)
1257@end example
1253 1258
1254@findex ediff-janitor 1259@findex ediff-janitor
1255This function kills buffers A, B, and, possibly, C, if these buffers aren't 1260This function kills buffers A, B, and, possibly, C, if these buffers aren't
diff --git a/etc/NEWS b/etc/NEWS
index e2ada7c1be3..5eb295ff02e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -21,6 +21,13 @@ Temporary note:
21--- means no change in the manuals is needed. 21--- means no change in the manuals is needed.
22When you add a new item, use the appropriate mark if you are sure it applies, 22When you add a new item, use the appropriate mark if you are sure it applies,
23 23
24+++
25** The version number of CC Mode has been changed from 5.33 to
265.32.99, although the software itself hasn't changed. This aims to
27reduce confusion with the standalone CC Mode 5.33 (available from
28http://cc-mode.sourceforge.net), which is a more mature version than
29the one in Emacs 25.2.
30
24 31
25* Installation Changes in Emacs 26.1 32* Installation Changes in Emacs 26.1
26 33
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 063208fee69..a88d39a5e62 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -380,7 +380,10 @@ modes are restored automatically; they should not be listed here."
380 :group 'desktop) 380 :group 'desktop)
381 381
382(defcustom desktop-buffers-not-to-save "\\` " 382(defcustom desktop-buffers-not-to-save "\\` "
383 "Regexp identifying buffers that are to be excluded from saving." 383 "Regexp identifying buffers that are to be excluded from saving.
384This is in effect only for buffers that don't visit files.
385To exclude buffers that visit files, use `desktop-files-not-to-save'
386or `desktop-modes-not-to-save'."
384 :type '(choice (const :tag "None" nil) 387 :type '(choice (const :tag "None" nil)
385 regexp) 388 regexp)
386 :version "24.4" ; skip invisible temporary buffers 389 :version "24.4" ; skip invisible temporary buffers
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 99bb65faafe..a7983f08395 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -32,7 +32,7 @@
32;; (`ffap-require-prefix' swaps these behaviors). This is useful for 32;; (`ffap-require-prefix' swaps these behaviors). This is useful for
33;; following references in situations such as mail or news buffers, 33;; following references in situations such as mail or news buffers,
34;; README's, MANIFEST's, and so on. Submit bugs or suggestions with 34;; README's, MANIFEST's, and so on. Submit bugs or suggestions with
35;; M-x ffap-bug. 35;; M-x report-emacs-bug.
36;; 36;;
37;; For the default installation, add this line to your init file: 37;; For the default installation, add this line to your init file:
38;; 38;;
@@ -162,8 +162,12 @@ schemes (e.g. \"ftp\"); in that case, only convert those URLs."
162 :group 'ffap 162 :group 'ffap
163 :version "24.3") 163 :version "24.3")
164 164
165(defcustom ffap-lax-url nil 165(defcustom ffap-lax-url t
166 "If non-nil, allow lax URL matching." 166 "If non-nil, allow lax URL matching.
167The default non-nil value might produce false URLs in C++ code
168with symbols like \"std::find\". On the other hand, setting
169this to nil will disable recognition of URLs that are not
170well-formed, such as \"user@host\" or \"<user@host>\"."
167 :type 'boolean 171 :type 'boolean
168 :group 'ffap 172 :group 'ffap
169 :version "25.1") 173 :version "25.1")
diff --git a/lisp/files.el b/lisp/files.el
index 790f6cedfd6..71398227407 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -716,13 +716,13 @@ The path separator is colon in GNU and GNU-like systems."
716 ;; (which will lead to the use of B/a). 716 ;; (which will lead to the use of B/a).
717 (minibuffer-with-setup-hook 717 (minibuffer-with-setup-hook
718 (lambda () 718 (lambda ()
719 (setq minibuffer-completion-table 719 (setq-local minibuffer-completion-table
720 (apply-partially #'locate-file-completion-table 720 (apply-partially #'locate-file-completion-table
721 cd-path nil)) 721 cd-path nil))
722 (setq minibuffer-completion-predicate 722 (setq-local minibuffer-completion-predicate
723 (lambda (dir) 723 (lambda (dir)
724 (locate-file dir cd-path nil 724 (locate-file dir cd-path nil
725 (lambda (f) (and (file-directory-p f) 'dir-ok)))))) 725 (lambda (f) (and (file-directory-p f) 'dir-ok))))))
726 (unless cd-path 726 (unless cd-path
727 (setq cd-path (or (parse-colon-path (getenv "CDPATH")) 727 (setq cd-path (or (parse-colon-path (getenv "CDPATH"))
728 (list "./")))) 728 (list "./"))))
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index ab4baa247b9..f1943a82163 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -94,7 +94,7 @@
94 94
95;;; Variables also used at compile time. 95;;; Variables also used at compile time.
96 96
97(defconst c-version "5.33" 97(defconst c-version "5.32.99"
98 "CC Mode version number.") 98 "CC Mode version number.")
99 99
100(defconst c-version-sym (intern c-version)) 100(defconst c-version-sym (intern c-version))
diff --git a/lisp/simple.el b/lisp/simple.el
index 0ee2f060e5e..b72e75d169b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1699,6 +1699,7 @@ If the value is non-nil and not a number, we wait 2 seconds."
1699 ;; Don't show the help message if the binding isn't 1699 ;; Don't show the help message if the binding isn't
1700 ;; significantly shorter than the M-x command the user typed. 1700 ;; significantly shorter than the M-x command the user typed.
1701 (< len (- max 5)))) 1701 (< len (- max 5))))
1702 (input-pending-p) ;Dummy call to trigger input-processing, bug#23002.
1702 (let ((candidate (pop candidates))) 1703 (let ((candidate (pop candidates)))
1703 (when (equal name 1704 (when (equal name
1704 (car-safe (completion-try-completion 1705 (car-safe (completion-try-completion
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 0e81e2d74c6..c563a9cd0cd 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -59,8 +59,7 @@ region.")
59(make-obsolete-variable 'skeleton-autowrap nil "24.5") 59(make-obsolete-variable 'skeleton-autowrap nil "24.5")
60 60
61(defvar skeleton-end-newline t 61(defvar skeleton-end-newline t
62 "If non-nil, make sure that the skeleton inserted ends with a newline. 62 "If non-nil, make sure that the skeleton inserted ends with a newline.")
63This just influences the way the default `skeleton-end-hook' behaves.")
64 63
65(defvar skeleton-end-hook nil 64(defvar skeleton-end-hook nil
66 "Hook called at end of skeleton but before going to point of interest. 65 "Hook called at end of skeleton but before going to point of interest.
@@ -187,6 +186,10 @@ The optional third argument STR, if specified, is the value for the
187variable `str' within the skeleton. When this is non-nil, the 186variable `str' within the skeleton. When this is non-nil, the
188interactor gets ignored, and this should be a valid skeleton element. 187interactor gets ignored, and this should be a valid skeleton element.
189 188
189When done with skeleton, but before going back to `_'-point, add
190a newline (unless `skeleton-end-newline' is nil) and run the hook
191`skeleton-end-hook'.
192
190SKELETON is made up as (INTERACTOR ELEMENT ...). INTERACTOR may be nil if 193SKELETON is made up as (INTERACTOR ELEMENT ...). INTERACTOR may be nil if
191not needed, a prompt-string or an expression for complex read functions. 194not needed, a prompt-string or an expression for complex read functions.
192 195
@@ -235,10 +238,7 @@ available:
235 then: insert previously read string once more 238 then: insert previously read string once more
236 help help-form during interaction with the user or nil 239 help help-form during interaction with the user or nil
237 input initial input (string or cons with index) while reading str 240 input initial input (string or cons with index) while reading str
238 v1, v2 local variables for memorizing anything you want 241 v1, v2 local variables for memorizing anything you want"
239
240When done with skeleton, but before going back to `_'-point call
241`skeleton-end-hook' if that is non-nil."
242 (let ((skeleton-regions regions)) 242 (let ((skeleton-regions regions))
243 (and skeleton-regions 243 (and skeleton-regions
244 (setq skeleton-regions 244 (setq skeleton-regions
diff --git a/src/unexaix.c b/src/unexaix.c
index c2012f77cac..5685aee5480 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -245,15 +245,15 @@ make_hdr (int new, int a_out,
245 245
246 if (f_thdr == 0) 246 if (f_thdr == 0)
247 { 247 {
248 ERROR1 ("unexec: couldn't find \"%s\" section", (int) _TEXT); 248 ERROR1 ("unexec: couldn't find \"%s\" section", _TEXT);
249 } 249 }
250 if (f_dhdr == 0) 250 if (f_dhdr == 0)
251 { 251 {
252 ERROR1 ("unexec: couldn't find \"%s\" section", (int) _DATA); 252 ERROR1 ("unexec: couldn't find \"%s\" section", _DATA);
253 } 253 }
254 if (f_bhdr == 0) 254 if (f_bhdr == 0)
255 { 255 {
256 ERROR1 ("unexec: couldn't find \"%s\" section", (int) _BSS); 256 ERROR1 ("unexec: couldn't find \"%s\" section", _BSS);
257 } 257 }
258 } 258 }
259 else 259 else
@@ -382,7 +382,7 @@ copy_text_and_data (int new)
382 write_segment (new, ptr, end); 382 write_segment (new, ptr, end);
383 383
384 lseek (new, data_scnptr, SEEK_SET); 384 lseek (new, data_scnptr, SEEK_SET);
385 ptr = (char *) f_ohdr.data_start; 385 ptr = (char *) (ptrdiff_t) f_ohdr.data_start;
386 end = ptr + f_ohdr.dsize; 386 end = ptr + f_ohdr.dsize;
387 write_segment (new, ptr, end); 387 write_segment (new, ptr, end);
388 388
@@ -399,7 +399,7 @@ write_segment (int new, char *ptr, char *end)
399 for (i = 0; ptr < end;) 399 for (i = 0; ptr < end;)
400 { 400 {
401 /* distance to next block. */ 401 /* distance to next block. */
402 nwrite = (((int) ptr + UnexBlockSz) & -UnexBlockSz) - (int) ptr; 402 nwrite = (((ptrdiff_t) ptr + UnexBlockSz) & -UnexBlockSz) - (ptrdiff_t) ptr;
403 /* But not beyond specified end. */ 403 /* But not beyond specified end. */
404 if (nwrite > end - ptr) nwrite = end - ptr; 404 if (nwrite > end - ptr) nwrite = end - ptr;
405 ret = write (new, ptr, nwrite); 405 ret = write (new, ptr, nwrite);
diff --git a/src/xsettings.c b/src/xsettings.c
index d7af68f1c5f..10afd7d15c8 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -667,8 +667,23 @@ apply_xft_settings (struct x_display_info *dpyinfo,
667 } 667 }
668#endif 668#endif
669 669
670 if ((settings->seen & SEEN_DPI) != 0 && oldsettings.dpi != settings->dpi 670 if ((settings->seen & SEEN_DPI) != 0
671 && settings->dpi > 0) 671 && settings->dpi > 0
672 /* The following conjunct avoids setting `changed' to true when
673 old and new dpi settings do not differ "substantially".
674 Otherwise, the dynamic-setting Elisp code may process all sorts
675 of unrelated settings that override users' font customizations,
676 among others. Compare:
677
678 http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00557.html
679 http://lists.gnu.org/archive/html/bug-gnu-emacs/2016-12/msg00820.html
680
681 As soon as the dynamic-settings code has been tested and
682 verified, this Emacs 25.2 workaround should be removed. */
683 && ((oldsettings.dpi >= settings->dpi
684 && (oldsettings.dpi - settings->dpi) > 2)
685 || ((settings->dpi > oldsettings.dpi)
686 && (settings->dpi - oldsettings.dpi) > 2)))
672 { 687 {
673 FcPatternDel (pat, FC_DPI); 688 FcPatternDel (pat, FC_DPI);
674 FcPatternAddDouble (pat, FC_DPI, settings->dpi); 689 FcPatternAddDouble (pat, FC_DPI, settings->dpi);