emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117376: Fix bug #17986 with infloop in redisplay


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-24 r117376: Fix bug #17986 with infloop in redisplay when default-directory is nil.
Date: Sun, 13 Jul 2014 14:50:53 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117376
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17986
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Sun 2014-07-13 17:49:59 +0300
message:
  Fix bug #17986 with infloop in redisplay when default-directory is nil.
  
   src/xdisp.c (decode_mode_spec): Call file-remote-p on the current
   buffer's default-directory only if it is a string.
  
   lisp/bindings.el (mode-line-remote): If default-directory is not a
   string, don't call file-remote-p on it; instead state in the
   help-echo that it is nil.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/bindings.el               
bindings.el-20091113204419-o5vbwnq5f7feedwu-1013
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-07-12 02:24:02 +0000
+++ b/lisp/ChangeLog    2014-07-13 14:49:59 +0000
@@ -1,3 +1,9 @@
+2014-07-13  Eli Zaretskii  <address@hidden>
+
+       * bindings.el (mode-line-remote): If default-directory is not a
+       string, don't call file-remote-p on it; instead state in the
+       help-echo that it is nil.  (Bug#17986)
+
 2014-07-12  Paul Eggert  <address@hidden>
 
        Fix bug: C-x v v discarded existing log message (Bug#17884).

=== modified file 'lisp/bindings.el'
--- a/lisp/bindings.el  2014-06-14 09:50:13 +0000
+++ b/lisp/bindings.el  2014-07-13 14:49:59 +0000
@@ -229,11 +229,13 @@
         'help-echo (purecopy (lambda (window _object _point)
                                (format "%s"
                                        (with-selected-window window
-                                         (concat
-                                          (if (file-remote-p default-directory)
-                                              "Current directory is remote: "
-                                            "Current directory is local: ")
-                                          default-directory)))))))
+                                         (if (stringp default-directory)
+                                             (concat
+                                              (if (file-remote-p 
default-directory)
+                                                  "Current directory is 
remote: "
+                                                "Current directory is local: ")
+                                              default-directory)
+                                           "Current directory is nil")))))))
   "Mode line construct to indicate a remote buffer.")
 ;;;###autoload
 (put 'mode-line-remote 'risky-local-variable t)

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-07-12 10:29:13 +0000
+++ b/src/ChangeLog     2014-07-13 14:49:59 +0000
@@ -1,3 +1,8 @@
+2014-07-13  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (decode_mode_spec): Call file-remote-p on the current
+       buffer's default-directory only if it is a string.  (Bug#17986)
+
 2014-07-12  Eli Zaretskii  <address@hidden>
 
        * xdisp.c (display_line): Don't call FETCH_BYTE with argument less

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-07-12 10:29:13 +0000
+++ b/src/xdisp.c       2014-07-13 14:49:59 +0000
@@ -22907,8 +22907,12 @@
     case '@':
       {
        ptrdiff_t count = inhibit_garbage_collection ();
-       Lisp_Object val = call1 (intern ("file-remote-p"),
-                                BVAR (current_buffer, directory));
+       Lisp_Object curdir = BVAR (current_buffer, directory);
+       Lisp_Object val = Qnil;
+
+       if (STRINGP (curdir))
+         val = call1 (intern ("file-remote-p"), curdir);
+
        unbind_to (count, Qnil);
 
        if (NILP (val))


reply via email to

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