emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/minibuf.c


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/minibuf.c
Date: Tue, 03 Sep 2002 00:08:49 -0400

Index: emacs/src/minibuf.c
diff -c emacs/src/minibuf.c:1.248 emacs/src/minibuf.c:1.249
*** emacs/src/minibuf.c:1.248   Tue Jul 16 15:48:51 2002
--- emacs/src/minibuf.c Tue Aug 13 18:52:05 2002
***************
*** 318,323 ****
--- 318,334 ----
    return val;
  }
  
+ DEFUN ("minibufferp", Fminibufferp,
+        Sminibufferp, 0, 0, 0,
+        doc: /* Return t if the current buffer is a minibuffer.  */)
+      ()
+ {
+   Lisp_Object tem;
+ 
+   tem = Fmemq (Fcurrent_buffer (), Vminibuffer_list);
+   return ! NILP (tem) ? Qt : Qnil;
+ }
+ 
  DEFUN ("minibuffer-prompt-end", Fminibuffer_prompt_end,
         Sminibuffer_prompt_end, 0, 0, 0,
         doc: /* Return the buffer position of the end of the minibuffer prompt.
***************
*** 325,332 ****
       ()
  {
    /* This function is written to be most efficient when there's a prompt.  */
!   Lisp_Object beg = make_number (BEGV);
!   Lisp_Object end = Ffield_end (beg, Qnil, Qnil);
  
    if (XINT (end) == ZV && NILP (Fget_char_property (beg, Qfield, Qnil)))
      return beg;
--- 336,349 ----
       ()
  {
    /* This function is written to be most efficient when there's a prompt.  */
!   Lisp_Object beg, end, tem;
!   beg = make_number (BEGV);
! 
!   tem = Fmemq (Fcurrent_buffer (), Vminibuffer_list);
!   if (NILP (tem))
!     return beg;
! 
!   end = Ffield_end (beg, Qnil, Qnil);
  
    if (XINT (end) == ZV && NILP (Fget_char_property (beg, Qfield, Qnil)))
      return beg;
***************
*** 2581,2586 ****
--- 2598,2604 ----
    defsubr (&Sminibuffer_depth);
    defsubr (&Sminibuffer_prompt);
  
+   defsubr (&Sminibufferp);
    defsubr (&Sminibuffer_prompt_end);
    defsubr (&Sminibuffer_contents);
    defsubr (&Sminibuffer_contents_no_properties);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]