]> git.eshelyaron.com Git - emacs.git/commitdiff
(string-key-binding): Deal with margin events.
authorGerd Moellmann <gerd@gnu.org>
Fri, 12 Apr 2002 09:40:56 +0000 (09:40 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 12 Apr 2002 09:40:56 +0000 (09:40 +0000)
lisp/help.el

index a11bc81008d54104780893974ee730d4e1d70a78..d47504526d638ae113590312c1cd2b58387bf73a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; help.el --- help commands for Emacs
 
-;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001
+;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -433,7 +433,8 @@ 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))
+                 (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))))))
@@ -441,7 +442,7 @@ or `keymap' property, return the binding of KEY in the string's keymap."
     (when string-info
       (let* ((string (car string-info))
             (pos (cdr string-info))
-            (local-map (and (> pos 0)
+            (local-map (and (>= pos 0)
                             (< pos (length string))
                             (or (get-text-property pos 'local-map string)
                                 (get-text-property pos 'keymap string)))))