aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Gutov2015-10-29 03:00:50 +0200
committerDmitry Gutov2015-10-29 03:01:45 +0200
commitffa41ad2a02dbd1202d71a08bac34831f25662d0 (patch)
tree04ff5e2f725343b20dea97e63b4e002e0e88f956 /src
parent42eb249ebd48b8df80357be41364b23a7af4fcf0 (diff)
downloademacs-ffa41ad2a02dbd1202d71a08bac34831f25662d0.tar.gz
emacs-ffa41ad2a02dbd1202d71a08bac34831f25662d0.zip
Don't require default-directory to end with a slash
* doc/lispref/files.texi (Magic File Names): Document the change in unhandled-file-name-directory. * lisp/url/url-handlers.el (url-handler-unhandled-file-name-directory): Update accordingly. * src/buffer.c (default-directory): Update the docsting. * src/fileio.c (unhandled-file-name-directory): Default to calling `file-name-as-directory' (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02294.html).
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c2
-rw-r--r--src/fileio.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 380a7af33c1..91e42dca2bf 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5739,7 +5739,7 @@ visual lines rather than logical lines. See the documentation of
5739 5739
5740 DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory), 5740 DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory),
5741 Qstringp, 5741 Qstringp,
5742 doc: /* Name of default directory of current buffer. Should end with slash. 5742 doc: /* Name of default directory of current buffer.
5743To interactively change the default directory, use command `cd'. */); 5743To interactively change the default directory, use command `cd'. */);
5744 5744
5745 DEFVAR_PER_BUFFER ("auto-fill-function", &BVAR (current_buffer, auto_fill_function), 5745 DEFVAR_PER_BUFFER ("auto-fill-function", &BVAR (current_buffer, auto_fill_function),
diff --git a/src/fileio.c b/src/fileio.c
index 428093bdc4b..6cda1e39eed 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -450,7 +450,7 @@ DEFUN ("unhandled-file-name-directory", Funhandled_file_name_directory,
450A `directly usable' directory name is one that may be used without the 450A `directly usable' directory name is one that may be used without the
451intervention of any file handler. 451intervention of any file handler.
452If FILENAME is a directly usable file itself, return 452If FILENAME is a directly usable file itself, return
453(file-name-directory FILENAME). 453(file-name-as-directory FILENAME).
454If FILENAME refers to a file which is not accessible from a local process, 454If FILENAME refers to a file which is not accessible from a local process,
455then this should return nil. 455then this should return nil.
456The `call-process' and `start-process' functions use this function to 456The `call-process' and `start-process' functions use this function to
@@ -469,7 +469,7 @@ get a current directory to run processes in. */)
469 return STRINGP (handled_name) ? handled_name : Qnil; 469 return STRINGP (handled_name) ? handled_name : Qnil;
470 } 470 }
471 471
472 return Ffile_name_directory (filename); 472 return Ffile_name_as_directory (filename);
473} 473}
474 474
475/* Maximum number of bytes that DST will be longer than SRC 475/* Maximum number of bytes that DST will be longer than SRC