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 | |
| 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')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/bindings.el | 12 |
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e77058569d2..5f4c02c0670 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-07-13 Eli Zaretskii <eliz@gnu.org> + + * 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 <eggert@cs.ucla.edu> Fix bug: C-x v v discarded existing log message (Bug#17884). 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) |
