[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112102: * lisp/subr.el (posn-point,
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112102: * lisp/subr.el (posn-point, posn-string): Fix it here instead. |
Date: |
Wed, 20 Mar 2013 14:13:00 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112102
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13979
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2013-03-20 14:13:00 -0400
message:
* lisp/subr.el (posn-point, posn-string): Fix it here instead.
* lisp/mouse.el (mouse-on-link-p): Undo scroll-bar fix.
modified:
lisp/ChangeLog
lisp/mouse.el
lisp/subr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-03-20 05:17:04 +0000
+++ b/lisp/ChangeLog 2013-03-20 18:13:00 +0000
@@ -1,3 +1,8 @@
+2013-03-20 Stefan Monnier <address@hidden>
+
+ * subr.el (posn-point, posn-string): Fix it here instead (bug#13979).
+ * mouse.el (mouse-on-link-p): Undo scroll-bar fix.
+
2013-03-20 Paul Eggert <address@hidden>
Suppress unnecessary non-ASCII chatter during build process.
@@ -15,8 +20,8 @@
* whitespace.el (whitespace-font-lock, whitespace-font-lock-mode):
Remove vars.
- (whitespace-color-on, whitespace-color-off): Use
- `font-lock-fontify-buffer' (Bug#13817).
+ (whitespace-color-on, whitespace-color-off):
+ Use `font-lock-fontify-buffer' (Bug#13817).
2013-03-19 Stefan Monnier <address@hidden>
@@ -76,8 +81,7 @@
buffer's first char. Use `with-selected-window' instead of
`save-window-excursion' with `select-window'.
(doc-view-document->bitmap): Check the current doc-view overlay's
- display property instead the char property of the buffer's first
- char.
+ display property instead the char property of the buffer's first char.
2013-03-18 Paul Eggert <address@hidden>
=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el 2013-03-19 12:47:10 +0000
+++ b/lisp/mouse.el 2013-03-20 18:13:00 +0000
@@ -759,8 +759,7 @@
- Otherwise, the mouse-1 event is translated into a mouse-2 event
at the same position."
(let ((action
- (and (not (memq 'vertical-scroll-bar pos))
- (or (not (consp pos))
+ (and (or (not (consp pos))
mouse-1-click-in-non-selected-windows
(eq (selected-window) (posn-window pos)))
(or (mouse-posn-property pos 'follow-link)
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2013-03-08 08:11:59 +0000
+++ b/lisp/subr.el 2013-03-20 18:13:00 +0000
@@ -1044,14 +1044,17 @@
(nth 1 position))))
(and (symbolp area) area)))
-(defsubst posn-point (position)
+(defun posn-point (position)
"Return the buffer location in POSITION.
POSITION should be a list of the form returned by the `event-start'
-and `event-end' functions."
+and `event-end' functions.
+Returns nil if POSITION does not correspond to any buffer location (e.g.
+a click on a scroll bar)."
(or (nth 5 position)
- (if (consp (nth 1 position))
- (car (nth 1 position))
- (nth 1 position))))
+ (let ((pt (nth 1 position)))
+ (or (car-safe pt)
+ ;; Apparently this can also be `vertical-scroll-bar' (bug#13979).
+ (if (integerp pt) pt)))))
(defun posn-set-point (position)
"Move point to POSITION.
@@ -1124,12 +1127,14 @@
and `event-end' functions."
(nth 3 position))
-(defsubst posn-string (position)
+(defun posn-string (position)
"Return the string object of POSITION.
Value is a cons (STRING . STRING-POS), or nil if not a string.
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions."
- (nth 4 position))
+ (let ((x (nth 4 position)))
+ ;; Apparently this can also be `handle' or `below-handle' (bug#13979).
+ (when (consp x) x)))
(defsubst posn-image (position)
"Return the image object of POSITION.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112102: * lisp/subr.el (posn-point, posn-string): Fix it here instead.,
Stefan Monnier <=