summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/dframe.el8
-rw-r--r--lisp/info.el53
3 files changed, 46 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 164a401026c..fe0e1a74c9a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
+2005-10-04 Chong Yidong <cyd@stupidchicken.com>
+
+ * info.el (Info-next, Info-prev, Info-up): Select info buffer, in
+ case the user clicks on the link while another window is selected.
+ (Info-speedbar-hierarchy-buttons): Use speedbar-current-frame.
+
+ * dframe.el (dframe-update-keymap): Use mouse-1-click-follows-link
+ functionality.
+ (dframe-help-echo): Save point in case mouse tracking is off.
+
2005-10-04 Thien-Thi Nguyen <ttn@gnu.org>
* net/ange-ftp.el (ange-ftp-ls): Fix typo introduced in last change.
diff --git a/lisp/dframe.el b/lisp/dframe.el
index b180d6bbf00..f0aa72d0f1f 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -257,7 +257,8 @@ Local to those buffers, as a function called that created it.")
)
;; mouse bindings so we can manipulate the items on each line
- (define-key map [down-mouse-1] 'dframe-double-click)
+ ;; (define-key map [down-mouse-1] 'dframe-double-click)
+ (define-key map [follow-link] 'mouse-face)
(define-key map [mouse-2] 'dframe-click)
;; This is the power click for new frames, or refreshing a cache
(define-key map [S-mouse-2] 'dframe-power-click)
@@ -921,8 +922,9 @@ BUFFER and POSITION are optional because XEmacs doesn't use them."
dframe-help-echo-function)
(let ((dframe-suppress-message-flag t))
(with-current-buffer buffer
- (if position (goto-char position))
- (funcall dframe-help-echo-function)))))
+ (save-excursion
+ (if position (goto-char position))
+ (funcall dframe-help-echo-function))))))
(defun dframe-mouse-set-point (e)
"Set POINT based on event E.
diff --git a/lisp/info.el b/lisp/info.el
index a7cabcde820..5a0c0b510c1 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1845,36 +1845,45 @@ End of submatch 0, 1, and 3 are the same, so you can safely concat."
(defun Info-next ()
"Go to the next node of this node."
(interactive)
- (Info-goto-node (Info-extract-pointer "next")))
+ ;; In case another window is currently selected
+ (save-window-excursion
+ (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*"))
+ (Info-goto-node (Info-extract-pointer "next"))))
(defun Info-prev ()
"Go to the previous node of this node."
(interactive)
- (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous")))
+ ;; In case another window is currently selected
+ (save-window-excursion
+ (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*"))
+ (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous"))))
(defun Info-up (&optional same-file)
"Go to the superior node of this node.
If SAME-FILE is non-nil, do not move to a different Info file."
(interactive)
- (let ((old-node Info-current-node)
- (old-file Info-current-file)
- (node (Info-extract-pointer "up")) p)
- (and (or same-file (not (stringp Info-current-file)))
- (string-match "^(" node)
- (error "Up node is in another Info file"))
- (Info-goto-node node)
- (setq p (point))
- (goto-char (point-min))
- (if (and (search-forward "\n* Menu:" nil t)
- (re-search-forward
- (if (string-equal old-node "Top")
- (concat "\n\\*[^:]+: +(" (file-name-nondirectory old-file) ")")
- (concat "\n\\* +\\(" (regexp-quote old-node)
- ":\\|[^:]+: +" (regexp-quote old-node) "\\)"))
- nil t))
- (progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2)))
- (goto-char p)
- (Info-restore-point Info-history))))
+ ;; In case another window is currently selected
+ (save-window-excursion
+ (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*"))
+ (let ((old-node Info-current-node)
+ (old-file Info-current-file)
+ (node (Info-extract-pointer "up")) p)
+ (and (or same-file (not (stringp Info-current-file)))
+ (string-match "^(" node)
+ (error "Up node is in another Info file"))
+ (Info-goto-node node)
+ (setq p (point))
+ (goto-char (point-min))
+ (if (and (search-forward "\n* Menu:" nil t)
+ (re-search-forward
+ (if (string-equal old-node "Top")
+ (concat "\n\\*[^:]+: +(" (file-name-nondirectory old-file) ")")
+ (concat "\n\\* +\\(" (regexp-quote old-node)
+ ":\\|[^:]+: +" (regexp-quote old-node) "\\)"))
+ nil t))
+ (progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2)))
+ (goto-char p)
+ (Info-restore-point Info-history)))))
(defun Info-history-back ()
"Go back in the history to the last node visited."
@@ -4033,7 +4042,7 @@ specific node to expand."
(save-window-excursion
(setq completions
(Info-speedbar-fetch-file-nodes (or node '"(dir)top"))))
- (select-frame speedbar-frame)
+ (select-frame (speedbar-current-frame))
(if completions
(speedbar-with-writable
(dolist (completion completions)