• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:local +defs:set +defs:key

335 (defun assoc-default (key alist &optional test default)
348 (when (funcall (or test 'equal) (if (consp elt) (car elt) elt) key)
354 (defun assoc-ignore-case (key alist)
358 (assoc-string key alist t))
361 (defun assoc-ignore-representation (key alist)
365 (assoc-string key alist nil))
378 (defun assq-delete-all (key alist)
383 (eq (car (car alist)) key))
388 (eq (car (car tail-cdr)) key))
429 "Convert KEYS to the internal Emacs key representation.
444 Normally, as an exception, digits and minus-sign are set to make prefix args,
446 (define-key map [remap self-insert-command] 'undefined)
449 (define-key map "-" 'negative-argument)
453 (define-key map (char-to-string loop) 'digit-argument)
456 (defun define-key-after (keymap key definition &optional after)
458 This is like `define-key' except that the binding for KEY is placed
472 (setq key
473 (if (<= (length key) 1) (aref key 0)
474 (setq keymap (lookup-key keymap
476 (butlast (mapcar 'identity key)))))
477 (aref key (1- (length key)))))
480 ;; Delete any earlier bindings for the same key.
481 (if (eq (car-safe (car (cdr tail))) key)
500 (setcdr tail (cons (cons key definition) (cdr tail))))
537 (defun global-set-key (key command)
541 KEY is a key sequence; noninteractively, it is a string or vector
545 Note that if KEY has a local binding in the current buffer,
546 that local binding will continue to shadow any global binding
548 (interactive "KSet key globally: \nCSet key %s to command: ")
549 (or (vectorp key) (stringp key)
550 (signal 'wrong-type-argument (list 'arrayp key)))
551 (define-key (current-global-map) key command))
553 (defun local-set-key (key command)
554 "Give KEY a local binding as COMMAND.
557 KEY is a key sequence; noninteractively, it is a string or vector
561 The binding goes in the current buffer's local map,
563 (interactive "KSet key locally: \nCSet key %s locally to command: ")
564 (let ((map (current-local-map)))
566 (use-local-map (setq map (make-sparse-keymap))))
567 (or (vectorp key) (stringp key)
568 (signal 'wrong-type-argument (list 'arrayp key)))
569 (define-key map key command)))
571 (defun global-unset-key (key)
574 (interactive "kUnset key globally: ")
575 (global-set-key key nil))
577 (defun local-unset-key (key)
578 "Remove local binding of KEY.
580 (interactive "kUnset key locally: ")
581 (if (current-local-map)
582 (local-set-key key nil))
586 ;;;; substitute-key-definition and its subroutines.
588 (defvar key-substitution-in-progress nil
589 "Used internally by `substitute-key-definition'.")
591 (defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix)
599 \(define-key KEYMAP [remap OLDDEF] NEWDEF)
605 ;; If optional argument PREFIX is specified, it should be a key
607 ;; original key, with PREFIX added at the front.
611 (key-substitution-in-progress
612 (cons scan key-substitution-in-progress)))
614 ;; has any definition, and act on it with hack-key.
618 (substitute-key-definition-key defn olddef newdef prefix1 keymap))
621 (defun substitute-key-definition-key (defn olddef newdef prefix keymap)
629 ;; Skip past cached key-equivalence data for menu items.
633 ;; Compare with equal if definition is a key sequence.
634 ;; That is useful for operating on function-key-map.
637 (define-key keymap prefix
652 (let ((elt (lookup-key keymap prefix)))
655 (not (memq inner-def key-substitution-in-progress)))
657 (substitute-key-definition olddef newdef keymap inner-def prefix)))))
663 ;;; global-map, esc-map, and ctl-x-map have their values set up in
682 (define-key ctl-x-map "4" 'ctl-x-4-prefix)
687 (define-key ctl-x-map "5" 'ctl-x-5-prefix)
696 (defconst listify-key-sequence-1 (logior 128 (read "?\\M-\\^@")))
698 (defun listify-key-sequence (key)
699 "Convert a key sequence to a list of events."
700 (if (vectorp key)
701 (append key nil)
704 (logxor c listify-key-sequence-1)
706 key)))
778 If EVENT is a mouse or key press or a mouse click, this returns the location
790 EVENT should be a click, drag, or key press event.
831 (defun posn-set-point (position)
928 (define-obsolete-function-alias 'set-window-dot 'set-window-point "22.1")
930 (define-obsolete-function-alias 'show-buffer 'set-window-buffer "22.1")
994 (defalias 'move-marker 'set-marker)
1003 (defalias 'store-match-data 'set-match-data)
1004 (defalias 'make-variable-frame-localizable 'make-variable-frame-local)
1015 (defun make-local-hook (hook)
1016 "Make the hook HOOK local to the current buffer.
1022 When a hook is local, its local and global values
1024 functions listed in *either* the local value *or* the global value
1027 This function works by making t a member of the buffer-local value,
1034 This function does nothing if HOOK is already local in the current
1037 Do not use `make-local-variable' to make a hook variable buffer-local."
1038 (if (local-variable-p hook)
1040 (or (boundp hook) (set hook nil))
1041 (make-local-variable hook)
1042 (set hook (list t)))
1044 (make-obsolete 'make-local-hook "not necessary any more." "21.1")
1046 (defun add-hook (hook function &optional append local)
1054 the hook's buffer-local value rather than its default value.
1055 This makes the hook buffer-local if needed, and it makes t a member
1056 of the buffer-local value. That acts as a flag to run the hook
1057 functions in the default value as well as in the local value.
1060 HOOK is void, it is first set to nil. If HOOK's value is a single
1062 (or (boundp hook) (set hook nil))
1063 (or (default-boundp hook) (set-default hook nil))
1064 (if local (unless (local-variable-if-set-p hook)
1065 (set (make-local-variable hook) (list t)))
1066 ;; Detect the case where make-local-variable was used on a hook
1069 (setq local t)))
1070 (let ((hook-value (if local (symbol-value hook) (default-value hook))))
1081 (if local (set hook hook-value) (set-default hook hook-value))))
1083 (defun remove-hook (hook function &optional local)
1090 the hook's buffer-local value rather than its default value."
1091 (or (boundp hook) (set hook nil))
1092 (or (default-boundp hook) (set-default hook nil))
1093 ;; Do nothing if LOCAL is t but this hook has no local binding.
1094 (unless (and local (not (local-variable-p hook)))
1095 ;; Detect the case where make-local-variable was used on a hook
1097 (when (and (local-variable-p hook)
1100 (setq local t))
1101 (let ((hook-value (if local (symbol-value hook) (default-value hook))))
1107 ;;(when (and local (member function (default-value hook))
1111 (if (not local)
1112 (set-default hook hook-value)
1114 (kill-local-variable hook)
1115 (set hook hook-value))))))
1146 (set list-var
1161 float), set the element's list order to the given value. If
1173 (setq ordering (make-hash-table :weakness 'key :test 'eq))))
1177 (set list-var (cons element (symbol-value list-var))))
1178 (set list-var (sort (symbol-value list-var)
1191 property on symbol HISTORY-VAR, if set, or the value of the `history-length'
1216 (set history-var history)))
1226 (make-variable-buffer-local 'delayed-mode-hooks)
1227 (put 'delay-mode-hooks 'permanent-local t)
1255 (make-local-variable 'delay-mode-hooks)
1286 TOGGLE is a symbol which is the name of a buffer-local variable that
1329 (define-key mode-line-mode-menu
1583 "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'."
1590 (set-process-query-on-exit-flag process nil)
1603 (set-process-plist process
1644 ;; Translate TAB key into control-I ASCII character, and so on.
1646 ;; We could try and use read-key-sequence instead, but then C-q ESC
1648 ;; bound to some prefix in function-key-map or key-translation-map.
1650 (let ((translation (lookup-key function-key-map (vector char))))
1658 ;; Turn a meta-character into a character with the 0200 bit set.
1687 then it returns nil if the user types C-g, but quit-flag remains set.
1691 (with-local-quit
1805 ;; this-command-keys by read-key-sequence.
1806 (if (eq overriding-terminal-local-map universal-argument-map)
1926 (if all (save-excursion (set-buffer (other-buffer))))
1927 (set-buffer-modified-p (buffer-modified-p)))
1967 (single-key-description exit-char))
1989 (set-buffer-modified-p modified))))
2045 was displayed in is selected. This hook is normally set up with a
2052 This hook is normally set up with a function to put the buffer in Help
2060 On those systems, it is automatically local in every buffer.
2107 :volume VOL - set volume to VOL. VOL must an integer in the
2187 (set-text-properties (point) run-end2 (symbol-plist cat))
2192 (set-text-properties start end nil)
2230 FUNCTION may set `yank-undo-function' to override the UNDO value."
2273 (if (eq yank-undo-function t) ;; not set by FUNCTION
2286 (set-text-properties opoint (point) nil))))
2371 (set-buffer ,buffer)
2405 (set-frame-selected-window (car elt) (cadr elt))))
2476 (defmacro with-local-quit (&rest body)
2478 When a quit terminates BODY, `with-local-quit' returns nil but
2500 `(with-local-quit
2533 (progn (set-case-table ,table)
2536 (set-case-table ,old-case-table))))))
2589 You should give VAR a non-nil `risky-local-variable' property."
2619 ;; We use save-match-data-internal as the local variable because
2636 '(set-match-data save-match-data-internal 'evaporate))))
2888 "Evaluate BODY with syntax table of current buffer set to TABLE.
2899 (set-syntax-table ,table)
2902 (set-buffer ,old-buffer)
2903 (set-syntax-table ,old-table))))))
2910 (set-char-table-parent table (or oldtable (standard-syntax-table)))
3038 mail message buffer. This function should set up the basics of the
3115 call this function. You should omit it or set it to nil in most