diff options
author | Eli Zaretskii <eliz@gnu.org> | 2014-07-13 17:49:59 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2014-07-13 17:49:59 +0300 |
commit | b20759f920f9a64a9a03f510f1ab785426d64af3 (patch) | |
tree | 25ad3f7e0e26ec614811a4f37e07d72e4198881c /lisp/bindings.el | |
parent | fb02552638b0c653bfc3d269d879fdffba37bd31 (diff) | |
download | emacs-b20759f920f9a64a9a03f510f1ab785426d64af3.tar.gz |
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 'lisp/bindings.el')
-rw-r--r-- | lisp/bindings.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el index 59aa3dfb3d3..911ab63e8d0 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -229,11 +229,13 @@ mnemonics of the following coding systems: '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) |