summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2004-12-23 16:43:51 +0000
committerKaroly Lorentey <lorentey@elte.hu>2004-12-23 16:43:51 +0000
commit17d51b68fb4e7da4f18eff72c589b7ffc4f9c22c (patch)
treef490c1ccdbd43077ea77f953bc59ca94c2fe810c /lisp/help.el
parent4b89585ee70a1f64543a5851f07cf7e2d89c5c62 (diff)
parent55f4edbcd246d8ea1715687a7aeeb3afe35c0345 (diff)
downloademacs-17d51b68fb4e7da4f18eff72c589b7ffc4f9c22c.tar.gz
emacs-17d51b68fb4e7da4f18eff72c589b7ffc4f9c22c.tar.bz2
emacs-17d51b68fb4e7da4f18eff72c589b7ffc4f9c22c.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-726 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-727 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-728 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-729 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-730 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-731 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733 Update from CVS: man/calc.texi: Fix some TeX definitions. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-735 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-736 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-737 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-738 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-739 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-740 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-741 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-742 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-743 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-744 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-745 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-746 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-277
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el61
1 files changed, 54 insertions, 7 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 5ec9b1f5299..f5831c9ab3f 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -267,8 +267,13 @@ If that doesn't give a function, return nil."
(and (symbolp obj) (fboundp obj) obj))))
(error nil))))
(let* ((str (find-tag-default))
- (obj (if str (intern str))))
- (and (symbolp obj) (fboundp obj) obj))))
+ (sym (if str (intern-soft str))))
+ (if (and sym (fboundp sym))
+ sym
+ (save-match-data
+ (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str))
+ (setq sym (intern-soft (match-string 1 str)))
+ (and (fboundp sym) sym)))))))
;;; `User' help functions
@@ -609,17 +614,58 @@ the last key hit are used."
(princ "\n which is ")
(describe-function-1 defn)
(when up-event
- (let ((defn (or (string-key-binding up-event) (key-binding up-event))))
+ (let ((ev (aref up-event 0))
+ (descr (key-description up-event))
+ (hdr "\n\n-------------- up event ---------------\n\n")
+ defn
+ mouse-1-tricky mouse-1-remapped)
+ (when (and (consp ev)
+ (eq (car ev) 'mouse-1)
+ (windowp window)
+ mouse-1-click-follows-link
+ (not (eq mouse-1-click-follows-link 'double))
+ (with-current-buffer (window-buffer window)
+ (mouse-on-link-p (posn-point (event-start ev)))))
+ (setq mouse-1-tricky (integerp mouse-1-click-follows-link)
+ mouse-1-remapped (or (not mouse-1-tricky)
+ (> mouse-1-click-follows-link 0)))
+ (if mouse-1-remapped
+ (setcar ev 'mouse-2)))
+ (setq defn (or (string-key-binding up-event) (key-binding up-event)))
(unless (or (null defn) (integerp defn) (equal defn 'undefined))
- (princ "\n\n-------------- up event ---------------\n\n")
- (princ (key-description up-event))
+ (princ (if mouse-1-tricky
+ "\n\n----------------- up-event (short click) ----------------\n\n"
+ hdr))
+ (setq hdr nil)
+ (princ descr)
(if (windowp window)
(princ " at that spot"))
+ (if mouse-1-remapped
+ (princ " is remapped to <mouse-2>\n which" ))
(princ " runs the command ")
(prin1 defn)
(princ "\n which is ")
- (describe-function-1 defn))))
- (print-help-return-message)))))))
+ (describe-function-1 defn))
+ (when mouse-1-tricky
+ (setcar ev
+ (if (> mouse-1-click-follows-link 0) 'mouse-1 'mouse-2))
+ (setq defn (or (string-key-binding up-event) (key-binding up-event)))
+ (unless (or (null defn) (integerp defn) (equal defn 'undefined))
+ (princ (or hdr
+ "\n\n----------------- up-event (long click) ----------------\n\n"))
+ (princ "Pressing ")
+ (princ descr)
+ (if (windowp window)
+ (princ " at that spot"))
+ (princ (format " for longer than %d milli-seconds\n"
+ (abs mouse-1-click-follows-link)))
+ (if (not mouse-1-remapped)
+ (princ " remaps it to <mouse-2> which" ))
+ (princ " runs the command ")
+ (prin1 defn)
+ (princ "\n which is ")
+ (describe-function-1 defn))))
+ (print-help-return-message))))))))
(defun describe-mode (&optional buffer)
@@ -692,6 +738,7 @@ whose documentation describes the minor mode."
(princ " ")
(insert-button pretty-minor-mode
'action (car help-button-cache)
+ 'follow-link t
'help-echo "mouse-2, RET: show full information")
(princ (format " minor mode (%s):\n"
(if indicator