aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-22 05:04:59 +0000
committerRichard M. Stallman1994-09-22 05:04:59 +0000
commit0a952b5763c4a75da9dd0fbfa3c44878f1db2239 (patch)
treec56523af92740688cca879bd46dbb74459eb2bc4
parent42354c891c40ab141dbd1abe2c6bb1d3eb40f9b8 (diff)
downloademacs-0a952b5763c4a75da9dd0fbfa3c44878f1db2239.tar.gz
emacs-0a952b5763c4a75da9dd0fbfa3c44878f1db2239.zip
(display-buffer, special-display-buffer-names)
(special-display-regexps, special-display-function): Accept cons cells in `special-display-buffer-names' and `special-display-regexps'. If the buffer name matches the car, call `special-display-function' with the cdr as a second argument.
-rw-r--r--src/window.c35
1 files changed, 29 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c
index 7f172486426..67fe10fe26c 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1858,9 +1858,24 @@ Returns the window displaying BUFFER.")
1858 if (!NILP (tem)) 1858 if (!NILP (tem))
1859 return call1 (Vspecial_display_function, buffer); 1859 return call1 (Vspecial_display_function, buffer);
1860 1860
1861 tem = Fassoc (XBUFFER (buffer)->name, Vspecial_display_buffer_names);
1862 if (!NILP (tem))
1863 return call2 (Vspecial_display_function, buffer, XCONS (tem)->cdr);
1864
1861 for (tem = Vspecial_display_regexps; CONSP (tem); tem = XCONS (tem)->cdr) 1865 for (tem = Vspecial_display_regexps; CONSP (tem); tem = XCONS (tem)->cdr)
1862 if (fast_string_match (XCONS (tem)->car, XBUFFER (buffer)->name) >= 0) 1866 {
1863 return call1 (Vspecial_display_function, buffer); 1867 Lisp_Object car = XCONS (tem)->car;
1868 if (STRINGP (car)
1869 && fast_string_match (car, XBUFFER (buffer)->name) >= 0)
1870 return call1 (Vspecial_display_function, buffer);
1871 else if (CONSP (car)
1872 && STRINGP (XCONS (car)->car)
1873 && fast_string_match (XCONS (car)->car,
1874 XBUFFER (buffer)->name) >= 0)
1875 return call2 (Vspecial_display_function,
1876 buffer,
1877 XCONS (car)->cdr);
1878 }
1864 } 1879 }
1865 1880
1866#ifdef MULTI_FRAME 1881#ifdef MULTI_FRAME
@@ -3245,20 +3260,28 @@ where `pop-up-frame-alist' would hold the default frame parameters.");
3245 DEFVAR_LISP ("special-display-buffer-names", &Vspecial_display_buffer_names, 3260 DEFVAR_LISP ("special-display-buffer-names", &Vspecial_display_buffer_names,
3246 "*List of buffer names that should have their own special frames.\n\ 3261 "*List of buffer names that should have their own special frames.\n\
3247Displaying a buffer whose name is in this list makes a special frame for it\n\ 3262Displaying a buffer whose name is in this list makes a special frame for it\n\
3248using `special-display-function'. See also `special-display-regexps'."); 3263using `special-display-function'.\n\
3264Instead of a buffer name, the list entries can be cons cells. In that\n\
3265case the car should be a buffer name, and the cdr data to be passed as a
3266second argument to `special-display-function'.\n\
3267See also `special-display-regexps'.");
3249 Vspecial_display_buffer_names = Qnil; 3268 Vspecial_display_buffer_names = Qnil;
3250 3269
3251 DEFVAR_LISP ("special-display-regexps", &Vspecial_display_regexps, 3270 DEFVAR_LISP ("special-display-regexps", &Vspecial_display_regexps,
3252 "*List of regexps saying which buffers should have their own special frames.\n\ 3271 "*List of regexps saying which buffers should have their own special frames.\n\
3253If a buffer name matches one of these regexps, it gets its own frame.\n\ 3272If a buffer name matches one of these regexps, it gets its own frame.\n\
3254Displaying a buffer whose name is in this list makes a special frame for it\n\ 3273Displaying a buffer whose name is in this list makes a special frame for it\n\
3255using `special-display-function'. See also `special-display-buffer-names'."); 3274using `special-display-function'.\n\
3275Instead of a buffer name, the list entries can be cons cells. In that\n\
3276case the car should be the regexp, and the cdr data to be passed as a
3277second argument to `special-display-function'.\n\
3278See also `special-display-buffer-names'.");
3256 Vspecial_display_regexps = Qnil; 3279 Vspecial_display_regexps = Qnil;
3257 3280
3258 DEFVAR_LISP ("special-display-function", &Vspecial_display_function, 3281 DEFVAR_LISP ("special-display-function", &Vspecial_display_function,
3259 "Function to call to make a new frame for a special buffer.\n\ 3282 "Function to call to make a new frame for a special buffer.\n\
3260It is called with one argument, the buffer,\n\ 3283It is called with two arguments, the buffer and optional buffer specific\n\
3261and should return a window displaying that buffer.\n\ 3284data, and should return a window displaying that buffer.\n\
3262The default value makes a separate frame for the buffer,\n\ 3285The default value makes a separate frame for the buffer,\n\
3263using `special-display-alist' to specify the frame parameters.\n\ 3286using `special-display-alist' to specify the frame parameters.\n\
3264\n\ 3287\n\