/[emacs]/emacs/src/minibuf.c
ViewVC logotype

Diff of /emacs/src/minibuf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.240.2.5 by uid65618, Mon Feb 9 14:14:05 2004 UTC revision 1.240.2.6 by miles, Tue Jul 6 09:31:30 2004 UTC
# Line 1  Line 1 
1  /* Minibuffer input and completion.  /* Minibuffer input and completion.
2     Copyright (C) 1985,86,93,94,95,96,97,98,99,2000,01,03     Copyright (C) 1985,86,93,94,95,96,97,98,99,2000,01,03,04
3               Free Software Foundation, Inc.               Free Software Foundation, Inc.
4    
5  This file is part of GNU Emacs.  This file is part of GNU Emacs.
# Line 209  without invoking the usual minibuffer co Line 209  without invoking the usual minibuffer co
209  /* Actual minibuffer invocation. */  /* Actual minibuffer invocation. */
210    
211  static Lisp_Object read_minibuf_unwind P_ ((Lisp_Object));  static Lisp_Object read_minibuf_unwind P_ ((Lisp_Object));
212    static Lisp_Object run_exit_minibuf_hook P_ ((Lisp_Object));
213  static Lisp_Object read_minibuf P_ ((Lisp_Object, Lisp_Object,  static Lisp_Object read_minibuf P_ ((Lisp_Object, Lisp_Object,
214                                       Lisp_Object, Lisp_Object,                                       Lisp_Object, Lisp_Object,
215                                       int, Lisp_Object,                                       int, Lisp_Object,
# Line 563  read_minibuf (map, initial, prompt, back Line 564  read_minibuf (map, initial, prompt, back
564    
565    record_unwind_protect (read_minibuf_unwind, Qnil);    record_unwind_protect (read_minibuf_unwind, Qnil);
566    minibuf_level++;    minibuf_level++;
567      /* We are exiting the minibuffer one way or the other, so run the hook.
568         It should be run before unwinding the minibuf settings.  Do it
569         separately from read_minibuf_unwind because we need to make sure that
570         read_minibuf_unwind is fully executed even if exit-minibuffer-hook
571         signals an error.  --Stef  */
572      record_unwind_protect (run_exit_minibuf_hook, Qnil);
573    
574    /* Now that we can restore all those variables, start changing them.  */    /* Now that we can restore all those variables, start changing them.  */
575    
# Line 822  get_minibuffer (depth) Line 829  get_minibuffer (depth)
829    return buf;    return buf;
830  }  }
831    
832    static Lisp_Object
833    run_exit_minibuf_hook (data)
834         Lisp_Object data;
835    {
836      if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound)
837          && !NILP (Vrun_hooks))
838        safe_run_hooks (Qminibuffer_exit_hook);
839    
840      return Qnil;
841    }
842    
843  /* This function is called on exiting minibuffer, whether normally or  /* This function is called on exiting minibuffer, whether normally or
844     not, and it restores the current window, buffer, etc. */     not, and it restores the current window, buffer, etc. */
845    
# Line 832  read_minibuf_unwind (data) Line 850  read_minibuf_unwind (data)
850    Lisp_Object old_deactivate_mark;    Lisp_Object old_deactivate_mark;
851    Lisp_Object window;    Lisp_Object window;
852    
   /* We are exiting the minibuffer one way or the other,  
      so run the hook.  */  
   if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound)  
       && !NILP (Vrun_hooks))  
     safe_run_hooks (Qminibuffer_exit_hook);  
   
853    /* If this was a recursive minibuffer,    /* If this was a recursive minibuffer,
854       tie the minibuffer window back to the outer level minibuffer buffer.  */       tie the minibuffer window back to the outer level minibuffer buffer.  */
855    minibuf_level--;    minibuf_level--;

Legend:
Removed from v.1.240.2.5  
changed lines
  Added in v.1.240.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26