*** help.el 25 Mar 2006 20:49:31 +0100 1.308 --- help.el 26 Apr 2006 10:08:16 +0200 *************** *** 525,541 **** (princ string))))) nil) ! (defun string-key-binding (key) ! "Value is the binding of KEY in a string. ! If KEY is an event on a string, and that string has a `local-map' ! or `keymap' property, return the binding of KEY in the string's keymap." (let* ((defn nil) ! (start (when (vectorp key) ! (if (memq (aref key 0) '(mode-line header-line left-margin right-margin)) ! (event-start (aref key 1)) ! (and (consp (aref key 0)) ! (event-start (aref key 0)))))) (string-info (and (consp start) (nth 4 start)))) (when string-info (let* ((string (car string-info)) --- 525,542 ---- (princ string))))) nil) ! (defun string-key-binding (event &optional key) ! "With some string EVENT, return the local binding of KEY. ! If EVENT is an event on a string, and that string has a `local-map' ! or `keymap' property, return the binding of KEY in the string's keymap. ! If KEY is not specified, it is taken from the event." (let* ((defn nil) ! (start (when (vectorp event) ! (if (memq (aref event 0) '(mode-line header-line left-margin right-margin)) ! (event-start (aref event 1)) ! (and (consp (aref event 0)) ! (event-start (aref event 0)))))) (string-info (and (consp start) (nth 4 start)))) (when string-info (let* ((string (car string-info)) *************** *** 544,550 **** (< pos (length string)) (or (get-text-property pos 'local-map string) (get-text-property pos 'keymap string))))) ! (setq defn (and local-map (lookup-key local-map key))))) defn)) (defun help-key-description (key untranslated) --- 545,551 ---- (< pos (length string)) (or (get-text-property pos 'local-map string) (get-text-property pos 'keymap string))))) ! (setq defn (and local-map (lookup-key local-map (or key event)))))) defn)) (defun help-key-description (key untranslated)