Mercurial > emacs
comparison src/fileio.c @ 94885:a69e407ec0dd
(double_dollars): Remove dead code.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 12 May 2008 18:31:26 +0000 |
parents | 4d2fe01917d3 |
children | 8971ddf55736 |
comparison
equal
deleted
inserted
replaced
94884:4ea0e968c7af | 94885:a69e407ec0dd |
---|---|
6086 { | 6086 { |
6087 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil; | 6087 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil; |
6088 } | 6088 } |
6089 | 6089 |
6090 /* Reading and completing file names */ | 6090 /* Reading and completing file names */ |
6091 extern Lisp_Object Ffile_name_completion (), Ffile_name_all_completions (); | |
6092 extern Lisp_Object Qcompletion_ignore_case; | |
6093 | |
6094 /* In the string VAL, change each $ to $$ and return the result. */ | |
6095 | |
6096 static Lisp_Object | |
6097 double_dollars (val) | |
6098 Lisp_Object val; | |
6099 { | |
6100 register const unsigned char *old; | |
6101 register unsigned char *new; | |
6102 register int n; | |
6103 int osize, count; | |
6104 | |
6105 osize = SBYTES (val); | |
6106 | |
6107 /* Count the number of $ characters. */ | |
6108 for (n = osize, count = 0, old = SDATA (val); n > 0; n--) | |
6109 if (*old++ == '$') count++; | |
6110 if (count > 0) | |
6111 { | |
6112 old = SDATA (val); | |
6113 val = make_uninit_multibyte_string (SCHARS (val) + count, | |
6114 osize + count); | |
6115 new = SDATA (val); | |
6116 for (n = osize; n > 0; n--) | |
6117 if (*old != '$') | |
6118 *new++ = *old++; | |
6119 else | |
6120 { | |
6121 *new++ = '$'; | |
6122 *new++ = '$'; | |
6123 old++; | |
6124 } | |
6125 } | |
6126 return val; | |
6127 } | |
6128 | 6091 |
6129 DEFUN ("next-read-file-uses-dialog-p", Fnext_read_file_uses_dialog_p, | 6092 DEFUN ("next-read-file-uses-dialog-p", Fnext_read_file_uses_dialog_p, |
6130 Snext_read_file_uses_dialog_p, 0, 0, 0, | 6093 Snext_read_file_uses_dialog_p, 0, 0, 0, |
6131 doc: /* Return t if a call to `read-file-name' will use a dialog. | 6094 doc: /* Return t if a call to `read-file-name' will use a dialog. |
6132 The return value is only relevant for a call to `read-file-name' that happens | 6095 The return value is only relevant for a call to `read-file-name' that happens |