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

Lines Matching +defs:type +defs:prefix +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
460 of the map. Note that AFTER must be an event type (like KEY), NOT a command
464 AFTER should be a single event type--a symbol or a character, not a sequence.
471 (signal 'wrong-type-argument (list 'keymapp keymap)))
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
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)
557 KEY is a key sequence; noninteractively, it is a string or vector
563 (interactive "KSet key locally: \nCSet key %s locally to command: ")
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)
580 (interactive "kUnset key locally: ")
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
606 ;; prefix, a string. Redefined bindings will then be bound to the
607 ;; original key, with PREFIX added at the front.
608 (or prefix (setq prefix ""))
610 (prefix1 (vconcat prefix [nil]))
611 (key-substitution-in-progress
612 (cons scan key-substitution-in-progress)))
614 ;; has any definition, and act on it with hack-key.
617 (aset prefix1 (length prefix) char)
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)))))
681 (defalias 'ctl-x-4-prefix ctl-x-4-map)
682 (define-key ctl-x-map "4" 'ctl-x-4-prefix)
686 (defalias 'ctl-x-5-prefix ctl-x-5-map)
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)))
714 (char-valid-p (event-basic-type obj)))
726 EVENT may be an event or an event type. If EVENT is a symbol
730 (let ((type event))
731 (if (listp type)
732 (setq type (car type)))
733 (if (symbolp type)
734 (cdr (get type 'event-symbol-elements))
736 (char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@
738 (if (not (zerop (logand type ?\M-\^@)))
740 (if (or (not (zerop (logand type ?\C-\^@)))
743 (if (or (not (zerop (logand type ?\S-\^@)))
746 (or (zerop (logand type ?\H-\^@))
748 (or (zerop (logand type ?\s-\^@))
750 (or (zerop (logand type ?\A-\^@))
754 (defun event-basic-type (event)
755 "Return the basic type of the given event (all modifiers removed).
757 EVENT may be an event or an event type. If EVENT is a symbol
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.
1173 (setq ordering (make-hash-table :weakness 'key :test 'eq))))
1329 (define-key mode-line-mode-menu
1373 ;; (if (eq system-type 'ms-dos)
1381 (defun symbol-file (symbol &optional type)
1390 (if (and (or (null type) (eq type 'defun))
1397 (if (if type
1398 (if (eq type 'defvar)
1402 (member (cons type symbol) (cdr (car files))))
1618 :type '(choice (const 8) (const 10) (const 16))
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))))
1803 ;; If last command was a prefix arg, e.g. C-u, push this event onto
1805 ;; this-command-keys by read-key-sequence.
1938 If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
1967 (single-key-description exit-char))
1999 ;; insertion-type of the two markers.
2057 (defvar buffer-file-type nil
2119 (if (or (eq system-type 'ms-dos)
2120 (and (eq system-type 'windows-nt) (w32-shell-dos-semantics)))
2321 ((eq system-type 'vax-vms)
2351 ((eq system-type 'vax-vms)
2727 ;; "Matches any prefix that corresponds to a normal subregexp context.")
2859 (cons (substring string start mb) ; unmatched prefix