mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-20 12:40:56 -08:00
* lisp/subr.el (posn-point, posn-string): Fix it here instead.
* lisp/mouse.el (mouse-on-link-p): Undo scroll-bar fix. Fixes: debbugs:13979
This commit is contained in:
parent
5f24fa51a0
commit
9a1ff1644d
3 changed files with 21 additions and 13 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* 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 <eggert@cs.ucla.edu>
|
2013-03-20 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
Suppress unnecessary non-ASCII chatter during build process.
|
Suppress unnecessary non-ASCII chatter during build process.
|
||||||
|
|
@ -15,8 +20,8 @@
|
||||||
|
|
||||||
* whitespace.el (whitespace-font-lock, whitespace-font-lock-mode):
|
* whitespace.el (whitespace-font-lock, whitespace-font-lock-mode):
|
||||||
Remove vars.
|
Remove vars.
|
||||||
(whitespace-color-on, whitespace-color-off): Use
|
(whitespace-color-on, whitespace-color-off):
|
||||||
`font-lock-fontify-buffer' (Bug#13817).
|
Use `font-lock-fontify-buffer' (Bug#13817).
|
||||||
|
|
||||||
2013-03-19 Stefan Monnier <monnier@iro.umontreal.ca>
|
2013-03-19 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
|
@ -76,8 +81,7 @@
|
||||||
buffer's first char. Use `with-selected-window' instead of
|
buffer's first char. Use `with-selected-window' instead of
|
||||||
`save-window-excursion' with `select-window'.
|
`save-window-excursion' with `select-window'.
|
||||||
(doc-view-document->bitmap): Check the current doc-view overlay's
|
(doc-view-document->bitmap): Check the current doc-view overlay's
|
||||||
display property instead the char property of the buffer's first
|
display property instead the char property of the buffer's first char.
|
||||||
char.
|
|
||||||
|
|
||||||
2013-03-18 Paul Eggert <eggert@cs.ucla.edu>
|
2013-03-18 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -759,8 +759,7 @@ click is the local or global binding of that event.
|
||||||
- Otherwise, the mouse-1 event is translated into a mouse-2 event
|
- Otherwise, the mouse-1 event is translated into a mouse-2 event
|
||||||
at the same position."
|
at the same position."
|
||||||
(let ((action
|
(let ((action
|
||||||
(and (not (memq 'vertical-scroll-bar pos))
|
(and (or (not (consp pos))
|
||||||
(or (not (consp pos))
|
|
||||||
mouse-1-click-in-non-selected-windows
|
mouse-1-click-in-non-selected-windows
|
||||||
(eq (selected-window) (posn-window pos)))
|
(eq (selected-window) (posn-window pos)))
|
||||||
(or (mouse-posn-property pos 'follow-link)
|
(or (mouse-posn-property pos 'follow-link)
|
||||||
|
|
|
||||||
19
lisp/subr.el
19
lisp/subr.el
|
|
@ -1044,14 +1044,17 @@ and `event-end' functions."
|
||||||
(nth 1 position))))
|
(nth 1 position))))
|
||||||
(and (symbolp area) area)))
|
(and (symbolp area) area)))
|
||||||
|
|
||||||
(defsubst posn-point (position)
|
(defun posn-point (position)
|
||||||
"Return the buffer location in POSITION.
|
"Return the buffer location in POSITION.
|
||||||
POSITION should be a list of the form returned by the `event-start'
|
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)
|
(or (nth 5 position)
|
||||||
(if (consp (nth 1 position))
|
(let ((pt (nth 1 position)))
|
||||||
(car (nth 1 position))
|
(or (car-safe pt)
|
||||||
(nth 1 position))))
|
;; Apparently this can also be `vertical-scroll-bar' (bug#13979).
|
||||||
|
(if (integerp pt) pt)))))
|
||||||
|
|
||||||
(defun posn-set-point (position)
|
(defun posn-set-point (position)
|
||||||
"Move point to POSITION.
|
"Move point to POSITION.
|
||||||
|
|
@ -1124,12 +1127,14 @@ POSITION should be a list of the form returned by the `event-start'
|
||||||
and `event-end' functions."
|
and `event-end' functions."
|
||||||
(nth 3 position))
|
(nth 3 position))
|
||||||
|
|
||||||
(defsubst posn-string (position)
|
(defun posn-string (position)
|
||||||
"Return the string object of POSITION.
|
"Return the string object of POSITION.
|
||||||
Value is a cons (STRING . STRING-POS), or nil if not a string.
|
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'
|
POSITION should be a list of the form returned by the `event-start'
|
||||||
and `event-end' functions."
|
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)
|
(defsubst posn-image (position)
|
||||||
"Return the image object of POSITION.
|
"Return the image object of POSITION.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue