3 new commits in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/f9e4d44504a4/
Changeset: f9e4d44504a4
User: kehoea
Date: 2013-07-10 15:14:30
Summary: Document #'events-to-keys some more, use it less.
lisp/ChangeLog addition:
2013-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
* minibuf.el (get-user-response):
* cmdloop.el (y-or-n-p-minibuf):
No need to call #'events-to-keys in these two functions,
#'lookup-key accepts events directly.
* keymap.el:
* keymap.el (events-to-keys):
Document this function some more.
Stop passing strings through unexamined, treat them as vectors of
characters.
Event keys are never integers, remove some code that only ran if
(integerp (event-key ce)).
Event keys are never numbers, don't check for that.
Don't create (menu-selection call-interactively function-name)
keystrokes for menu choices, #'character-to-event doesn't
understand that syntax, so nothing uses it.
Don't ever accept mouse events, #'character-to-event doesn't
accept our synthesising of them.
src/ChangeLog addition:
2013-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
* keymap.c:
* keymap.c (key_desc_list_to_event):
Drop the allow_menu_events argument.
Don't accept lists starting with Qmenu_selection as describing
keys, nothing generates them in a way this function
understands. The intention is reasonable but the implementation
was never documented and never finished.
* keymap.c (syms_of_keymap):
Drop Qmenu_selection.
* events.c (Fcharacter_to_event):
* keymap.h:
Drop the allow_menu_events argument to key_desc_list_to_event.
Affected #: 8 files
diff -r f6af091ac6548f5e840cb3c31107474eda04f1cb -r
f9e4d44504a41130a606118b24531e7e6683c93e lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,23 @@
+2013-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * minibuf.el (get-user-response):
+ * cmdloop.el (y-or-n-p-minibuf):
+ No need to call #'events-to-keys in these two functions,
+ #'lookup-key accepts events directly.
+ * keymap.el:
+ * keymap.el (events-to-keys):
+ Document this function some more.
+ Stop passing strings through unexamined, treat them as vectors of
+ characters.
+ Event keys are never integers, remove some code that only ran if
+ (integerp (event-key ce)).
+ Event keys are never numbers, don't check for that.
+ Don't create (menu-selection call-interactively function-name)
+ keystrokes for menu choices, #'character-to-event doesn't
+ understand that syntax, so nothing uses it.
+ Don't ever accept mouse events, #'character-to-event doesn't
+ accept our synthesising of them.
+
2013-06-17 Aidan Kehoe <kehoea(a)parhasard.net>
* process.el (process-synchronize-point): Moved to a label.
diff -r f6af091ac6548f5e840cb3c31107474eda04f1cb -r
f9e4d44504a41130a606118b24531e7e6683c93e lisp/cmdloop.el
--- a/lisp/cmdloop.el
+++ b/lisp/cmdloop.el
@@ -450,8 +450,7 @@
(message "%s%s%s%s" pre prompt yn (single-key-description
event))
(setq quit-flag nil)
(signal 'quit '())))
- (let* ((keys (events-to-keys (vector event)))
- (def (lookup-key query-replace-map keys)))
+ (let ((def (lookup-key query-replace-map (vector event))))
(cond ((eq def 'skip)
(message "%s%sNo" prompt yn)
(setq yn nil))
diff -r f6af091ac6548f5e840cb3c31107474eda04f1cb -r
f9e4d44504a41130a606118b24531e7e6683c93e lisp/keymap.el
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -305,52 +305,54 @@
;;; Converting vectors of events to a read-equivalent form.
-;;; This is used both by call-interactively (for the command history)
-;;; and by macros.el (for saving keyboard macros to a file).
+(defun events-to-keys (events &optional no-mice)
+ "Given a vector of event objects, return a vector of key descriptors.
-;; #### why does (events-to-keys [backspace]) return "\C-h"?
-;; BTW, this function is a mess, and macros.el does *not* use it, in
-;; spite of the above comment. `format-kbd-macro' is used to save
-;; keyboard macros to a file.
-(defun events-to-keys (events &optional no-mice)
- "Given a vector of event objects, returns a vector of key descriptors,
-or a string (if they all fit in the ASCII range).
-Optional arg NO-MICE means that button events are not allowed."
+If all events can be represented unambiguously as characters, return a
+string. Both the string and the vector will be equivalent to the events, if
+the elements are passed to `character-to-event'.
+
+If an event represents a key press of a printable ASCII character between ?@
+and ?_, with the control modifier and only the control modifier, it is
+returned as a character between ?\x00 and ?\x1f, inclusive. ?\\C-i, ?\\C-j,
+?\\C-m are returned as the symbols `tab', `linefeed' and `return',
+respectively.
+
+There is a similar equivalence between ASCII characters with the meta
+modifier and Latin 1 characters, but this function does not use that
+equivalence.
+
+Obsolete optional argument NO-MICE means that mouse events are not allowed.
+These are actually never allowed, since `character-to-event' never accepts
+them.
+
+EVENTS can be a string, and will be treated as a vector of the events
+corresponding to those characters."
+ ;; This is only used in packages. There were some contexts where it was
+ ;; used in core, but those dated from before #'lookup-key accepted events
+ ;; in KEYS; it conses less and is more accurate to use the events directly,
+ ;; rather than calling this function. It'd be nice to move this to
+ ;; xemacs-base and add an autoload, there's no need for it to be dumped.
(if (and events (symbolp events)) (setq events (vector events)))
- (cond ((stringp events)
- events)
- ((not (vectorp events))
- (signal 'wrong-type-argument (list 'vectorp events)))
- ((let* ((length (length events))
+ (check-type events array)
+ (cond ((let* ((length (length events))
(string (make-string length 0))
c ce
(i 0))
(while (< i length)
(setq ce (aref events i))
(or (eventp ce) (setq ce (character-to-event ce)))
- ;; Normalize `c' to `?c' and `(control k)' to `?\C-k'
- ;; By passing t for the `allow-meta' arg we could get kbd macros
- ;; with meta in them to translate to the string form instead of
- ;; the list/symbol form; but I expect that would cause confusion,
- ;; so let's use the list/symbol form whenever there's
- ;; any ambiguity.
+ ;; Normalize `c' to `?c' and `(control k)' to `?\C-k' We
don't
+ ;; "normalize" Latin 1 to the corresponding meta characters, or
+ ;; vice-versa.
(setq c (event-to-character ce))
(if (and c
(key-press-event-p ce))
- (cond ((symbolp (event-key ce))
- (if (get (event-key ce) 'character-of-keysym)
- ;; Don't use a string for `backspace' and `tab'
to
- ;; avoid that unpleasant little ambiguity.
- (setq c nil)))
- ((and (= (event-modifier-bits ce) 1) ;control
- (integerp (event-key ce)))
- (let* ((te (character-to-event c)))
- (if (and (symbolp (event-key te))
- (get (event-key te) 'character-of-keysym))
- ;; Don't "normalize" (control i) to tab
- ;; to avoid the ambiguity in the other direction
- (setq c nil))
- (deallocate-event te)))))
+ (if (symbolp (event-key ce))
+ (if (get (event-key ce) 'character-of-keysym)
+ ;; Don't use a string `tab' to avoid that unpleasant
+ ;; little ambiguity.
+ (setq c nil))))
(if c
(aset string i c)
(setq i length string nil))
@@ -358,33 +360,15 @@
string))
(t
(let* ((length (length events))
- (new (copy-sequence events))
+ (new (vconcat events nil))
event mods key
(i 0))
(while (< i length)
(setq event (aref events i))
+ (or (eventp event) (setq event (character-to-event event)))
(cond ((key-press-event-p event)
(setq mods (event-modifiers event)
key (event-key event))
- (if (numberp key)
- (setq key (intern (make-string 1 key))))
- (aset new i (if mods
- (nconc mods (cons key nil))
- key)))
- ((misc-user-event-p event)
- (aset new i (list 'menu-selection
- (event-function event)
- (event-object event))))
- ((or (button-press-event-p event)
- (button-release-event-p event))
- (if no-mice
- (error
- "Mouse events can't be saved in keyboard
macros."))
- (setq mods (event-modifiers event)
- key (intern (format "button%d%s"
- (event-button event)
- (if (button-release-event-p event)
- "up" ""))))
(aset new i (if mods
(nconc mods (cons key nil))
key)))
@@ -392,10 +376,10 @@
(and (consp event) (symbolp (car event))))
(aset new i event))
(t
- (signal 'wrong-type-argument (list 'eventp event))))
+ (signal 'wrong-type-argument
+ (list 'key-press-event-p event))))
(setq i (1+ i)))
new))))
-
(defun next-key-event ()
"Return the next available keyboard event."
diff -r f6af091ac6548f5e840cb3c31107474eda04f1cb -r
f9e4d44504a41130a606118b24531e7e6683c93e lisp/minibuf.el
--- a/lisp/minibuf.el
+++ b/lisp/minibuf.el
@@ -2268,15 +2268,8 @@
(single-key-description event))
(setq quit-flag nil)
(signal 'quit '())))
- (let* ((keys (events-to-keys (vector event)))
- (def (lookup-key query-replace-map keys)))
+ (let ((def (lookup-key query-replace-map (vector event))))
(cond
-; ((eq def 'skip)
-; (message "%s%sNo" question possible)
-; (return nil))
-; ((eq def 'act)
-; (message "%s%sYes" question possible)
-; (return t))
((eq def 'recenter)
(recenter))
((or (eq def 'quit) (eq def 'exit-prefix))
diff -r f6af091ac6548f5e840cb3c31107474eda04f1cb -r
f9e4d44504a41130a606118b24531e7e6683c93e src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,18 @@
+2013-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * keymap.c:
+ * keymap.c (key_desc_list_to_event):
+ Drop the allow_menu_events argument.
+ Don't accept lists starting with Qmenu_selection as describing
+ keys, nothing generates them in a way this function
+ understands. The intention is reasonable but the implementation
+ was never documented and never finished.
+ * keymap.c (syms_of_keymap):
+ Drop Qmenu_selection.
+ * events.c (Fcharacter_to_event):
+ * keymap.h:
+ Drop the allow_menu_events argument to key_desc_list_to_event.
+
2013-06-17 Jerry James <james(a)xemacs.org>
* alloc.c (make_bignum_un): New function.
diff -r f6af091ac6548f5e840cb3c31107474eda04f1cb -r
f9e4d44504a41130a606118b24531e7e6683c93e src/events.c
--- a/src/events.c
+++ b/src/events.c
@@ -1441,7 +1441,7 @@
else
CHECK_LIVE_EVENT (event);
if (CONSP (keystroke) || SYMBOLP (keystroke))
- key_desc_list_to_event (keystroke, event, 1);
+ key_desc_list_to_event (keystroke, event);
else
{
CHECK_CHAR_COERCE_INT (keystroke);
diff -r f6af091ac6548f5e840cb3c31107474eda04f1cb -r
f9e4d44504a41130a606118b24531e7e6683c93e src/keymap.c
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -223,8 +223,6 @@
Lisp_Object Qbutton##num##up;
#include "keymap-buttons.h"
-Lisp_Object Qmenu_selection;
-
/* Emacs compatibility */
#define FROB(num) \
Lisp_Object Qmouse_##num; \
@@ -1520,31 +1518,10 @@
/* Used by character-to-event */
void
-key_desc_list_to_event (Lisp_Object list, Lisp_Object event,
- int allow_menu_events)
+key_desc_list_to_event (Lisp_Object list, Lisp_Object event)
{
Lisp_Key_Data raw_key;
- if (allow_menu_events &&
- CONSP (list) &&
- /* #### where the hell does this come from? */
- EQ (XCAR (list), Qmenu_selection))
- {
- Lisp_Object fn, arg;
- if (! NILP (Fcdr (Fcdr (list))))
- invalid_argument ("Invalid menu event desc", list);
- arg = Fcar (Fcdr (list));
- if (SYMBOLP (arg))
- fn = Qcall_interactively;
- else
- fn = Qeval;
- XSET_EVENT_TYPE (event, misc_user_event);
- XSET_EVENT_CHANNEL (event, wrap_frame (selected_frame ()));
- XSET_EVENT_MISC_USER_FUNCTION (event, fn);
- XSET_EVENT_MISC_USER_OBJECT (event, arg);
- return;
- }
-
define_key_parser (list, &raw_key);
/* The first zero is needed for Apple's i686-apple-darwin8-g++-4.0.1,
@@ -4672,7 +4649,6 @@
DEFSYMBOL (Qmouse_##num); \
DEFSYMBOL (Qdown_mouse_##num);
#include "keymap-buttons.h"
- DEFSYMBOL (Qmenu_selection);
DEFSYMBOL (QLFD);
DEFSYMBOL (QTAB);
DEFSYMBOL (QRET);
diff -r f6af091ac6548f5e840cb3c31107474eda04f1cb -r
f9e4d44504a41130a606118b24531e7e6683c93e src/keymap.h
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -56,8 +56,7 @@
Lisp_Object shadow, Lisp_Object prefix,
int mice_only_p, Lisp_Object buffer);
-void key_desc_list_to_event (Lisp_Object list, Lisp_Object event,
- int allow_menu_events);
+void key_desc_list_to_event (Lisp_Object list, Lisp_Object event);
int event_matches_key_specifier_p (Lisp_Object event,
Lisp_Object key_specifier);
https://bitbucket.org/xemacs/xemacs/commits/b8c2808b33d4/
Changeset: b8c2808b33d4
User: kehoea
Date: 2013-07-10 15:14:30
Summary: Document #'events-to-keys some more, use it less.
lisp/ChangeLog addition:
2013-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
* minibuf.el (get-user-response):
* cmdloop.el (y-or-n-p-minibuf):
No need to call #'events-to-keys in these two functions,
#'lookup-key accepts events directly.
* keymap.el:
* keymap.el (events-to-keys):
Document this function some more.
Stop passing strings through unexamined, treat them as vectors of
characters.
Event keys are never integers, remove some code that only ran if
(integerp (event-key ce)).
Event keys are never numbers, don't check for that.
Don't create (menu-selection call-interactively function-name)
keystrokes for menu choices, #'character-to-event doesn't
understand that syntax, so nothing uses it.
Don't ever accept mouse events, #'character-to-event doesn't
accept our synthesising of them.
src/ChangeLog addition:
2013-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
* keymap.c:
* keymap.c (key_desc_list_to_event):
Drop the allow_menu_events argument.
Don't accept lists starting with Qmenu_selection as describing
keys, nothing generates them in a way this function
understands. The intention is reasonable but the implementation
was never documented and never finished.
* keymap.c (syms_of_keymap):
Drop Qmenu_selection.
* events.c (Fcharacter_to_event):
* keymap.h:
Drop the allow_menu_events argument to key_desc_list_to_event.
Affected #: 8 files
diff -r 9c17f7be0b9282f8ff90934d410d62557b563151 -r
b8c2808b33d42ebec83e3a3a9dcb8e832e229f4f lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -10,6 +10,26 @@
* paragraphs.el (sentence-end): Use octal, not Unicode, escapes.
* (sentence-end-base): Use non-ASCII only in Mule.
+2013-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * minibuf.el (get-user-response):
+ * cmdloop.el (y-or-n-p-minibuf):
+ No need to call #'events-to-keys in these two functions,
+ #'lookup-key accepts events directly.
+ * keymap.el:
+ * keymap.el (events-to-keys):
+ Document this function some more.
+ Stop passing strings through unexamined, treat them as vectors of
+ characters.
+ Event keys are never integers, remove some code that only ran if
+ (integerp (event-key ce)).
+ Event keys are never numbers, don't check for that.
+ Don't create (menu-selection call-interactively function-name)
+ keystrokes for menu choices, #'character-to-event doesn't
+ understand that syntax, so nothing uses it.
+ Don't ever accept mouse events, #'character-to-event doesn't
+ accept our synthesising of them.
+
2013-06-17 Aidan Kehoe <kehoea(a)parhasard.net>
* process.el (process-synchronize-point): Moved to a label.
diff -r 9c17f7be0b9282f8ff90934d410d62557b563151 -r
b8c2808b33d42ebec83e3a3a9dcb8e832e229f4f lisp/cmdloop.el
--- a/lisp/cmdloop.el
+++ b/lisp/cmdloop.el
@@ -450,8 +450,7 @@
(message "%s%s%s%s" pre prompt yn (single-key-description
event))
(setq quit-flag nil)
(signal 'quit '())))
- (let* ((keys (events-to-keys (vector event)))
- (def (lookup-key query-replace-map keys)))
+ (let ((def (lookup-key query-replace-map (vector event))))
(cond ((eq def 'skip)
(message "%s%sNo" prompt yn)
(setq yn nil))
diff -r 9c17f7be0b9282f8ff90934d410d62557b563151 -r
b8c2808b33d42ebec83e3a3a9dcb8e832e229f4f lisp/keymap.el
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -305,52 +305,54 @@
;;; Converting vectors of events to a read-equivalent form.
-;;; This is used both by call-interactively (for the command history)
-;;; and by macros.el (for saving keyboard macros to a file).
+(defun events-to-keys (events &optional no-mice)
+ "Given a vector of event objects, return a vector of key descriptors.
-;; #### why does (events-to-keys [backspace]) return "\C-h"?
-;; BTW, this function is a mess, and macros.el does *not* use it, in
-;; spite of the above comment. `format-kbd-macro' is used to save
-;; keyboard macros to a file.
-(defun events-to-keys (events &optional no-mice)
- "Given a vector of event objects, returns a vector of key descriptors,
-or a string (if they all fit in the ASCII range).
-Optional arg NO-MICE means that button events are not allowed."
+If all events can be represented unambiguously as characters, return a
+string. Both the string and the vector will be equivalent to the events, if
+the elements are passed to `character-to-event'.
+
+If an event represents a key press of a printable ASCII character between ?@
+and ?_, with the control modifier and only the control modifier, it is
+returned as a character between ?\x00 and ?\x1f, inclusive. ?\\C-i, ?\\C-j,
+?\\C-m are returned as the symbols `tab', `linefeed' and `return',
+respectively.
+
+There is a similar equivalence between ASCII characters with the meta
+modifier and Latin 1 characters, but this function does not use that
+equivalence.
+
+Obsolete optional argument NO-MICE means that mouse events are not allowed.
+These are actually never allowed, since `character-to-event' never accepts
+them.
+
+EVENTS can be a string, and will be treated as a vector of the events
+corresponding to those characters."
+ ;; This is only used in packages. There were some contexts where it was
+ ;; used in core, but those dated from before #'lookup-key accepted events
+ ;; in KEYS; it conses less and is more accurate to use the events directly,
+ ;; rather than calling this function. It'd be nice to move this to
+ ;; xemacs-base and add an autoload, there's no need for it to be dumped.
(if (and events (symbolp events)) (setq events (vector events)))
- (cond ((stringp events)
- events)
- ((not (vectorp events))
- (signal 'wrong-type-argument (list 'vectorp events)))
- ((let* ((length (length events))
+ (check-type events array)
+ (cond ((let* ((length (length events))
(string (make-string length 0))
c ce
(i 0))
(while (< i length)
(setq ce (aref events i))
(or (eventp ce) (setq ce (character-to-event ce)))
- ;; Normalize `c' to `?c' and `(control k)' to `?\C-k'
- ;; By passing t for the `allow-meta' arg we could get kbd macros
- ;; with meta in them to translate to the string form instead of
- ;; the list/symbol form; but I expect that would cause confusion,
- ;; so let's use the list/symbol form whenever there's
- ;; any ambiguity.
+ ;; Normalize `c' to `?c' and `(control k)' to `?\C-k' We
don't
+ ;; "normalize" Latin 1 to the corresponding meta characters, or
+ ;; vice-versa.
(setq c (event-to-character ce))
(if (and c
(key-press-event-p ce))
- (cond ((symbolp (event-key ce))
- (if (get (event-key ce) 'character-of-keysym)
- ;; Don't use a string for `backspace' and `tab'
to
- ;; avoid that unpleasant little ambiguity.
- (setq c nil)))
- ((and (= (event-modifier-bits ce) 1) ;control
- (integerp (event-key ce)))
- (let* ((te (character-to-event c)))
- (if (and (symbolp (event-key te))
- (get (event-key te) 'character-of-keysym))
- ;; Don't "normalize" (control i) to tab
- ;; to avoid the ambiguity in the other direction
- (setq c nil))
- (deallocate-event te)))))
+ (if (symbolp (event-key ce))
+ (if (get (event-key ce) 'character-of-keysym)
+ ;; Don't use a string `tab' to avoid that unpleasant
+ ;; little ambiguity.
+ (setq c nil))))
(if c
(aset string i c)
(setq i length string nil))
@@ -358,33 +360,15 @@
string))
(t
(let* ((length (length events))
- (new (copy-sequence events))
+ (new (vconcat events nil))
event mods key
(i 0))
(while (< i length)
(setq event (aref events i))
+ (or (eventp event) (setq event (character-to-event event)))
(cond ((key-press-event-p event)
(setq mods (event-modifiers event)
key (event-key event))
- (if (numberp key)
- (setq key (intern (make-string 1 key))))
- (aset new i (if mods
- (nconc mods (cons key nil))
- key)))
- ((misc-user-event-p event)
- (aset new i (list 'menu-selection
- (event-function event)
- (event-object event))))
- ((or (button-press-event-p event)
- (button-release-event-p event))
- (if no-mice
- (error
- "Mouse events can't be saved in keyboard
macros."))
- (setq mods (event-modifiers event)
- key (intern (format "button%d%s"
- (event-button event)
- (if (button-release-event-p event)
- "up" ""))))
(aset new i (if mods
(nconc mods (cons key nil))
key)))
@@ -392,10 +376,10 @@
(and (consp event) (symbolp (car event))))
(aset new i event))
(t
- (signal 'wrong-type-argument (list 'eventp event))))
+ (signal 'wrong-type-argument
+ (list 'key-press-event-p event))))
(setq i (1+ i)))
new))))
-
(defun next-key-event ()
"Return the next available keyboard event."
diff -r 9c17f7be0b9282f8ff90934d410d62557b563151 -r
b8c2808b33d42ebec83e3a3a9dcb8e832e229f4f lisp/minibuf.el
--- a/lisp/minibuf.el
+++ b/lisp/minibuf.el
@@ -2268,15 +2268,8 @@
(single-key-description event))
(setq quit-flag nil)
(signal 'quit '())))
- (let* ((keys (events-to-keys (vector event)))
- (def (lookup-key query-replace-map keys)))
+ (let ((def (lookup-key query-replace-map (vector event))))
(cond
-; ((eq def 'skip)
-; (message "%s%sNo" question possible)
-; (return nil))
-; ((eq def 'act)
-; (message "%s%sYes" question possible)
-; (return t))
((eq def 'recenter)
(recenter))
((or (eq def 'quit) (eq def 'exit-prefix))
diff -r 9c17f7be0b9282f8ff90934d410d62557b563151 -r
b8c2808b33d42ebec83e3a3a9dcb8e832e229f4f src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -10,6 +10,21 @@
* number-gmp.c (init_number_gmp): Add void param to silence GCC.
* number-mp.c (init_number_mp): Ditto.
+2013-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * keymap.c:
+ * keymap.c (key_desc_list_to_event):
+ Drop the allow_menu_events argument.
+ Don't accept lists starting with Qmenu_selection as describing
+ keys, nothing generates them in a way this function
+ understands. The intention is reasonable but the implementation
+ was never documented and never finished.
+ * keymap.c (syms_of_keymap):
+ Drop Qmenu_selection.
+ * events.c (Fcharacter_to_event):
+ * keymap.h:
+ Drop the allow_menu_events argument to key_desc_list_to_event.
+
2013-06-17 Jerry James <james(a)xemacs.org>
* alloc.c (make_bignum_un): New function.
diff -r 9c17f7be0b9282f8ff90934d410d62557b563151 -r
b8c2808b33d42ebec83e3a3a9dcb8e832e229f4f src/events.c
--- a/src/events.c
+++ b/src/events.c
@@ -1441,7 +1441,7 @@
else
CHECK_LIVE_EVENT (event);
if (CONSP (keystroke) || SYMBOLP (keystroke))
- key_desc_list_to_event (keystroke, event, 1);
+ key_desc_list_to_event (keystroke, event);
else
{
CHECK_CHAR_COERCE_INT (keystroke);
diff -r 9c17f7be0b9282f8ff90934d410d62557b563151 -r
b8c2808b33d42ebec83e3a3a9dcb8e832e229f4f src/keymap.c
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -223,8 +223,6 @@
Lisp_Object Qbutton##num##up;
#include "keymap-buttons.h"
-Lisp_Object Qmenu_selection;
-
/* Emacs compatibility */
#define FROB(num) \
Lisp_Object Qmouse_##num; \
@@ -1520,31 +1518,10 @@
/* Used by character-to-event */
void
-key_desc_list_to_event (Lisp_Object list, Lisp_Object event,
- int allow_menu_events)
+key_desc_list_to_event (Lisp_Object list, Lisp_Object event)
{
Lisp_Key_Data raw_key;
- if (allow_menu_events &&
- CONSP (list) &&
- /* #### where the hell does this come from? */
- EQ (XCAR (list), Qmenu_selection))
- {
- Lisp_Object fn, arg;
- if (! NILP (Fcdr (Fcdr (list))))
- invalid_argument ("Invalid menu event desc", list);
- arg = Fcar (Fcdr (list));
- if (SYMBOLP (arg))
- fn = Qcall_interactively;
- else
- fn = Qeval;
- XSET_EVENT_TYPE (event, misc_user_event);
- XSET_EVENT_CHANNEL (event, wrap_frame (selected_frame ()));
- XSET_EVENT_MISC_USER_FUNCTION (event, fn);
- XSET_EVENT_MISC_USER_OBJECT (event, arg);
- return;
- }
-
define_key_parser (list, &raw_key);
/* The first zero is needed for Apple's i686-apple-darwin8-g++-4.0.1,
@@ -4672,7 +4649,6 @@
DEFSYMBOL (Qmouse_##num); \
DEFSYMBOL (Qdown_mouse_##num);
#include "keymap-buttons.h"
- DEFSYMBOL (Qmenu_selection);
DEFSYMBOL (QLFD);
DEFSYMBOL (QTAB);
DEFSYMBOL (QRET);
diff -r 9c17f7be0b9282f8ff90934d410d62557b563151 -r
b8c2808b33d42ebec83e3a3a9dcb8e832e229f4f src/keymap.h
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -56,8 +56,7 @@
Lisp_Object shadow, Lisp_Object prefix,
int mice_only_p, Lisp_Object buffer);
-void key_desc_list_to_event (Lisp_Object list, Lisp_Object event,
- int allow_menu_events);
+void key_desc_list_to_event (Lisp_Object list, Lisp_Object event);
int event_matches_key_specifier_p (Lisp_Object event,
Lisp_Object key_specifier);
https://bitbucket.org/xemacs/xemacs/commits/52b9fe8f44c0/
Changeset: 52b9fe8f44c0
User: kehoea
Date: 2013-07-10 15:32:02
Summary: Merge.
Affected #: 2 files
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches