/[emacs]/emacs/lisp/subr.el
ViewVC logotype

Diff of /emacs/lisp/subr.el

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

revision 1.307.2.23 by miles, Thu Sep 16 00:12:21 2004 UTC revision 1.307.2.24 by miles, Wed Oct 6 05:21:51 2004 UTC
# Line 1  Line 1 
1  ;;; subr.el --- basic lisp subroutines for Emacs  ;;; subr.el --- basic lisp subroutines for Emacs
2    
3  ;; Copyright (C) 1985, 86, 92, 94, 95, 99, 2000, 2001, 2002, 03, 2004  ;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1999, 2000, 2001, 2002, 2003,
4  ;;   Free Software Foundation, Inc.  ;;   2004  Free Software Foundation, Inc.
5    
6  ;; Maintainer: FSF  ;; Maintainer: FSF
7  ;; Keywords: internal  ;; Keywords: internal
# Line 689  in the current Emacs session, then this Line 689  in the current Emacs session, then this
689        (setq event (car event)))        (setq event (car event)))
690    (if (symbolp event)    (if (symbolp event)
691        (car (get event 'event-symbol-elements))        (car (get event 'event-symbol-elements))
692      (let ((base (logand event (1- (lsh 1 18)))))      (let ((base (logand event (1- ?\A-\^@))))
693        (downcase (if (< base 32) (logior base 64) base)))))        (downcase (if (< base 32) (logior base 64) base)))))
694    
695  (defsubst mouse-movement-p (object)  (defsubst mouse-movement-p (object)
# Line 1943  in BODY." Line 1943  in BODY."
1943  (make-variable-buffer-local 'delayed-mode-hooks)  (make-variable-buffer-local 'delayed-mode-hooks)
1944  (put 'delay-mode-hooks 'permanent-local t)  (put 'delay-mode-hooks 'permanent-local t)
1945    
1946    (defvar after-change-major-mode-hook nil
1947      "Normal hook run at the very end of major mode functions.")
1948    
1949  (defun run-mode-hooks (&rest hooks)  (defun run-mode-hooks (&rest hooks)
1950    "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.    "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
1951  Execution is delayed if `delay-mode-hooks' is non-nil.  Execution is delayed if `delay-mode-hooks' is non-nil.
1952    If `delay-mode-hooks' is nil, run `after-change-major-mode-hook'
1953    after running the mode hooks.
1954  Major mode functions should use this."  Major mode functions should use this."
1955    (if delay-mode-hooks    (if delay-mode-hooks
1956        ;; Delaying case.        ;; Delaying case.
# Line 1954  Major mode functions should use this." Line 1959  Major mode functions should use this."
1959      ;; Normal case, just run the hook as before plus any delayed hooks.      ;; Normal case, just run the hook as before plus any delayed hooks.
1960      (setq hooks (nconc (nreverse delayed-mode-hooks) hooks))      (setq hooks (nconc (nreverse delayed-mode-hooks) hooks))
1961      (setq delayed-mode-hooks nil)      (setq delayed-mode-hooks nil)
1962      (apply 'run-hooks hooks)))      (apply 'run-hooks hooks)
1963        (run-hooks 'after-change-major-mode-hook)))
1964    
1965  (defmacro delay-mode-hooks (&rest body)  (defmacro delay-mode-hooks (&rest body)
1966    "Execute BODY, but delay any `run-mode-hooks'.    "Execute BODY, but delay any `run-mode-hooks'.
1967    These hooks will be executed by the first following call to
1968    `run-mode-hooks' that occurs outside any `delayed-mode-hooks' form.
1969  Only affects hooks run in the current buffer."  Only affects hooks run in the current buffer."
1970    (declare (debug t))    (declare (debug t))
1971    `(progn    `(progn
# Line 2636  The properties used on SYMBOL are `compo Line 2644  The properties used on SYMBOL are `compo
2644    (put symbol 'abortfunc (or abortfunc 'kill-buffer))    (put symbol 'abortfunc (or abortfunc 'kill-buffer))
2645    (put symbol 'hookvar (or hookvar 'mail-send-hook)))    (put symbol 'hookvar (or hookvar 'mail-send-hook)))
2646    
2647  ;;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc  ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc
2648  ;;; subr.el ends here  ;;; subr.el ends here

Legend:
Removed from v.1.307.2.23  
changed lines
  Added in v.1.307.2.24

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