emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 3d88977 3/4: Merge from origin/emacs-25


From: John Wiegley
Subject: [Emacs-diffs] master 3d88977 3/4: Merge from origin/emacs-25
Date: Sat, 02 Apr 2016 23:56:35 +0000

branch: master
commit 3d889773617a882fbee5992960cfe18866cddc34
Merge: f822480 7c1802f
Author: John Wiegley <address@hidden>
Commit: John Wiegley <address@hidden>

    Merge from origin/emacs-25
    
    7c1802f * doc/lispref/text.texi (Columns): Remove a nonexistent refer...
    9034c50 * doc/man/emacsclient.1: Document +line:column option.
    06495c9 Fix rare problems with echo-area display and multiple frames
    f99b512 In M-%, avoid making buffer-local binding of text-property-de...
---
 doc/lispref/text.texi |    3 ---
 doc/man/emacsclient.1 |   12 +++++++++++-
 lisp/replace.el       |   19 ++++++++++++-------
 src/xdisp.c           |    9 +++++++++
 4 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 5e47316..55f0290 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -2191,9 +2191,6 @@ This function returns the horizontal position of point, 
measured in
 columns, counting from 0 at the left margin.  The column position is the
 sum of the widths of all the displayed representations of the characters
 between the start of the current line and point.
-
-For an example of using @code{current-column}, see the description of
address@hidden in @ref{Text Lines}.
 @end defun
 
 @deffn Command move-to-column column &optional force
diff --git a/doc/man/emacsclient.1 b/doc/man/emacsclient.1
index e62fe93..010eeba 100644
--- a/doc/man/emacsclient.1
+++ b/doc/man/emacsclient.1
@@ -49,9 +49,19 @@ If you set the variable "server-window" to a window or a 
frame, "C-x
 #" displays the server buffer in that window or in that frame.
 
 .SH OPTIONS
-The programs follow the usual GNU command line syntax, with long
+Most options follow the usual GNU command line syntax, with long
 options starting with two dashes ("\-").
 .TP
+.BI + line\fR[\fP\fB:\fPcolumn\fR]\fP
+Go to the specified
+.I line
+and
+.IR column .
+A missing
+.I column
+is treated as column 1.
+This option applies only to the next file specified.
+.TP
 .B \-a, \-\-alternate-editor=EDITOR
 if the Emacs server is not running, run the specified editor instead.
 This can also be specified via the ALTERNATE_EDITOR environment variable.
diff --git a/lisp/replace.el b/lisp/replace.el
index 2c6a23a..91e5db8 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -167,8 +167,6 @@ wants to replace FROM with TO."
     ;; unavailable while preparing to dump.
     (custom-reevaluate-setting 'query-replace-from-to-separator)
     (let* ((history-add-new-input nil)
-          (text-property-default-nonsticky
-           (cons '(separator . t) text-property-default-nonsticky))
           (separator
            (when query-replace-from-to-separator
              (propertize "\0"
@@ -193,11 +191,18 @@ wants to replace FROM with TO."
            ;; a region in order to specify the minibuffer input.
            ;; That should not clobber the region for the query-replace itself.
            (save-excursion
-             (if regexp-flag
-                 (read-regexp prompt nil 'query-replace-from-to-history)
-               (read-from-minibuffer
-                prompt nil nil nil 'query-replace-from-to-history
-                (car (if regexp-flag regexp-search-ring search-ring)) t))))
+              ;; The `with-current-buffer' ensures that the binding
+              ;; for `text-property-default-nonsticky' isn't a buffer
+              ;; local binding in the current buffer, which
+              ;; `read-from-minibuffer' wouldn't see.
+              (with-current-buffer (window-buffer (minibuffer-window))
+                (let ((text-property-default-nonsticky
+                       (cons '(separator . t) 
text-property-default-nonsticky)))
+                  (if regexp-flag
+                      (read-regexp prompt nil 'query-replace-from-to-history)
+                    (read-from-minibuffer
+                     prompt nil nil nil 'query-replace-from-to-history
+                     (car (if regexp-flag regexp-search-ring search-ring)) 
t))))))
            (to))
       (if (and (zerop (length from)) query-replace-defaults)
          (cons (caar query-replace-defaults)
diff --git a/src/xdisp.c b/src/xdisp.c
index 290f698..11b20f9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17046,7 +17046,16 @@ redisplay_window (Lisp_Object window, bool 
just_this_one_p)
            ignore_mouse_drag_p = true;
 #endif
         }
+      ptrdiff_t count1 = SPECPDL_INDEX ();
+      /* x_consider_frame_title calls select-frame, which calls
+        resize_mini_window, which could resize the mini-window and by
+        that undo the effect of this redisplay cycle wrt minibuffer
+        and echo-area display.  Binding inhibit-redisplay to t makes
+        the call to resize_mini_window a no-op, thus avoiding the
+        adverse side effects.  */
+      specbind (Qinhibit_redisplay, Qt);
       x_consider_frame_title (w->frame);
+      unbind_to (count1, Qnil);
 #endif
     }
 



reply via email to

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