emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 61848d2 5/9: Merge from origin/emacs-25


From: Paul Eggert
Subject: [Emacs-diffs] master 61848d2 5/9: Merge from origin/emacs-25
Date: Sun, 1 Jan 2017 09:18:47 +0000 (UTC)

branch: master
commit 61848d2da32bb889d714fcddcb7dfd6dfa1b502d
Merge: bbb683f 697167b
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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
---
 doc/lispref/variables.texi |   51 ++++++++++++++++++++++++++++++++++++++++++++
 doc/misc/cl.texi           |    5 +++++
 doc/misc/ediff.texi        |   11 +++++++---
 etc/NEWS                   |    7 ++++++
 lisp/desktop.el            |    5 ++++-
 lisp/ffap.el               |   10 ++++++---
 lisp/files.el              |   14 ++++++------
 lisp/progmodes/cc-defs.el  |    2 +-
 lisp/simple.el             |    1 +
 lisp/skeleton.el           |   12 +++++------
 src/unexaix.c              |   10 ++++-----
 src/xsettings.c            |   19 +++++++++++++++--
 12 files changed, 119 insertions(+), 28 deletions(-)

diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index d9096da..4936f7a 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
      @result{} (1 2)
 @end group
 @end example
+
+On the other hand, the order of @emph{bindings} is unspecified: in the
+following example, either 1 or 2 might be printed.
+
address@hidden
+(let ((x 1)
+      (x 2))
+  (print x))
address@hidden example
+
+Therefore, avoid binding a variable more than once in a single
address@hidden form.
 @end defspec
 
 @defspec let* (address@hidden) address@hidden
@@ -1630,6 +1642,45 @@ an ordinary evaluated argument.
 @end example
 @end defun
 
+  A variable can be let-bound (@pxref{Local Variables}) to a value.
+This makes its global value shadowed by the binding;
address@hidden will then return the value from that binding, not
+the global value, and @code{set-default} will be prevented from
+setting the global value (it will change the let-bound value instead).
+The following two functions allow to reference the global value even
+if it's shadowed by a let-binding.
+
address@hidden top-level default value
address@hidden default-toplevel-value symbol
+This function returns the @dfn{top-level} default value of
address@hidden, which is its value outside of any let-binding.
address@hidden defun
+
address@hidden
address@hidden
+(defvar variable 'global-value)
+    @result{} variable
address@hidden group
address@hidden
+(let ((variable 'let-binding))
+  (default-value 'variable))
+    @result{} let-binding
address@hidden group
address@hidden
+(let ((variable 'let-binding))
+  (default-toplevel-value 'variable))
+    @result{} global-value
address@hidden group
address@hidden example
+
address@hidden set-default-toplevel-value symbol value
+This function sets the top-level default value of @var{symbol} to the
+specified @var{value}.  This comes in handy when you want to set the
+global value of @var{symbol} regardless of whether your code runs in
+the context of @var{symbol}'s let-binding.
address@hidden defun
+
+
 @node File Local Variables
 @section File Local Variables
 @cindex file local variables
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 4f15cf5..5af41a4 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -1179,6 +1179,11 @@ behavior.  (@code{point} and @code{point-marker} are 
equivalent
 as @code{setf} places; each will accept either an integer or a
 marker as the stored value.)
 
+Like in the case of @code{let}, the @var{value} forms are evaluated in
+the order they appear, but the order of bindings is unspecified.
+Therefore, avoid binding the same @var{place} more than once in a
+single @code{cl-letf} form.
+
 Since generalized variables look like lists, @code{let}'s shorthand
 of using @samp{foo} for @samp{(foo nil)} as a @var{binding} would
 be ambiguous in @code{cl-letf} and is not allowed.
diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi
index 376aaee..896a604 100644
--- a/doc/misc/ediff.texi
+++ b/doc/misc/ediff.texi
@@ -1247,9 +1247,14 @@ merged (see @code{ediff-cleanup-hook}, below).
 @vindex ediff-cleanup-hook
 This hook is run just before @code{ediff-quit-hook}.  This is a good
 place to do various cleanups, such as deleting the variant buffers.
-Ediff provides a function, @code{ediff-janitor}, as one such possible
-hook, which you can add to @code{ediff-cleanup-hook} with
address@hidden
+Ediff provides a helper function, @code{ediff-janitor}, that you can
+invoke from a private hook function.  For example:
+
address@hidden
+(defun my-ediff-janitor ()
+  (ediff-janitor nil nil))
+(add-hook 'ediff-cleanup-hook #'my-ediff-janitor)
address@hidden example
 
 @findex ediff-janitor
 This function kills buffers A, B, and, possibly, C, if these buffers aren't
diff --git a/etc/NEWS b/etc/NEWS
index e2ada7c..5eb295f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -21,6 +21,13 @@ Temporary note:
 --- means no change in the manuals is needed.
 When you add a new item, use the appropriate mark if you are sure it applies,
 
++++
+** The version number of CC Mode has been changed from 5.33 to
+5.32.99, although the software itself hasn't changed.  This aims to
+reduce confusion with the standalone CC Mode 5.33 (available from
+http://cc-mode.sourceforge.net), which is a more mature version than
+the one in Emacs 25.2.
+
 
 * Installation Changes in Emacs 26.1
 
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 063208f..a88d39a 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -380,7 +380,10 @@ modes are restored automatically; they should not be 
listed here."
   :group 'desktop)
 
 (defcustom desktop-buffers-not-to-save "\\` "
-  "Regexp identifying buffers that are to be excluded from saving."
+  "Regexp identifying buffers that are to be excluded from saving.
+This is in effect only for buffers that don't visit files.
+To exclude buffers that visit files, use `desktop-files-not-to-save'
+or `desktop-modes-not-to-save'."
   :type '(choice (const :tag "None" nil)
                 regexp)
   :version "24.4"                  ; skip invisible temporary buffers
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 99bb65f..a7983f0 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -32,7 +32,7 @@
 ;; (`ffap-require-prefix' swaps these behaviors).  This is useful for
 ;; following references in situations such as mail or news buffers,
 ;; README's, MANIFEST's, and so on.  Submit bugs or suggestions with
-;; M-x ffap-bug.
+;; M-x report-emacs-bug.
 ;;
 ;; For the default installation, add this line to your init file:
 ;;
@@ -162,8 +162,12 @@ schemes (e.g. \"ftp\"); in that case, only convert those 
URLs."
   :group 'ffap
   :version "24.3")
 
-(defcustom ffap-lax-url nil
-  "If non-nil, allow lax URL matching."
+(defcustom ffap-lax-url t
+  "If non-nil, allow lax URL matching.
+The default non-nil value might produce false URLs in C++ code
+with symbols like \"std::find\".  On the other hand, setting
+this to nil will disable recognition of URLs that are not
+well-formed, such as \"address@hidden" or \"<address@hidden>\"."
   :type 'boolean
   :group 'ffap
   :version "25.1")
diff --git a/lisp/files.el b/lisp/files.el
index 790f6ce..7139822 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -716,13 +716,13 @@ The path separator is colon in GNU and GNU-like systems."
     ;; (which will lead to the use of B/a).
     (minibuffer-with-setup-hook
         (lambda ()
-          (setq minibuffer-completion-table
-                (apply-partially #'locate-file-completion-table
-                                 cd-path nil))
-          (setq minibuffer-completion-predicate
-                (lambda (dir)
-                  (locate-file dir cd-path nil
-                               (lambda (f) (and (file-directory-p f) 
'dir-ok))))))
+          (setq-local minibuffer-completion-table
+                     (apply-partially #'locate-file-completion-table
+                                      cd-path nil))
+          (setq-local minibuffer-completion-predicate
+                     (lambda (dir)
+                       (locate-file dir cd-path nil
+                                    (lambda (f) (and (file-directory-p f) 
'dir-ok))))))
       (unless cd-path
         (setq cd-path (or (parse-colon-path (getenv "CDPATH"))
                           (list "./"))))
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index ab4baa2..f1943a8 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -94,7 +94,7 @@
 
 ;;; Variables also used at compile time.
 
-(defconst c-version "5.33"
+(defconst c-version "5.32.99"
   "CC Mode version number.")
 
 (defconst c-version-sym (intern c-version))
diff --git a/lisp/simple.el b/lisp/simple.el
index 0ee2f06..b72e75d 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."
                   ;; Don't show the help message if the binding isn't
                   ;; significantly shorter than the M-x command the user typed.
                   (< len (- max 5))))
+      (input-pending-p)    ;Dummy call to trigger input-processing, bug#23002.
       (let ((candidate (pop candidates)))
         (when (equal name
                        (car-safe (completion-try-completion
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 0e81e2d..c563a9c 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -59,8 +59,7 @@ region.")
 (make-obsolete-variable 'skeleton-autowrap nil "24.5")
 
 (defvar skeleton-end-newline t
-  "If non-nil, make sure that the skeleton inserted ends with a newline.
-This just influences the way the default `skeleton-end-hook' behaves.")
+  "If non-nil, make sure that the skeleton inserted ends with a newline.")
 
 (defvar skeleton-end-hook nil
   "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
 variable `str' within the skeleton.  When this is non-nil, the
 interactor gets ignored, and this should be a valid skeleton element.
 
+When done with skeleton, but before going back to `_'-point, add
+a newline (unless `skeleton-end-newline' is nil) and run the hook
+`skeleton-end-hook'.
+
 SKELETON is made up as (INTERACTOR ELEMENT ...).  INTERACTOR may be nil if
 not needed, a prompt-string or an expression for complex read functions.
 
@@ -235,10 +238,7 @@ available:
                then: insert previously read string once more
        help    help-form during interaction with the user or nil
        input   initial input (string or cons with index) while reading str
-       v1, v2  local variables for memorizing anything you want
-
-When done with skeleton, but before going back to `_'-point call
-`skeleton-end-hook' if that is non-nil."
+       v1, v2  local variables for memorizing anything you want"
   (let ((skeleton-regions regions))
     (and skeleton-regions
         (setq skeleton-regions
diff --git a/src/unexaix.c b/src/unexaix.c
index c2012f7..5685aee 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -245,15 +245,15 @@ make_hdr (int new, int a_out,
 
       if (f_thdr == 0)
        {
-         ERROR1 ("unexec: couldn't find \"%s\" section", (int) _TEXT);
+         ERROR1 ("unexec: couldn't find \"%s\" section", _TEXT);
        }
       if (f_dhdr == 0)
        {
-         ERROR1 ("unexec: couldn't find \"%s\" section", (int) _DATA);
+         ERROR1 ("unexec: couldn't find \"%s\" section", _DATA);
        }
       if (f_bhdr == 0)
        {
-         ERROR1 ("unexec: couldn't find \"%s\" section", (int) _BSS);
+         ERROR1 ("unexec: couldn't find \"%s\" section", _BSS);
        }
     }
   else
@@ -382,7 +382,7 @@ copy_text_and_data (int new)
   write_segment (new, ptr, end);
 
   lseek (new, data_scnptr, SEEK_SET);
-  ptr = (char *) f_ohdr.data_start;
+  ptr = (char *) (ptrdiff_t) f_ohdr.data_start;
   end = ptr + f_ohdr.dsize;
   write_segment (new, ptr, end);
 
@@ -399,7 +399,7 @@ write_segment (int new, char *ptr, char *end)
   for (i = 0; ptr < end;)
     {
       /* distance to next block.  */
-      nwrite = (((int) ptr + UnexBlockSz) & -UnexBlockSz) - (int) ptr;
+      nwrite = (((ptrdiff_t) ptr + UnexBlockSz) & -UnexBlockSz) - (ptrdiff_t) 
ptr;
       /* But not beyond specified end.  */
       if (nwrite > end - ptr) nwrite = end - ptr;
       ret = write (new, ptr, nwrite);
diff --git a/src/xsettings.c b/src/xsettings.c
index d7af68f..10afd7d 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -667,8 +667,23 @@ apply_xft_settings (struct x_display_info *dpyinfo,
     }
 #endif
 
-  if ((settings->seen & SEEN_DPI) != 0 && oldsettings.dpi != settings->dpi
-      && settings->dpi > 0)
+  if ((settings->seen & SEEN_DPI) != 0
+      && settings->dpi > 0
+      /* The following conjunct avoids setting `changed' to true when
+        old and new dpi settings do not differ "substantially".
+        Otherwise, the dynamic-setting Elisp code may process all sorts
+        of unrelated settings that override users' font customizations,
+        among others.  Compare:
+
+        http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00557.html
+        http://lists.gnu.org/archive/html/bug-gnu-emacs/2016-12/msg00820.html
+
+        As soon as the dynamic-settings code has been tested and
+        verified, this Emacs 25.2 workaround should be removed.  */
+      && ((oldsettings.dpi >= settings->dpi
+          && (oldsettings.dpi - settings->dpi) > 2)
+         || ((settings->dpi > oldsettings.dpi)
+             && (settings->dpi - oldsettings.dpi) > 2)))
     {
       FcPatternDel (pat, FC_DPI);
       FcPatternAddDouble (pat, FC_DPI, settings->dpi);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]