aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-01-14 02:48:51 +0000
committerJim Blandy1992-01-14 02:48:51 +0000
commit56a98455a6d993518b9b1f1b3cff4e72bdd6275d (patch)
tree9429ed5f68a3cab776b7efa0b6f0ffa00ec74a29 /src
parent0849f191ce56119013c31cba8bc44bb374269f7c (diff)
downloademacs-56a98455a6d993518b9b1f1b3cff4e72bdd6275d.tar.gz
emacs-56a98455a6d993518b9b1f1b3cff4e72bdd6275d.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c42
-rw-r--r--src/indent.c20
-rw-r--r--src/minibuf.c78
-rw-r--r--src/window.h3
4 files changed, 61 insertions, 82 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 2ea8471fd50..0f059079f1f 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -92,7 +92,7 @@ init_editfns ()
92 /* If the user name claimed in the environment vars differs from 92 /* If the user name claimed in the environment vars differs from
93 the real uid, use the claimed name to find the full name. */ 93 the real uid, use the claimed name to find the full name. */
94 tem = Fstring_equal (Vuser_name, Vuser_real_name); 94 tem = Fstring_equal (Vuser_name, Vuser_real_name);
95 if (NULL (tem)) 95 if (NILP (tem))
96 pw = (struct passwd *) getpwnam (XSTRING (Vuser_name)->data); 96 pw = (struct passwd *) getpwnam (XSTRING (Vuser_name)->data);
97 97
98 p = (unsigned char *) (pw ? USER_FULL_NAME : "unknown"); 98 p = (unsigned char *) (pw ? USER_FULL_NAME : "unknown");
@@ -202,7 +202,7 @@ region_limit (beginningp)
202{ 202{
203 register Lisp_Object m; 203 register Lisp_Object m;
204 m = Fmarker_position (current_buffer->mark); 204 m = Fmarker_position (current_buffer->mark);
205 if (NULL (m)) error ("There is no region now"); 205 if (NILP (m)) error ("There is no region now");
206 if ((point < XFASTINT (m)) == beginningp) 206 if ((point < XFASTINT (m)) == beginningp)
207 return (make_number (point)); 207 return (make_number (point));
208 else 208 else
@@ -263,14 +263,14 @@ store it in a Lisp variable. Example:\n\
263 (pos) 263 (pos)
264 Lisp_Object pos; 264 Lisp_Object pos;
265{ 265{
266 if (NULL (pos)) 266 if (NILP (pos))
267 { 267 {
268 current_buffer->mark = Qnil; 268 current_buffer->mark = Qnil;
269 return Qnil; 269 return Qnil;
270 } 270 }
271 CHECK_NUMBER_COERCE_MARKER (pos, 0); 271 CHECK_NUMBER_COERCE_MARKER (pos, 0);
272 272
273 if (NULL (current_buffer->mark)) 273 if (NILP (current_buffer->mark))
274 current_buffer->mark = Fmake_marker (); 274 current_buffer->mark = Fmake_marker ();
275 275
276 Fset_marker (current_buffer->mark, pos, Qnil); 276 Fset_marker (current_buffer->mark, pos, Qnil);
@@ -298,7 +298,7 @@ save_excursion_restore (info)
298 /* Otherwise could get error here while unwinding to top level 298 /* Otherwise could get error here while unwinding to top level
299 and crash */ 299 and crash */
300 /* In that case, Fmarker_buffer returns nil now. */ 300 /* In that case, Fmarker_buffer returns nil now. */
301 if (NULL (tem)) 301 if (NILP (tem))
302 return Qnil; 302 return Qnil;
303 Fset_buffer (tem); 303 Fset_buffer (tem);
304 tem = Fcar (info); 304 tem = Fcar (info);
@@ -308,7 +308,7 @@ save_excursion_restore (info)
308 Fset_marker (current_buffer->mark, tem, Fcurrent_buffer ()); 308 Fset_marker (current_buffer->mark, tem, Fcurrent_buffer ());
309 unchain_marker (tem); 309 unchain_marker (tem);
310 tem = Fcdr (Fcdr (info)); 310 tem = Fcdr (Fcdr (info));
311 if (!NULL (tem) && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer)) 311 if (!NILP (tem) && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer))
312 Fswitch_to_buffer (Fcurrent_buffer (), Qnil); 312 Fswitch_to_buffer (Fcurrent_buffer (), Qnil);
313 return Qnil; 313 return Qnil;
314} 314}
@@ -720,14 +720,14 @@ They default to the beginning and the end of BUFFER.")
720 buf = Fget_buffer (buf); 720 buf = Fget_buffer (buf);
721 bp = XBUFFER (buf); 721 bp = XBUFFER (buf);
722 722
723 if (NULL (b)) 723 if (NILP (b))
724 beg = BUF_BEGV (bp); 724 beg = BUF_BEGV (bp);
725 else 725 else
726 { 726 {
727 CHECK_NUMBER_COERCE_MARKER (b, 0); 727 CHECK_NUMBER_COERCE_MARKER (b, 0);
728 beg = XINT (b); 728 beg = XINT (b);
729 } 729 }
730 if (NULL (e)) 730 if (NILP (e))
731 end = BUF_ZV (bp); 731 end = BUF_ZV (bp);
732 else 732 else
733 { 733 {
@@ -782,7 +782,7 @@ and don't mark the buffer as really changed.")
782 look = XINT (fromchar); 782 look = XINT (fromchar);
783 783
784 modify_region (pos, stop); 784 modify_region (pos, stop);
785 if (! NULL (noundo)) 785 if (! NILP (noundo))
786 { 786 {
787 if (MODIFF - 1 == current_buffer->save_modified) 787 if (MODIFF - 1 == current_buffer->save_modified)
788 current_buffer->save_modified++; 788 current_buffer->save_modified++;
@@ -794,10 +794,10 @@ and don't mark the buffer as really changed.")
794 { 794 {
795 if (FETCH_CHAR (pos) == look) 795 if (FETCH_CHAR (pos) == look)
796 { 796 {
797 if (NULL (noundo)) 797 if (NILP (noundo))
798 record_change (pos, 1); 798 record_change (pos, 1);
799 FETCH_CHAR (pos) = XINT (tochar); 799 FETCH_CHAR (pos) = XINT (tochar);
800 if (NULL (noundo)) 800 if (NILP (noundo))
801 signal_after_change (pos, 1, 1); 801 signal_after_change (pos, 1, 1);
802 } 802 }
803 pos++; 803 pos++;
@@ -1183,28 +1183,13 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer.")
1183 CHECK_NUMBER (c1, 0); 1183 CHECK_NUMBER (c1, 0);
1184 CHECK_NUMBER (c2, 1); 1184 CHECK_NUMBER (c2, 1);
1185 1185
1186 if (!NULL (current_buffer->case_fold_search) 1186 if (!NILP (current_buffer->case_fold_search)
1187 ? downcase[0xff & XFASTINT (c1)] == downcase[0xff & XFASTINT (c2)] 1187 ? downcase[0xff & XFASTINT (c1)] == downcase[0xff & XFASTINT (c2)]
1188 : XINT (c1) == XINT (c2)) 1188 : XINT (c1) == XINT (c2))
1189 return Qt; 1189 return Qt;
1190 return Qnil; 1190 return Qnil;
1191} 1191}
1192 1192
1193#ifndef MAINTAIN_ENVIRONMENT /* it is done in environ.c in that case */
1194DEFUN ("getenv", Fgetenv, Sgetenv, 1, 2, 0,
1195 "Return the value of environment variable VAR, as a string.\n\
1196VAR should be a string. Value is nil if VAR is undefined in the environment.")
1197 (str)
1198 Lisp_Object str;
1199{
1200 register char *val;
1201 CHECK_STRING (str, 0);
1202 val = (char *) egetenv (XSTRING (str)->data);
1203 if (!val)
1204 return Qnil;
1205 return build_string (val);
1206}
1207#endif /* MAINTAIN_ENVIRONMENT */
1208 1193
1209void 1194void
1210syms_of_editfns () 1195syms_of_editfns ()
@@ -1266,9 +1251,6 @@ syms_of_editfns ()
1266 defsubr (&Sunix_sync); 1251 defsubr (&Sunix_sync);
1267 defsubr (&Smessage); 1252 defsubr (&Smessage);
1268 defsubr (&Sformat); 1253 defsubr (&Sformat);
1269#ifndef MAINTAIN_ENVIRONMENT /* in environ.c */
1270 defsubr (&Sgetenv);
1271#endif
1272 1254
1273 defsubr (&Sinsert_buffer_substring); 1255 defsubr (&Sinsert_buffer_substring);
1274 defsubr (&Ssubst_char_in_region); 1256 defsubr (&Ssubst_char_in_region);
diff --git a/src/indent.c b/src/indent.c
index de85e1f0d0c..e9031d54069 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -47,8 +47,6 @@ int last_known_column_point;
47/* Value of MODIFF when current_column was called */ 47/* Value of MODIFF when current_column was called */
48int last_known_column_modified; 48int last_known_column_modified;
49 49
50extern int minibuf_prompt_width;
51
52/* Get the display table to use for the current buffer. */ 50/* Get the display table to use for the current buffer. */
53 51
54struct Lisp_Vector * 52struct Lisp_Vector *
@@ -99,7 +97,7 @@ current_column ()
99 int post_tab; 97 int post_tab;
100 register int c; 98 register int c;
101 register int tab_width = XINT (current_buffer->tab_width); 99 register int tab_width = XINT (current_buffer->tab_width);
102 int ctl_arrow = !NULL (current_buffer->ctl_arrow); 100 int ctl_arrow = !NILP (current_buffer->ctl_arrow);
103 register struct Lisp_Vector *dp = buffer_display_table (); 101 register struct Lisp_Vector *dp = buffer_display_table ();
104 int stopchar; 102 int stopchar;
105 103
@@ -188,7 +186,7 @@ even if that goes past COLUMN; by default, MIN is zero.")
188 register int tab_width = XINT (current_buffer->tab_width); 186 register int tab_width = XINT (current_buffer->tab_width);
189 187
190 CHECK_NUMBER (col, 0); 188 CHECK_NUMBER (col, 0);
191 if (NULL (minimum)) 189 if (NILP (minimum))
192 XFASTINT (minimum) = 0; 190 XFASTINT (minimum) = 0;
193 CHECK_NUMBER (minimum, 1); 191 CHECK_NUMBER (minimum, 1);
194 192
@@ -293,7 +291,7 @@ and if COLUMN is in the middle of a tab character, change it to spaces.")
293 register int goal; 291 register int goal;
294 register int end; 292 register int end;
295 register int tab_width = XINT (current_buffer->tab_width); 293 register int tab_width = XINT (current_buffer->tab_width);
296 register int ctl_arrow = !NULL (current_buffer->ctl_arrow); 294 register int ctl_arrow = !NILP (current_buffer->ctl_arrow);
297 register struct Lisp_Vector *dp = buffer_display_table (); 295 register struct Lisp_Vector *dp = buffer_display_table ();
298 296
299 Lisp_Object val; 297 Lisp_Object val;
@@ -344,7 +342,7 @@ and if COLUMN is in the middle of a tab character, change it to spaces.")
344 342
345 /* If a tab char made us overshoot, change it to spaces 343 /* If a tab char made us overshoot, change it to spaces
346 and scan through it again. */ 344 and scan through it again. */
347 if (!NULL (force) && col > goal && c == '\t' && prev_col < goal) 345 if (!NILP (force) && col > goal && c == '\t' && prev_col < goal)
348 { 346 {
349 del_range (point - 1, point); 347 del_range (point - 1, point);
350 Findent_to (make_number (col - 1)); 348 Findent_to (make_number (col - 1));
@@ -353,7 +351,7 @@ and if COLUMN is in the middle of a tab character, change it to spaces.")
353 } 351 }
354 352
355 /* If line ends prematurely, add space to the end. */ 353 /* If line ends prematurely, add space to the end. */
356 if (col < goal && !NULL (force)) 354 if (col < goal && !NILP (force))
357 Findent_to (make_number (col = goal)); 355 Findent_to (make_number (col = goal));
358 356
359 last_known_column = col; 357 last_known_column = col;
@@ -434,12 +432,12 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
434 register int pos; 432 register int pos;
435 register int c; 433 register int c;
436 register int tab_width = XFASTINT (current_buffer->tab_width); 434 register int tab_width = XFASTINT (current_buffer->tab_width);
437 register int ctl_arrow = !NULL (current_buffer->ctl_arrow); 435 register int ctl_arrow = !NILP (current_buffer->ctl_arrow);
438 register struct Lisp_Vector *dp = buffer_display_table (); 436 register struct Lisp_Vector *dp = buffer_display_table ();
439 int selective 437 int selective
440 = XTYPE (current_buffer->selective_display) == Lisp_Int 438 = XTYPE (current_buffer->selective_display) == Lisp_Int
441 ? XINT (current_buffer->selective_display) 439 ? XINT (current_buffer->selective_display)
442 : !NULL (current_buffer->selective_display) ? -1 : 0; 440 : !NILP (current_buffer->selective_display) ? -1 : 0;
443 int prevpos; 441 int prevpos;
444 int selective_rlen 442 int selective_rlen
445 = (selective && dp && XTYPE (DISP_INVIS_ROPE (dp)) == Lisp_String 443 = (selective && dp && XTYPE (DISP_INVIS_ROPE (dp)) == Lisp_String
@@ -517,7 +515,7 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
517 if (hscroll 515 if (hscroll
518 || (truncate_partial_width_windows 516 || (truncate_partial_width_windows
519 && width + 1 < SCREEN_WIDTH (selected_screen)) 517 && width + 1 < SCREEN_WIDTH (selected_screen))
520 || !NULL (current_buffer->truncate_lines)) 518 || !NILP (current_buffer->truncate_lines))
521 { 519 {
522 while (pos < to && FETCH_CHAR(pos) != '\n') pos++; 520 while (pos < to && FETCH_CHAR(pos) != '\n') pos++;
523 pos--; 521 pos--;
@@ -593,7 +591,7 @@ vmotion (from, vtarget, width, hscroll, window)
593 int selective 591 int selective
594 = XTYPE (current_buffer->selective_display) == Lisp_Int 592 = XTYPE (current_buffer->selective_display) == Lisp_Int
595 ? XINT (current_buffer->selective_display) 593 ? XINT (current_buffer->selective_display)
596 : !NULL (current_buffer->selective_display) ? -1 : 0; 594 : !NILP (current_buffer->selective_display) ? -1 : 0;
597 int start_hpos = (EQ (window, minibuf_window) ? minibuf_prompt_width : 0); 595 int start_hpos = (EQ (window, minibuf_window) ? minibuf_prompt_width : 0);
598 596
599 retry: 597 retry:
diff --git a/src/minibuf.c b/src/minibuf.c
index 26f85389890..93c9f26727a 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -74,10 +74,6 @@ static Lisp_Object last_exact_completion;
74 74
75Lisp_Object Quser_variable_p; 75Lisp_Object Quser_variable_p;
76 76
77/* Width in columns of current minibuffer prompt. */
78
79extern int minibuf_prompt_width;
80
81 77
82/* Actual minibuffer invocation. */ 78/* Actual minibuffer invocation. */
83 79
@@ -171,10 +167,10 @@ read_minibuf (map, initial, prompt, backup_n, expflag)
171 Ferase_buffer (); 167 Ferase_buffer ();
172 minibuf_level++; 168 minibuf_level++;
173 169
174 if (!NULL (initial)) 170 if (!NILP (initial))
175 { 171 {
176 Finsert (1, &initial); 172 Finsert (1, &initial);
177 if (!NULL (backup_n) && XTYPE (backup_n) == Lisp_Int) 173 if (!NILP (backup_n) && XTYPE (backup_n) == Lisp_Int)
178 Fforward_char (backup_n); 174 Fforward_char (backup_n);
179 } 175 }
180 176
@@ -231,13 +227,13 @@ get_minibuffer (depth)
231 227
232 XFASTINT (num) = depth; 228 XFASTINT (num) = depth;
233 tail = Fnthcdr (num, Vminibuffer_list); 229 tail = Fnthcdr (num, Vminibuffer_list);
234 if (NULL (tail)) 230 if (NILP (tail))
235 { 231 {
236 tail = Fcons (Qnil, Qnil); 232 tail = Fcons (Qnil, Qnil);
237 Vminibuffer_list = nconc2 (Vminibuffer_list, tail); 233 Vminibuffer_list = nconc2 (Vminibuffer_list, tail);
238 } 234 }
239 buf = Fcar (tail); 235 buf = Fcar (tail);
240 if (NULL (buf) || NULL (XBUFFER (buf)->name)) 236 if (NILP (buf) || NILP (XBUFFER (buf)->name))
241 { 237 {
242 sprintf (name, " *Minibuf-%d*", depth); 238 sprintf (name, " *Minibuf-%d*", depth);
243 buf = Fget_buffer_create (build_string (name)); 239 buf = Fget_buffer_create (build_string (name));
@@ -299,10 +295,10 @@ Fifth arg POSITION, if non-nil, is where to put point\n\
299 int pos = 0; 295 int pos = 0;
300 296
301 CHECK_STRING (prompt, 0); 297 CHECK_STRING (prompt, 0);
302 if (!NULL (initial_input)) 298 if (!NILP (initial_input))
303 { 299 {
304 CHECK_STRING (initial_input, 1); 300 CHECK_STRING (initial_input, 1);
305 if (!NULL (position)) 301 if (!NILP (position))
306 { 302 {
307 CHECK_NUMBER (position, 0); 303 CHECK_NUMBER (position, 0);
308 /* Convert to distance from end of input. */ 304 /* Convert to distance from end of input. */
@@ -310,12 +306,12 @@ Fifth arg POSITION, if non-nil, is where to put point\n\
310 } 306 }
311 } 307 }
312 308
313 if (NULL (keymap)) 309 if (NILP (keymap))
314 keymap = Vminibuffer_local_map; 310 keymap = Vminibuffer_local_map;
315 else 311 else
316 keymap = get_keymap (keymap,2); 312 keymap = get_keymap (keymap,2);
317 return read_minibuf (keymap, initial_input, prompt, 313 return read_minibuf (keymap, initial_input, prompt,
318 pos, !NULL (read)); 314 pos, !NILP (read));
319} 315}
320 316
321DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, 317DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0,
@@ -326,7 +322,7 @@ is a string to insert in the minibuffer before reading.")
326 Lisp_Object prompt, initial_contents; 322 Lisp_Object prompt, initial_contents;
327{ 323{
328 CHECK_STRING (prompt, 0); 324 CHECK_STRING (prompt, 0);
329 if (!NULL (initial_contents)) 325 if (!NILP (initial_contents))
330 CHECK_STRING (initial_contents, 1) 326 CHECK_STRING (initial_contents, 1)
331 return read_minibuf (Vminibuffer_local_map, initial_contents, prompt, Qnil, 1); 327 return read_minibuf (Vminibuffer_local_map, initial_contents, prompt, Qnil, 1);
332} 328}
@@ -359,7 +355,7 @@ Prompt with PROMPT, and provide INIT as an initial value of the input string.")
359 Lisp_Object prompt, init; 355 Lisp_Object prompt, init;
360{ 356{
361 CHECK_STRING (prompt, 0); 357 CHECK_STRING (prompt, 0);
362 if (! NULL (init)) 358 if (! NILP (init))
363 CHECK_STRING (init, 1); 359 CHECK_STRING (init, 1);
364 360
365 return read_minibuf (Vminibuffer_local_ns_map, init, prompt, Qnil, 0); 361 return read_minibuf (Vminibuffer_local_ns_map, init, prompt, Qnil, 0);
@@ -413,7 +409,7 @@ If optional third arg REQUIRE-MATCH is non-nil, only existing buffer names are a
413 409
414 if (XTYPE (def) == Lisp_Buffer) 410 if (XTYPE (def) == Lisp_Buffer)
415 def = XBUFFER (def)->name; 411 def = XBUFFER (def)->name;
416 if (!NULL (def)) 412 if (!NILP (def))
417 { 413 {
418 args[0] = build_string ("%s(default %s) "); 414 args[0] = build_string ("%s(default %s) ");
419 args[1] = prompt; 415 args[1] = prompt;
@@ -453,7 +449,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
453 Lisp_Object bestmatch, tail, elt, eltstring; 449 Lisp_Object bestmatch, tail, elt, eltstring;
454 int bestmatchsize; 450 int bestmatchsize;
455 int compare, matchsize; 451 int compare, matchsize;
456 int list = CONSP (alist) || NULL (alist); 452 int list = CONSP (alist) || NILP (alist);
457 int index, obsize; 453 int index, obsize;
458 int matchcount = 0; 454 int matchcount = 0;
459 Lisp_Object bucket, zero, end, tem; 455 Lisp_Object bucket, zero, end, tem;
@@ -483,7 +479,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
483 479
484 if (list) 480 if (list)
485 { 481 {
486 if (NULL (tail)) 482 if (NILP (tail))
487 break; 483 break;
488 elt = Fcar (tail); 484 elt = Fcar (tail);
489 eltstring = Fcar (elt); 485 eltstring = Fcar (elt);
@@ -520,7 +516,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
520 /* Ignore this element if there is a predicate 516 /* Ignore this element if there is a predicate
521 and the predicate doesn't like it. */ 517 and the predicate doesn't like it. */
522 518
523 if (!NULL (pred)) 519 if (!NILP (pred))
524 { 520 {
525 if (EQ (pred, Qcommandp)) 521 if (EQ (pred, Qcommandp))
526 tem = Fcommandp (elt); 522 tem = Fcommandp (elt);
@@ -530,13 +526,13 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
530 tem = call1 (pred, elt); 526 tem = call1 (pred, elt);
531 UNGCPRO; 527 UNGCPRO;
532 } 528 }
533 if (NULL (tem)) continue; 529 if (NILP (tem)) continue;
534 } 530 }
535 531
536 /* Update computation of how much all possible completions match */ 532 /* Update computation of how much all possible completions match */
537 533
538 matchcount++; 534 matchcount++;
539 if (NULL (bestmatch)) 535 if (NILP (bestmatch))
540 bestmatch = eltstring, bestmatchsize = XSTRING (eltstring)->size; 536 bestmatch = eltstring, bestmatchsize = XSTRING (eltstring)->size;
541 else 537 else
542 { 538 {
@@ -575,7 +571,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
575 } 571 }
576 } 572 }
577 573
578 if (NULL (bestmatch)) 574 if (NILP (bestmatch))
579 return Qnil; /* No completions found */ 575 return Qnil; /* No completions found */
580 /* If we are ignoring case, and there is no exact match, 576 /* If we are ignoring case, and there is no exact match,
581 and no additional text was supplied, 577 and no additional text was supplied,
@@ -642,7 +638,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
642{ 638{
643 Lisp_Object tail, elt, eltstring; 639 Lisp_Object tail, elt, eltstring;
644 Lisp_Object allmatches; 640 Lisp_Object allmatches;
645 int list = CONSP (alist) || NULL (alist); 641 int list = CONSP (alist) || NILP (alist);
646 int index, obsize; 642 int index, obsize;
647 Lisp_Object bucket, tem; 643 Lisp_Object bucket, tem;
648 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 644 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
@@ -672,7 +668,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
672 668
673 if (list) 669 if (list)
674 { 670 {
675 if (NULL (tail)) 671 if (NILP (tail))
676 break; 672 break;
677 elt = Fcar (tail); 673 elt = Fcar (tail);
678 eltstring = Fcar (elt); 674 eltstring = Fcar (elt);
@@ -710,7 +706,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
710 /* Ignore this element if there is a predicate 706 /* Ignore this element if there is a predicate
711 and the predicate doesn't like it. */ 707 and the predicate doesn't like it. */
712 708
713 if (!NULL (pred)) 709 if (!NILP (pred))
714 { 710 {
715 if (EQ (pred, Qcommandp)) 711 if (EQ (pred, Qcommandp))
716 tem = Fcommandp (elt); 712 tem = Fcommandp (elt);
@@ -720,7 +716,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
720 tem = call1 (pred, elt); 716 tem = call1 (pred, elt);
721 UNGCPRO; 717 UNGCPRO;
722 } 718 }
723 if (NULL (tem)) continue; 719 if (NILP (tem)) continue;
724 } 720 }
725 /* Ok => put it on the list. */ 721 /* Ok => put it on the list. */
726 allmatches = Fcons (eltstring, allmatches); 722 allmatches = Fcons (eltstring, allmatches);
@@ -760,7 +756,7 @@ other component that is likely to be deleted.")
760 specbind (Qminibuffer_completion_confirm, 756 specbind (Qminibuffer_completion_confirm,
761 EQ (require_match, Qt) ? Qnil : Qt); 757 EQ (require_match, Qt) ? Qnil : Qt);
762 last_exact_completion = Qnil; 758 last_exact_completion = Qnil;
763 val = read_minibuf (NULL (require_match) 759 val = read_minibuf (NILP (require_match)
764 ? Vminibuffer_local_completion_map 760 ? Vminibuffer_local_completion_map
765 : Vminibuffer_local_must_match_map, 761 : Vminibuffer_local_must_match_map,
766 init, prompt, backup_n, 0); 762 init, prompt, backup_n, 0);
@@ -794,7 +790,7 @@ temp_echo_area_glyphs (m)
794 Vinhibit_quit = Qt; 790 Vinhibit_quit = Qt;
795 Fsit_for (make_number (2), Qnil, Qnil); 791 Fsit_for (make_number (2), Qnil, Qnil);
796 del_range (point, ZV); 792 del_range (point, ZV);
797 if (!NULL (Vquit_flag)) 793 if (!NILP (Vquit_flag))
798 { 794 {
799 Vquit_flag = Qnil; 795 Vquit_flag = Qnil;
800 unread_command_char = Ctl ('g'); 796 unread_command_char = Ctl ('g');
@@ -825,7 +821,7 @@ do_completion ()
825 last = last_exact_completion; 821 last = last_exact_completion;
826 last_exact_completion = Qnil; 822 last_exact_completion = Qnil;
827 823
828 if (NULL (completion)) 824 if (NILP (completion))
829 { 825 {
830 bitch_at_user (); 826 bitch_at_user ();
831 temp_echo_area_glyphs (" [No match]"); 827 temp_echo_area_glyphs (" [No match]");
@@ -837,7 +833,7 @@ do_completion ()
837 833
838 /* compiler bug */ 834 /* compiler bug */
839 tem = Fstring_equal (completion, Fbuffer_string()); 835 tem = Fstring_equal (completion, Fbuffer_string());
840 if (completedp = NULL (tem)) 836 if (completedp = NILP (tem))
841 { 837 {
842 Ferase_buffer (); /* Some completion happened */ 838 Ferase_buffer (); /* Some completion happened */
843 Finsert (1, &completion); 839 Finsert (1, &completion);
@@ -845,7 +841,7 @@ do_completion ()
845 841
846 /* It did find a match. Do we match some possibility exactly now? */ 842 /* It did find a match. Do we match some possibility exactly now? */
847 if (CONSP (Vminibuffer_completion_table) 843 if (CONSP (Vminibuffer_completion_table)
848 || NULL (Vminibuffer_completion_table)) 844 || NILP (Vminibuffer_completion_table))
849 tem = assoc_for_completion (Fbuffer_string (), 845 tem = assoc_for_completion (Fbuffer_string (),
850 Vminibuffer_completion_table); 846 Vminibuffer_completion_table);
851 else if (XTYPE (Vminibuffer_completion_table) == Lisp_Vector) 847 else if (XTYPE (Vminibuffer_completion_table) == Lisp_Vector)
@@ -859,7 +855,7 @@ do_completion ()
859 XSTRING (tem)->data, XSTRING (tem)->size); 855 XSTRING (tem)->data, XSTRING (tem)->size);
860 if (XTYPE (tem) != Lisp_Symbol) 856 if (XTYPE (tem) != Lisp_Symbol)
861 tem = Qnil; 857 tem = Qnil;
862 else if (!NULL (Vminibuffer_completion_predicate)) 858 else if (!NILP (Vminibuffer_completion_predicate))
863 tem = call1 (Vminibuffer_completion_predicate, tem); 859 tem = call1 (Vminibuffer_completion_predicate, tem);
864 else 860 else
865 tem = Qt; 861 tem = Qt;
@@ -870,7 +866,7 @@ do_completion ()
870 Vminibuffer_completion_predicate, 866 Vminibuffer_completion_predicate,
871 Qlambda); 867 Qlambda);
872 868
873 if (NULL (tem)) 869 if (NILP (tem))
874 { /* not an exact match */ 870 { /* not an exact match */
875 if (completedp) 871 if (completedp)
876 return 5; 872 return 5;
@@ -886,10 +882,10 @@ do_completion ()
886 it means we've already given a "Complete but not unique" 882 it means we've already given a "Complete but not unique"
887 message and the user's hit TAB again, so now we give him help. */ 883 message and the user's hit TAB again, so now we give him help. */
888 last_exact_completion = completion; 884 last_exact_completion = completion;
889 if (!NULL (last)) 885 if (!NILP (last))
890 { 886 {
891 tem = Fbuffer_string (); 887 tem = Fbuffer_string ();
892 if (!NULL (Fequal (tem, last))) 888 if (!NILP (Fequal (tem, last)))
893 Fminibuffer_completion_help (); 889 Fminibuffer_completion_help ();
894 } 890 }
895 return 3; 891 return 3;
@@ -907,7 +903,7 @@ assoc_for_completion (key, list)
907 if (completion_ignore_case) 903 if (completion_ignore_case)
908 key = Fupcase (key); 904 key = Fupcase (key);
909 905
910 for (tail = list; !NULL (tail); tail = Fcdr (tail)) 906 for (tail = list; !NILP (tail); tail = Fcdr (tail))
911 { 907 {
912 register Lisp_Object elt, tem, thiscar; 908 register Lisp_Object elt, tem, thiscar;
913 elt = Fcar (tail); 909 elt = Fcar (tail);
@@ -918,7 +914,7 @@ assoc_for_completion (key, list)
918 if (completion_ignore_case) 914 if (completion_ignore_case)
919 thiscar = Fupcase (thiscar); 915 thiscar = Fupcase (thiscar);
920 tem = Fequal (thiscar, key); 916 tem = Fequal (thiscar, key);
921 if (!NULL (tem)) return elt; 917 if (!NILP (tem)) return elt;
922 QUIT; 918 QUIT;
923 } 919 }
924 return Qnil; 920 return Qnil;
@@ -968,7 +964,7 @@ a repetition of this command will exit.")
968 goto exit; 964 goto exit;
969 965
970 case 4: 966 case 4:
971 if (!NULL (Vminibuffer_completion_confirm)) 967 if (!NILP (Vminibuffer_completion_confirm))
972 { 968 {
973 temp_echo_area_glyphs (" [Confirm]"); 969 temp_echo_area_glyphs (" [Confirm]");
974 return Qnil; 970 return Qnil;
@@ -1001,7 +997,7 @@ is added, provided that matches some possible completion.")
1001 completion = Ftry_completion (Fbuffer_string (), 997 completion = Ftry_completion (Fbuffer_string (),
1002 Vminibuffer_completion_table, 998 Vminibuffer_completion_table,
1003 Vminibuffer_completion_predicate); 999 Vminibuffer_completion_predicate);
1004 if (NULL (completion)) 1000 if (NILP (completion))
1005 { 1001 {
1006 bitch_at_user (); 1002 bitch_at_user ();
1007 temp_echo_area_glyphs (" [No match]"); 1003 temp_echo_area_glyphs (" [No match]");
@@ -1113,12 +1109,12 @@ or may be a list of two strings to be printed as if concatenated.")
1113 1109
1114 set_buffer_internal (XBUFFER (Vstandard_output)); 1110 set_buffer_internal (XBUFFER (Vstandard_output));
1115 1111
1116 if (NULL (completions)) 1112 if (NILP (completions))
1117 insert_string ("There are no possible completions of what you have typed."); 1113 insert_string ("There are no possible completions of what you have typed.");
1118 else 1114 else
1119 { 1115 {
1120 insert_string ("Possible completions are:"); 1116 insert_string ("Possible completions are:");
1121 for (tail = completions, i = 0; !NULL (tail); tail = Fcdr (tail), i++) 1117 for (tail = completions, i = 0; !NILP (tail); tail = Fcdr (tail), i++)
1122 { 1118 {
1123 /* this needs fixing for the case of long completions 1119 /* this needs fixing for the case of long completions
1124 and/or narrow windows */ 1120 and/or narrow windows */
@@ -1155,7 +1151,7 @@ DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_co
1155 Vminibuffer_completion_predicate); 1151 Vminibuffer_completion_predicate);
1156 echo_area_glyphs = 0; 1152 echo_area_glyphs = 0;
1157 1153
1158 if (NULL (completions)) 1154 if (NILP (completions))
1159 { 1155 {
1160 bitch_at_user (); 1156 bitch_at_user ();
1161 temp_echo_area_glyphs (" [No completions]"); 1157 temp_echo_area_glyphs (" [No completions]");
diff --git a/src/window.h b/src/window.h
index e8b07e9d414..eedaef3be16 100644
--- a/src/window.h
+++ b/src/window.h
@@ -205,6 +205,9 @@ extern Lisp_Object Fset_window_buffer ();
205/* Prompt to display in front of the minibuffer contents. */ 205/* Prompt to display in front of the minibuffer contents. */
206extern char *minibuf_prompt; 206extern char *minibuf_prompt;
207 207
208/* The visual width of the above. */
209extern int minibuf_prompt_width;
210
208/* Message to display instead of minibuffer contents. 211/* Message to display instead of minibuffer contents.
209 This is what the functions error and message make, 212 This is what the functions error and message make,
210 and command echoing uses it as well. It overrides the 213 and command echoing uses it as well. It overrides the