Mercurial > emacs
comparison lisp/subr.el @ 56570:059dc717baef
(event-modifiers, event-basic-type): Doc fixes.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Sat, 31 Jul 2004 15:45:30 +0000 |
parents | 1bef61b14e78 |
children | d9455bfd01ee 09f3fd9f680d 0bdb5a16ae51 |
comparison
equal
deleted
inserted
replaced
56569:a6cb62c42cec | 56570:059dc717baef |
---|---|
642 | 642 |
643 (defun event-modifiers (event) | 643 (defun event-modifiers (event) |
644 "Return a list of symbols representing the modifier keys in event EVENT. | 644 "Return a list of symbols representing the modifier keys in event EVENT. |
645 The elements of the list may include `meta', `control', | 645 The elements of the list may include `meta', `control', |
646 `shift', `hyper', `super', `alt', `click', `double', `triple', `drag', | 646 `shift', `hyper', `super', `alt', `click', `double', `triple', `drag', |
647 and `down'." | 647 and `down'. |
648 EVENT may be an event or an event type. If EVENT is a symbol | |
649 that has never been used in an event that has been read as input | |
650 in the current Emacs session, then this function can return nil, | |
651 even when EVENT actually has modifiers." | |
648 (let ((type event)) | 652 (let ((type event)) |
649 (if (listp type) | 653 (if (listp type) |
650 (setq type (car type))) | 654 (setq type (car type))) |
651 (if (symbolp type) | 655 (if (symbolp type) |
652 (cdr (get type 'event-symbol-elements)) | 656 (cdr (get type 'event-symbol-elements)) |
669 (setq list (cons 'alt list))) | 673 (setq list (cons 'alt list))) |
670 list)))) | 674 list)))) |
671 | 675 |
672 (defun event-basic-type (event) | 676 (defun event-basic-type (event) |
673 "Return the basic type of the given event (all modifiers removed). | 677 "Return the basic type of the given event (all modifiers removed). |
674 The value is a printing character (not upper case) or a symbol." | 678 The value is a printing character (not upper case) or a symbol. |
679 EVENT may be an event or an event type. If EVENT is a symbol | |
680 that has never been used in an event that has been read as input | |
681 in the current Emacs session, then this function may return nil." | |
675 (if (consp event) | 682 (if (consp event) |
676 (setq event (car event))) | 683 (setq event (car event))) |
677 (if (symbolp event) | 684 (if (symbolp event) |
678 (car (get event 'event-symbol-elements)) | 685 (car (get event 'event-symbol-elements)) |
679 (let ((base (logand event (1- (lsh 1 18))))) | 686 (let ((base (logand event (1- (lsh 1 18))))) |