diff options
| author | Richard M. Stallman | 1994-01-04 06:38:43 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-04 06:38:43 +0000 |
| commit | 5fe0b67ed455a1f314e5cfbc99ed4cdec02b613e (patch) | |
| tree | 2292de6fb83f8d586377e9cc312ad2534fa57e4e | |
| parent | a889bd0eff7f4d048b89dfdf5a3b0ae7248d83b3 (diff) | |
| download | emacs-5fe0b67ed455a1f314e5cfbc99ed4cdec02b613e.tar.gz emacs-5fe0b67ed455a1f314e5cfbc99ed4cdec02b613e.zip | |
Don't include syntax.h.
(Qget_file_buffer): New variable.
(syms_of_buffer): Set up Qget_file_buffer.
(Fget_file_buffer): For magic file names, run the handler.
| -rw-r--r-- | src/buffer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index 5db9521916d..3d263a2d754 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -34,7 +34,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 34 | #include "window.h" | 34 | #include "window.h" |
| 35 | #include "commands.h" | 35 | #include "commands.h" |
| 36 | #include "buffer.h" | 36 | #include "buffer.h" |
| 37 | #include "syntax.h" | ||
| 38 | #include "indent.h" | 37 | #include "indent.h" |
| 39 | #include "blockinput.h" | 38 | #include "blockinput.h" |
| 40 | 39 | ||
| @@ -130,6 +129,8 @@ Lisp_Object QSFundamental; /* A string "Fundamental" */ | |||
| 130 | 129 | ||
| 131 | Lisp_Object Qkill_buffer_hook; | 130 | Lisp_Object Qkill_buffer_hook; |
| 132 | 131 | ||
| 132 | Lisp_Object Qget_file_buffer; | ||
| 133 | |||
| 133 | Lisp_Object Qoverlayp; | 134 | Lisp_Object Qoverlayp; |
| 134 | 135 | ||
| 135 | Lisp_Object Qmodification_hooks; | 136 | Lisp_Object Qmodification_hooks; |
| @@ -175,9 +176,17 @@ If there is no such live buffer, return nil.") | |||
| 175 | register Lisp_Object filename; | 176 | register Lisp_Object filename; |
| 176 | { | 177 | { |
| 177 | register Lisp_Object tail, buf, tem; | 178 | register Lisp_Object tail, buf, tem; |
| 179 | Lisp_Object handler; | ||
| 180 | |||
| 178 | CHECK_STRING (filename, 0); | 181 | CHECK_STRING (filename, 0); |
| 179 | filename = Fexpand_file_name (filename, Qnil); | 182 | filename = Fexpand_file_name (filename, Qnil); |
| 180 | 183 | ||
| 184 | /* If the file name has special constructs in it, | ||
| 185 | call the corresponding file handler. */ | ||
| 186 | handler = Ffind_file_name_handler (filename); | ||
| 187 | if (!NILP (handler)) | ||
| 188 | return call2 (handler, Qget_file_buffer, filename); | ||
| 189 | |||
| 181 | for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr) | 190 | for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr) |
| 182 | { | 191 | { |
| 183 | buf = Fcdr (XCONS (tail)->car); | 192 | buf = Fcdr (XCONS (tail)->car); |
| @@ -2175,6 +2184,8 @@ syms_of_buffer () | |||
| 2175 | Qinsert_in_front_hooks = intern ("insert-in-front-hooks"); | 2184 | Qinsert_in_front_hooks = intern ("insert-in-front-hooks"); |
| 2176 | staticpro (&Qinsert_behind_hooks); | 2185 | staticpro (&Qinsert_behind_hooks); |
| 2177 | Qinsert_behind_hooks = intern ("insert-behind-hooks"); | 2186 | Qinsert_behind_hooks = intern ("insert-behind-hooks"); |
| 2187 | staticpro (&Qget_file_buffer); | ||
| 2188 | Qget_file_buffer = intern ("get-file-buffer"); | ||
| 2178 | 2189 | ||
| 2179 | Qoverlayp = intern ("overlayp"); | 2190 | Qoverlayp = intern ("overlayp"); |
| 2180 | 2191 | ||