Mercurial > emacs
comparison src/minibuf.c @ 47620:d9332e0c9cb3
(Fminibufferp): Add an optional `buffer' argument.
author | John Paul Wallington <jpw@pobox.com> |
---|---|
date | Thu, 26 Sep 2002 09:59:44 +0000 |
parents | 2ff0df63c873 |
children | 62ad43be82d7 |
comparison
equal
deleted
inserted
replaced
47619:a65ea08814e2 | 47620:d9332e0c9cb3 |
---|---|
317 | 317 |
318 return val; | 318 return val; |
319 } | 319 } |
320 | 320 |
321 DEFUN ("minibufferp", Fminibufferp, | 321 DEFUN ("minibufferp", Fminibufferp, |
322 Sminibufferp, 0, 0, 0, | 322 Sminibufferp, 0, 1, 0, |
323 doc: /* Return t if the current buffer is a minibuffer. */) | 323 doc: /* Return t if BUFFER is a minibuffer. |
324 () | 324 No argument or nil as argument means use current buffer as BUFFER.*/) |
325 (buffer) | |
326 Lisp_Object buffer; | |
325 { | 327 { |
326 Lisp_Object tem; | 328 Lisp_Object tem; |
327 | 329 |
328 tem = Fmemq (Fcurrent_buffer (), Vminibuffer_list); | 330 if (NILP (buffer)) |
331 buffer = Fcurrent_buffer (); | |
332 else if (STRINGP (buffer)) | |
333 buffer = Fget_buffer (buffer); | |
334 else | |
335 CHECK_BUFFER (buffer); | |
336 | |
337 tem = Fmemq (buffer, Vminibuffer_list); | |
329 return ! NILP (tem) ? Qt : Qnil; | 338 return ! NILP (tem) ? Qt : Qnil; |
330 } | 339 } |
331 | 340 |
332 DEFUN ("minibuffer-prompt-end", Fminibuffer_prompt_end, | 341 DEFUN ("minibuffer-prompt-end", Fminibuffer_prompt_end, |
333 Sminibuffer_prompt_end, 0, 0, 0, | 342 Sminibuffer_prompt_end, 0, 0, 0, |