aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2003-01-13 08:17:33 +0000
committerRichard M. Stallman2003-01-13 08:17:33 +0000
commitd57563b6120699ac06eb33ee1d2c161869965072 (patch)
tree048ed04a1272e7e11550a1d3b719b4b532239b97 /src
parent914b40da4ad01afd8b5a08e9e67001700bd1221a (diff)
downloademacs-d57563b6120699ac06eb33ee1d2c161869965072.tar.gz
emacs-d57563b6120699ac06eb33ee1d2c161869965072.zip
(syms_of_fileio) <directory-sep-char>: Doc fix.
(Fdo_auto_save): Add gcpros around Ffile_name_directory.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 996de3136de..9d14a851bd4 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3263,12 +3263,6 @@ searchable directory. */)
3263 if (!NILP (handler)) 3263 if (!NILP (handler))
3264 return call2 (handler, Qfile_accessible_directory_p, filename); 3264 return call2 (handler, Qfile_accessible_directory_p, filename);
3265 3265
3266 /* It's an unlikely combination, but yes we really do need to gcpro:
3267 Suppose that file-accessible-directory-p has no handler, but
3268 file-directory-p does have a handler; this handler causes a GC which
3269 relocates the string in `filename'; and finally file-directory-p
3270 returns non-nil. Then we would end up passing a garbaged string
3271 to file-executable-p. */
3272 GCPRO1 (filename); 3266 GCPRO1 (filename);
3273 tem = (NILP (Ffile_directory_p (filename)) 3267 tem = (NILP (Ffile_directory_p (filename))
3274 || NILP (Ffile_executable_p (filename))); 3268 || NILP (Ffile_executable_p (filename)));
@@ -5617,6 +5611,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
5617 int count = SPECPDL_INDEX (); 5611 int count = SPECPDL_INDEX ();
5618 int orig_minibuffer_auto_raise = minibuffer_auto_raise; 5612 int orig_minibuffer_auto_raise = minibuffer_auto_raise;
5619 int old_message_p = 0; 5613 int old_message_p = 0;
5614 struct gcpro gcpro1, gcpro2;
5620 5615
5621 if (max_specpdl_size < specpdl_size + 40) 5616 if (max_specpdl_size < specpdl_size + 40)
5622 max_specpdl_size = specpdl_size + 40; 5617 max_specpdl_size = specpdl_size + 40;
@@ -5653,11 +5648,14 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
5653 if (!NILP (Vrun_hooks)) 5648 if (!NILP (Vrun_hooks))
5654 { 5649 {
5655 Lisp_Object dir; 5650 Lisp_Object dir;
5651 dir = Qnil;
5652 GCPRO2 (dir, listfile);
5656 dir = Ffile_name_directory (listfile); 5653 dir = Ffile_name_directory (listfile);
5657 if (NILP (Ffile_directory_p (dir))) 5654 if (NILP (Ffile_directory_p (dir)))
5658 internal_condition_case_1 (do_auto_save_make_dir, 5655 internal_condition_case_1 (do_auto_save_make_dir,
5659 dir, Fcons (Fcons (Qfile_error, Qnil), Qnil), 5656 dir, Fcons (Fcons (Qfile_error, Qnil), Qnil),
5660 do_auto_save_eh); 5657 do_auto_save_eh);
5658 UNGCPRO;
5661 } 5659 }
5662 5660
5663 stream = fopen (SDATA (listfile), "w"); 5661 stream = fopen (SDATA (listfile), "w");
@@ -6353,10 +6351,7 @@ nil means use format `var'. This variable is meaningful only on VMS. */);
6353 6351
6354 DEFVAR_LISP ("directory-sep-char", &Vdirectory_sep_char, 6352 DEFVAR_LISP ("directory-sep-char", &Vdirectory_sep_char,
6355 doc: /* Directory separator character for built-in functions that return file names. 6353 doc: /* Directory separator character for built-in functions that return file names.
6356The value should be either ?/ or ?\\ (any other value is treated as ?\\). 6354The value is always ?/. Don't use this variable, just use `/'. */);
6357This variable affects the built-in functions only on Windows,
6358on other platforms, it is initialized so that Lisp code can find out
6359what the normal separator is. */);
6360 6355
6361 DEFVAR_LISP ("file-name-handler-alist", &Vfile_name_handler_alist, 6356 DEFVAR_LISP ("file-name-handler-alist", &Vfile_name_handler_alist,
6362 doc: /* *Alist of elements (REGEXP . HANDLER) for file names handled specially. 6357 doc: /* *Alist of elements (REGEXP . HANDLER) for file names handled specially.