]> code.delx.au - gnu-emacs/commitdiff
* lisp/mouse.el (mouse-posn-property): Ignore posn-point for mode-line
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 31 May 2014 12:32:36 +0000 (08:32 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 31 May 2014 12:32:36 +0000 (08:32 -0400)
clicks.

Fixes: debbugs:17633
lisp/ChangeLog
lisp/mouse.el

index 8504fb3018a858d92021f6967dc9d91bcde5ab71..3f803d47a768e1417d0de5517695647848a5fd7f 100644 (file)
@@ -1,5 +1,8 @@
 2014-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * mouse.el (mouse-posn-property): Ignore posn-point for mode-line
+       clicks (bug#17633).
+
        * leim/quail/latin-pre.el ("latin-2-prefix"): Use ",," rather than ", "
        for the single comma, since ", " is *very* common in normal French text
        (bug#17643).
index 19aae2b62ad0d7774f47a2be5ceb71ae2973d7ae..48d25b877139aad7f293ee47a8de265ff4681cbc 100644 (file)
@@ -658,7 +658,10 @@ its value is returned."
            (str (posn-string pos)))
        (or (and str
                 (get-text-property (cdr str) property (car str)))
-           (and pt
+            ;; FIXME: mouse clicks on the mode-line come with a position in
+            ;; (nth 5).  Maybe we should change the C code instead so that
+            ;; mouse-clicks don't include a position there!
+           (and pt (not (memq (posn-area pos) '(mode-line header-line)))
                 (get-char-property pt property w))))
     (get-char-property pos property)))