Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9ed38a84
Commit
9ed38a84
authored
Sep 20, 2006
by
David Kastrup
Browse files
(mouse-posn-property): Improve doc string.
(mouse-on-link-p): Change buffers for function calls on links.
parent
1d45e02e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/mouse.el
lisp/mouse.el
+13
-3
No files found.
lisp/ChangeLog
View file @
9ed38a84
2006-09-20 David Kastrup <dak@gnu.org>
* mouse.el (mouse-posn-property): Improve doc string.
(mouse-on-link-p): Change buffers for function calls on links.
* menu-bar.el (clipboard-yank): bomb out in interactive use if
buffer is read-only.
...
...
lisp/mouse.el
View file @
9ed38a84
...
...
@@ -776,7 +776,14 @@ If the click is in the echo area, display the `*Messages*' buffer."
(
defun
mouse-posn-property
(
pos
property
)
"Look for a property at click position."
"Look for a property at click position.
POS may be either a buffer position or a click position like
those returned from `start-event'. If the click position is on
a string, the text property PROPERTY is examined.
If this is nil or the click is not on a string, then
the corresponding buffer position is searched for PROPERTY.
If PROPERTY is encountered in one of those places,
its value is returned."
(
if
(
consp
pos
)
(
let
((
w
(
posn-window
pos
))
(
pt
(
posn-point
pos
))
(
str
(
posn-string
pos
)))
...
...
@@ -835,9 +842,12 @@ at the same position."
((
eq
action
'mouse-face
)
(
and
(
mouse-posn-property
pos
'mouse-face
)
t
))
((
functionp
action
)
;; FIXME: This
is wrong
if the click is in a
different
buffer.
;; FIXME: This
seems questionable
if the click is
not
in a buffer.
;; Should we instead decide that `action' takes a `posn'?
(
funcall
action
(
if
(
consp
pos
)
(
posn-point
pos
)
pos
)))
(
if
(
consp
pos
)
(
with-current-buffer
(
window-buffer
(
posn-window
pos
))
(
funcall
action
(
posn-point
pos
)))
(
funcall
action
pos
)))
(
t
action
))))
(
defun
mouse-fixup-help-message
(
msg
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment