• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/

Lines Matching +defs:delay +defs:mode +defs:hooks

431 saving keyboard macros (see `edmacro-mode')."
562 which in most cases is shared with all other buffers in the same major mode."
965 'mode-line-inverse-video
978 (defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions)
979 (make-obsolete-variable 'x-lost-selection-hooks
981 (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions)
982 (make-obsolete-variable 'x-sent-selection-hooks
1029 well. This works for all normal hooks, but does not work for most
1030 non-normal hooks yet. We will be changing the callers of non-normal
1031 hooks so that they can handle localness; this has to be done one by
1087 list of hooks to run in HOOK, then nothing is done. See `add-hook'.
1131 other hooks, such as major mode hooks, can do the job."
1220 ;;;; Mode hooks.
1222 (defvar delay-mode-hooks nil
1223 "If non-nil, `run-mode-hooks' should delay running the hooks.")
1224 (defvar delayed-mode-hooks nil
1225 "List of delayed mode hooks waiting to be run.")
1226 (make-variable-buffer-local 'delayed-mode-hooks)
1227 (put 'delay-mode-hooks 'permanent-local t)
1229 (defvar after-change-major-mode-hook nil
1230 "Normal hook run at the very end of major mode functions.")
1232 (defun run-mode-hooks (&rest hooks)
1233 "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
1234 Execution is delayed if `delay-mode-hooks' is non-nil.
1235 If `delay-mode-hooks' is nil, run `after-change-major-mode-hook'
1236 after running the mode hooks.
1237 Major mode functions should use this."
1238 (if delay-mode-hooks
1240 (dolist (hook hooks)
1241 (push hook delayed-mode-hooks))
1242 ;; Normal case, just run the hook as before plus any delayed hooks.
1243 (setq hooks (nconc (nreverse delayed-mode-hooks) hooks))
1244 (setq delayed-mode-hooks nil)
1245 (apply 'run-hooks hooks)
1246 (run-hooks 'after-change-major-mode-hook)))
1248 (defmacro delay-mode-hooks (&rest body)
1249 "Execute BODY, but delay any `run-mode-hooks'.
1250 These hooks will be executed by the first following call to
1251 `run-mode-hooks' that occurs outside any `delayed-mode-hooks' form.
1252 Only affects hooks run in the current buffer."
1255 (make-local-variable 'delay-mode-hooks)
1256 (let ((delay-mode-hooks t))
1259 ;; PUBLIC: find if the current mode derives from another.
1261 (defun derived-mode-p (&rest modes)
1262 "Non-nil if the current major mode is derived from one of MODES.
1263 Uses the `derived-mode-parent' property of the symbol to trace backwards."
1264 (let ((parent major-mode))
1266 (setq parent (get parent 'derived-mode-parent))))
1272 ;; If a minor mode is not defined with define-minor-mode,
1274 ;; isearch-mode is deliberately excluded, since you should
1276 (defvar minor-mode-list '(auto-save-mode auto-fill-mode abbrev-mode
1277 overwrite-mode view-mode
1278 hs-minor-mode)
1279 "List of all minor mode functions.")
1281 (defun add-minor-mode (toggle name &optional keymap after toggle-fun)
1282 "Register a new minor mode.
1284 This is an XEmacs-compatibility function. Use `define-minor-mode' instead.
1287 is toggled on or off to say whether the minor mode is active or not.
1289 NAME specifies what will appear in the mode line when the minor mode
1293 Optional KEYMAP is the keymap for the minor mode that will be added
1294 to `minor-mode-map-alist'.
1297 in `minor-mode-alist'.
1299 Optional TOGGLE-FUN is an interactive function to toggle the mode.
1302 If TOGGLE has a non-nil `:included' property, an entry for the mode is
1303 included in the mode-line minor mode menu.
1305 (unless (memq toggle minor-mode-list)
1306 (push toggle minor-mode-list))
1310 (put toggle :minor-mode-function toggle-fun))
1311 ;; Add the name to the minor-mode-alist.
1313 (let ((existing (assq toggle minor-mode-alist)))
1316 (let ((tail minor-mode-alist) found)
1325 (setq minor-mode-alist (cons (list toggle name)
1326 minor-mode-alist)))))))
1329 (define-key mode-line-mode-menu
1335 (let ((mode-name (if (symbolp name) (symbol-value name))))
1336 (if (and (stringp mode-name) (string-match "[^ ]+" mode-name))
1337 (concat " (" (match-string 0 mode-name) ")"))))
1341 ;; Add the map to the minor-mode-map-alist.
1343 (let ((existing (assq toggle minor-mode-map-alist)))
1346 (let ((tail minor-mode-map-alist) found)
1355 (setq minor-mode-map-alist (cons (cons toggle keymap)
1356 minor-mode-map-alist))))))))
1919 (defalias 'redraw-modeline 'force-mode-line-update)
1921 (defun force-mode-line-update (&optional all)
1922 "Force redisplay of the current buffer's mode line and header line.
1923 With optional non-nil ALL, force redisplay of all mode lines and
2047 variable names in it, provided the major mode is still Help mode.")
2053 mode.")
2557 (mode (make-symbol "mode")))
2558 `(lambda (,string ,predicate ,mode)
2563 ((eq ,mode t) (all-completions ,string (,fun ,string) ,predicate))
2564 ((not ,mode) (try-completion ,string (,fun ,string) ,predicate))
2602 `(lambda (string predicate mode)
2604 ((eq mode t)
2607 ((eq mode nil)
2932 This is used on the `modification-hooks' property of text clones."
2964 (inhibit-modification-hooks t))
2970 ;;(overlay-put ol2 'modification-hooks nil)
2975 ;;(overlay-put ol2 'modification-hooks '(text-clone-maintain))
2992 ;; with insert-(behind|in-front-of)-hooks or use a slightly larger overlay
3009 (overlay-put ol1 'modification-hooks '(text-clone-maintain))
3016 (overlay-put ol2 'modification-hooks '(text-clone-maintain))