aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-07-13 17:49:59 +0300
committerEli Zaretskii2014-07-13 17:49:59 +0300
commitb20759f920f9a64a9a03f510f1ab785426d64af3 (patch)
tree25ad3f7e0e26ec614811a4f37e07d72e4198881c /src
parentfb02552638b0c653bfc3d269d879fdffba37bd31 (diff)
downloademacs-b20759f920f9a64a9a03f510f1ab785426d64af3.tar.gz
emacs-b20759f920f9a64a9a03f510f1ab785426d64af3.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9051d37fcef..ca31b10fb6a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12014-07-13 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (decode_mode_spec): Call file-remote-p on the current
4 buffer's default-directory only if it is a string. (Bug#17986)
5
12014-07-12 Eli Zaretskii <eliz@gnu.org> 62014-07-12 Eli Zaretskii <eliz@gnu.org>
2 7
3 * xdisp.c (display_line): Don't call FETCH_BYTE with argument less 8 * xdisp.c (display_line): Don't call FETCH_BYTE with argument less
diff --git a/src/xdisp.c b/src/xdisp.c
index 6918c4360d4..2f0683294fa 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22907,8 +22907,12 @@ decode_mode_spec (struct window *w, register int c, int field_width,
22907 case '@': 22907 case '@':
22908 { 22908 {
22909 ptrdiff_t count = inhibit_garbage_collection (); 22909 ptrdiff_t count = inhibit_garbage_collection ();
22910 Lisp_Object val = call1 (intern ("file-remote-p"), 22910 Lisp_Object curdir = BVAR (current_buffer, directory);
22911 BVAR (current_buffer, directory)); 22911 Lisp_Object val = Qnil;
22912
22913 if (STRINGP (curdir))
22914 val = call1 (intern ("file-remote-p"), curdir);
22915
22912 unbind_to (count, Qnil); 22916 unbind_to (count, Qnil);
22913 22917
22914 if (NILP (val)) 22918 if (NILP (val))