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

Lines Matching +defs:mode +defs:function

29 ;; major mode or to file-handling.
35 (autoload 'shell-mode "shell"))
93 (set-buffer-major-mode (get-buffer-create "*scratch*"))
174 similar mode is started, or when it is used with \\[next-error]
177 (defvar next-error-function nil
179 The function is called with 2 parameters:
187 (make-variable-buffer-local 'next-error-function)
198 The function EXTRA-TEST-INCLUSIVE, if non-nil, is called in each buffer
202 The function EXTRA-TEST-EXCLUSIVE, if non-nil, is called in each buffer
208 (if next-error-function ; This is the normal test.
225 The function EXTRA-TEST-INCLUSIVE, if non-nil, is called in each buffer
229 The function EXTRA-TEST-EXCLUSIVE, if non-nil, is called in each buffer
289 more generally, on any buffer in Compilation mode or with
290 Compilation Minor mode enabled, or any buffer in which
291 `next-error-function' is bound to an appropriate function.
298 until you use it in some other buffer which uses Compilation mode
299 or Compilation Minor mode.
301 See variables `compilation-parse-errors-function' and
306 ;; we know here that next-error-function is a valid symbol we can funcall
308 (funcall next-error-function (prefix-numeric-value arg) reset)
314 ;; we know here that next-error-function is a valid symbol we can funcall
316 (funcall next-error-function 0 nil)
360 ;;; Internal variable for `next-error-follow-mode-post-command-hook'.
363 (define-minor-mode next-error-follow-minor-mode
364 "Minor mode for compilation, occur and diff modes.
369 (if (not next-error-follow-minor-mode)
370 (remove-hook 'post-command-hook 'next-error-follow-mode-post-command-hook t)
371 (add-hook 'post-command-hook 'next-error-follow-mode-post-command-hook nil t)
374 ;;; Used as a `post-command-hook' by `next-error-follow-mode'
376 (defun next-error-follow-mode-post-command-hook ()
389 (defun fundamental-mode ()
390 "Major mode not specialized for anything in particular.
394 (unless delay-mode-hooks
395 (run-hooks 'after-change-major-mode-hook)))
406 Call `auto-fill-function' if the current column number is greater
449 (auto-fill-function (if (or arg flag) nil auto-fill-function)))
496 (abbrev-mode nil))
598 A formfeed is not considered whitespace by this function."
612 "Insert a newline, then indent according to major mode.
613 Indentation is done using the value of `indent-line-function'.
616 column specified by the function `current-left-margin'."
620 (indent-according-to-mode))
624 Indentation of both lines is done according to the current major mode,
625 which means calling the current value of `indent-line-function'.
628 column specified by the function `current-left-margin'."
636 (indent-according-to-mode)
638 (indent-according-to-mode)))
651 In overwrite mode, this function inserts the character anyway, and
653 overwrite as your normal editing mode, you can use this function to
656 In binary overwrite mode, this function does overwrite, and octal
660 (let* ((char (let (translation-table-for-input input-method-function)
661 (if (or (not overwrite-mode)
662 (eq overwrite-mode 'overwrite-mode-binary))
673 (if (eq overwrite-mode 'overwrite-mode-binary)
755 (and transient-mark-mode mark-active)
780 (and transient-mark-mode mark-active)
802 You probably should not use this function in Lisp programs;
803 it is usually a mistake for a Lisp function to use any subroutine
1401 In Transient Mark mode when the mark is active, only undo changes within
1402 the current region. Similarly, when not in Transient Mark mode, just \\[universal-argument]
1430 (if transient-mark-mode mark-active (and arg (not (numberp arg)))))
1452 (if (or transient-mark-mode (numberp arg))
1711 ;; undo-outer-limit, this function gets called to warn the user that
1715 (setq undo-outer-limit-function 'undo-outer-limit-truncate)
1723 ;; again momentarily. It will call this function again,
1775 That buffer is in shell mode.
1896 (setq mode-line-process '(":%s"))
1897 (require 'shell) (shell-mode)
2114 (setq mode-line-process
2245 argument mode\".")
2342 Each function must accept a single argument, a string, and return
2343 a string. The buffer substring is passed to the first function
2344 in the list, and the return value of each function is passed to
2345 the next. The return value of the last function is used as the
2354 last filter function is returned. If `buffer-substring-filters'
2368 This function should be used instead of `buffer-substring',
2393 (defvar interprogram-cut-function nil
2398 This variable holds a function that Emacs calls whenever text
2402 The function takes one or two arguments.
2408 (defvar interprogram-paste-function nil
2413 This variable holds a function that Emacs calls to obtain
2416 The function should be called with no arguments. If the function
2418 of the Emacs kill ring should be used. If the function returns a
2419 string, then the caller of the function \(usually `current-kill')
2422 Note that the function should return a string only if a program other
2424 most recent string, the function should return nil. If it is
2438 interact nicely with `interprogram-cut-function' and
2439 `interprogram-paste-function'. The functions `kill-new',
2455 If `interprogram-cut-function' is non-nil, apply it to STRING.
2483 (if interprogram-cut-function
2484 (funcall interprogram-cut-function string (not replace))))
2492 yank-handler property of the latest kill string, this function
2495 If `interprogram-cut-function' is set, pass the resulting kill to it."
2504 If N is zero, `interprogram-paste-function' is set, and calling it
2510 interprogram-paste-function
2511 (funcall interprogram-paste-function))))
2514 ;; Disable the interprogram cut function when we add the new
2517 (let ((interprogram-cut-function nil))
2558 Any command that calls this function is a \"kill command\".
2603 In Transient Mark mode, deactivate the mark.
2604 If `interprogram-cut-function' is non-nil, also save the text for a window
2610 (if transient-mark-mode
2616 In Transient Mark mode, deactivate the mark.
2617 If `interprogram-cut-function' is non-nil, also save the text for a window
2636 (unless (and transient-mark-mode
2684 (defvar yank-undo-function nil
2685 "If non-nil, function used by `yank-pop' to delete last stretch of yanked text.
2715 (funcall (or yank-undo-function 'delete-region) (point) (mark t))
2716 (funcall (or yank-undo-function 'delete-region) (mark t) (point)))
2717 (setq yank-undo-function nil)
3034 This function is meant for the user to run interactively.
3119 In Transient Mark mode, this function signals an error if
3126 (if (or force (not transient-mark-mode) mark-active mark-even-if-inactive)
3134 \(That makes a difference only in Transient Mark mode.)
3137 ((eq transient-mark-mode 'lambda)
3138 (setq transient-mark-mode nil))
3139 (transient-mark-mode
3144 "Set this buffer's mark to POS. Don't use this function!
3145 That is to say, don't use this function unless you want
3165 ;; Normally we never clear mark-active except in Transient Mark mode.
3167 ;; we must clear mark-active in any mode.
3237 Immediately repeating this command activates `transient-mark-mode' temporarily.
3256 (if (eq transient-mark-mode 'lambda)
3257 (setq transient-mark-mode nil))
3278 mark-active (null transient-mark-mode))
3279 (setq transient-mark-mode 'lambda)
3280 (message "Transient-mark-mode temporarily enabled"))
3293 In Transient Mark mode, activate mark if optional third arg ACTIVATE non-nil."
3312 (if (or activate (not transient-mark-mode))
3332 With prefix arg, `transient-mark-mode' is enabled temporarily."
3336 (if (null transient-mark-mode)
3337 (setq transient-mark-mode 'lambda))
3347 (define-minor-mode transient-mark-mode
3348 "Toggle Transient Mark mode.
3349 With arg, turn Transient Mark mode on if arg is positive, off otherwise.
3351 In Transient Mark mode, when the mark is active, the region is highlighted.
3360 Many commands change their behavior when Transient Mark mode is in effect
3367 commands which are sensitive to the Transient Mark mode."
3433 (let ((abbrev-mode nil))
3492 Outline mode sets this."
3685 ;; This is the value the function returns.
3790 This function works only in certain cases,
4007 ;; putting us back to where we want to be, since forward-sexp-function
4036 (transpose-subr (function
4104 or (in Transient Mark mode) if the mark is active,
4109 (and transient-mark-mode mark-active)))
4142 The function, belying its name, normally finds a symbol.
4190 (defvar comment-line-break-function 'comment-indent-new-line
4191 "*Mode-specific function which line breaks and continues a comment.
4193 This function is only called during auto-filling of a comment section.
4194 The function should take a single optional argument, which is a flag
4197 ;; This function is used as the auto-fill-function of a buffer
4198 ;; when Auto-Fill mode is enabled.
4200 ;; (Actually some major modes use a different auto-fill function,
4217 (when (and adaptive-fill-mode
4225 (not (and fill-indent-according-to-mode
4270 (funcall comment-line-break-function t)
4273 (funcall comment-line-break-function t)))
4288 (defvar normal-auto-fill-function 'do-auto-fill
4289 "The function to use for `auto-fill-function' if Auto Fill mode is turned on.
4292 (put 'auto-fill-function :minor-mode-function 'auto-fill-mode)
4293 ;; FIXME: turn into a proper minor mode.
4294 ;; Add a global minor mode version of it.
4295 (defun auto-fill-mode (&optional arg)
4296 "Toggle Auto Fill mode.
4297 With arg, turn Auto Fill mode on if and only if arg is positive.
4298 In Auto Fill mode, inserting a space at a column beyond `current-fill-column'
4301 The value of `normal-auto-fill-function' specifies the function to use
4302 for `auto-fill-function' when turning Auto Fill mode on."
4304 (prog1 (setq auto-fill-function
4306 (not auto-fill-function)
4308 normal-auto-fill-function
4310 (force-mode-line-update)))
4312 ;; This holds a document string used to document auto-fill-mode.
4313 (defun auto-fill-function ()
4318 "Unconditionally turn on Auto Fill mode."
4319 (auto-fill-mode 1))
4322 "Unconditionally turn off Auto Fill mode."
4323 (auto-fill-mode -1))
4325 (custom-add-option 'text-mode-hook 'turn-on-auto-fill)
4374 (force-mode-line-update)
4384 (defvar overwrite-mode-textual " Ovwrt"
4385 "The string displayed in the mode line when in overwrite mode.")
4386 (defvar overwrite-mode-binary " Bin Ovwrt"
4387 "The string displayed in the mode line when in binary overwrite mode.")
4389 (defun overwrite-mode (arg)
4390 "Toggle overwrite mode.
4391 With arg, turn overwrite mode on iff arg is positive.
4392 In overwrite mode, printing characters typed in replace existing text
4396 \\[quoted-insert] still inserts characters in overwrite mode; this
4399 (setq overwrite-mode
4400 (if (if (null arg) (not overwrite-mode)
4402 'overwrite-mode-textual))
4403 (force-mode-line-update))
4405 (defun binary-overwrite-mode (arg)
4406 "Toggle binary overwrite mode.
4407 With arg, turn binary overwrite mode on iff arg is positive.
4408 In binary overwrite mode, printing characters typed in replace
4416 Note that binary overwrite mode is not its own minor mode; it is a
4417 specialization of overwrite mode, entered by setting the
4418 `overwrite-mode' variable to `overwrite-mode-binary'."
4420 (setq overwrite-mode
4422 (not (eq overwrite-mode 'overwrite-mode-binary))
4424 'overwrite-mode-binary))
4425 (force-mode-line-update))
4427 (define-minor-mode line-number-mode
4428 "Toggle Line Number mode.
4429 With arg, turn Line Number mode on iff arg is positive.
4430 When Line Number mode is enabled, the line number appears
4431 in the mode line.
4436 :init-value t :global t :group 'mode-line)
4438 (define-minor-mode column-number-mode
4439 "Toggle Column Number mode.
4440 With arg, turn Column Number mode on iff arg is positive.
4441 When Column Number mode is enabled, the column number appears
4442 in the mode line."
4443 :global t :group 'mode-line)
4445 (define-minor-mode size-indication-mode
4446 "Toggle Size Indication mode.
4447 With arg, turn Size Indication mode on iff arg is positive. When
4448 Size Indication mode is enabled, the size of the accessible part
4449 of the buffer appears in the mode line."
4450 :global t :group 'mode-line)
4470 It is also ignored if `show-paren-mode' is enabled."
4542 (not show-paren-mode)
4584 (setq blink-paren-function 'blink-matching-open)
4601 (defvar buffer-quit-function nil
4603 \\[keyboard-escape-quit] calls this function when its more local actions
4607 "Exit the current \"mode\" (in a generalized sense of the word).
4614 (cond ((eq last-command 'mode-exited) nil)
4619 ((and transient-mark-mode mark-active)
4623 (buffer-quit-function
4624 (funcall buffer-quit-function))
4649 :type '(choice (function-item rmail)
4650 (function-item gnus)
4651 (function-item mh-rmail)
4652 (function :tag "Other"))
4675 your package for details. The function should return non-nil if it
4679 :type '(radio (function-item :tag "Default Emacs mail"
4682 (function-item :tag "Emacs interface to MH"
4685 (function-item :tag "Gnus Message package"
4688 (function-item :tag "Gnus Message with full Gnus features"
4691 (function :tag "Other"))
4706 switch-function yank-action
4708 (if switch-function
4713 (funcall switch-function "*mail*")))
4735 switch-function yank-action send-actions)
4749 SWITCH-FUNCTION, if non-nil, is a function to use to
4763 (let ((function (get mail-user-agent 'composefunc)))
4764 (funcall function to subject other-headers continue
4765 switch-function yank-action send-actions)))
4855 (force-mode-line-update))
4858 ;; Define the major mode for lists of completions.
4860 (defvar completion-list-mode-map nil
4862 (or completion-list-mode-map
4871 (setq completion-list-mode-map map)))
4873 ;; Completion mode is suitable only for specially formatted data.
4874 (put 'completion-list-mode 'mode-class 'special)
4993 If a function in the list returns non-nil, that function is supposed
5051 (defun completion-list-mode ()
5052 "Major mode for buffers showing lists of possible completions.
5053 Type \\<completion-list-mode-map>\\[choose-completion] in the completion list\
5055 Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\
5059 (use-local-map completion-list-mode-map)
5060 (setq mode-name "Completion List")
5061 (setq major-mode 'completion-list-mode)
5064 (run-mode-hooks 'completion-list-mode-hook))
5066 (defun completion-list-mode-finish ()
5069 (when (eq major-mode 'completion-list-mode)
5072 (add-hook 'temp-buffer-show-hook 'completion-list-mode-finish)
5083 ;; Variables and faces used in `completion-setup-function'.
5108 "Regexp to use in `completion-setup-function' to find the root directory.")
5111 "Common prefix substring to use in `completion-setup-function' to put faces.
5119 ;; This function goes in completion-setup-hook, so that it is called
5121 (defun completion-setup-function ()
5133 (completion-list-mode)
5138 (get minibuffer-completion-table 'completion-base-size-function))
5139 ;; To compute base size, a function can use the global value of
5143 'completion-base-size-function))))
5189 (add-hook 'completion-setup-hook 'completion-setup-function)
5214 "\\<function-key-map>Add the Alt modifier to the following event.
5218 "\\<function-key-map>Add the Super modifier to the following event.
5222 "\\<function-key-map>Add the Hyper modifier to the following event.
5226 "\\<function-key-map>Add the Shift modifier to the following event.
5230 "\\<function-key-map>Add the Ctrl modifier to the following event.
5234 "\\<function-key-map>Add the Meta modifier to the following event.
5267 (define-key function-key-map [?\C-x ?@ ?h] 'event-apply-hyper-modifier)
5268 (define-key function-key-map [?\C-x ?@ ?s] 'event-apply-super-modifier)
5269 (define-key function-key-map [?\C-x ?@ ?m] 'event-apply-meta-modifier)
5270 (define-key function-key-map [?\C-x ?@ ?a] 'event-apply-alt-modifier)
5271 (define-key function-key-map [?\C-x ?@ ?S] 'event-apply-shift-modifier)
5272 (define-key function-key-map [?\C-x ?@ ?c] 'event-apply-control-modifier)
5278 ;;; bindings for the function key symbols, then those bindings will
5288 (define-key function-key-map (vector keypad) (vector normal))))
5342 ;; things to maybe add (currently partly covered by `funcall mode'):
5354 clone a file-visiting buffer, or a buffer whose major mode symbol
5368 (if (get major-mode 'no-clone)
5369 (error "Cannot clone a buffer in %s mode" mode-name))
5375 (if (get major-mode 'no-clone)
5376 (error "Cannot clone a buffer in %s mode" mode-name))
5386 (mode major-mode)
5403 ;; Now set up the major mode.
5404 (funcall mode)
5415 ;; Run any hooks (typically set up by the major mode
5443 (if (get major-mode 'no-clone-indirect)
5444 (error "Cannot indirectly clone a buffer in %s mode" mode-name))
5448 (if (get major-mode 'no-clone-indirect)
5449 (error "Cannot indirectly clone a buffer in %s mode" mode-name))
5464 (if (get major-mode 'no-clone-indirect)
5465 (error "Cannot indirectly clone a buffer in %s mode" mode-name))
5504 call `normal-erase-is-backspace-mode' (which see) instead."
5511 (if (fboundp 'normal-erase-is-backspace-mode)
5512 (normal-erase-is-backspace-mode (or value 0))
5516 (defun normal-erase-is-backspace-mode (&optional arg)
5517 "Toggle the Erase and Delete mode of the Backspace and Delete keys.
5519 With numeric arg, turn the mode on if and only if ARG is positive.
5521 On window systems, when this mode is on, Delete is mapped to C-d and
5522 Backspace is mapped to DEL; when this mode is off, both Delete and
5524 `function-key-map', so binding Delete or Backspace in the global or
5537 `keyboard-translate': if this mode is on, C-h is mapped to DEL and DEL
5540 When not running on a window system, and this mode is turned on, the
5542 probably not turn on this mode on a text-only terminal if you don't
5560 (old-state (lookup-key function-key-map [delete])))
5564 (define-key function-key-map [delete] [?\C-d])
5565 (define-key function-key-map [kp-delete] [?\C-d])
5566 (define-key function-key-map [backspace] [?\C-?]))
5567 (define-key function-key-map [delete] [?\C-?])
5568 (define-key function-key-map [kp-delete] [?\C-?])
5569 (define-key function-key-map [backspace] [?\C-?]))
5572 (unless (equal old-state (lookup-key function-key-map [delete]))
5597 (defvar vis-mode-saved-buffer-invisibility-spec nil
5598 "Saved value of `buffer-invisibility-spec' when Visible mode is on.")
5600 (define-minor-mode visible-mode
5601 "Toggle Visible mode.
5602 With argument ARG turn Visible mode on iff ARG is positive.
5604 Enabling Visible mode makes all invisible text temporarily visible.
5605 Disabling Visible mode turns off that effect. Visible mode
5609 (when (local-variable-p 'vis-mode-saved-buffer-invisibility-spec)
5610 (setq buffer-invisibility-spec vis-mode-saved-buffer-invisibility-spec)
5611 (kill-local-variable 'vis-mode-saved-buffer-invisibility-spec))
5612 (when visible-mode
5613 (set (make-local-variable 'vis-mode-saved-buffer-invisibility-spec)