[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/caml 70cc99c 101/197: - Mouse navigation in a caml-he
From: |
Stefan Monnier |
Subject: |
[nongnu] externals/caml 70cc99c 101/197: - Mouse navigation in a caml-help window does not open another window |
Date: |
Sat, 21 Nov 2020 01:19:46 -0500 (EST) |
branch: externals/caml
commit 70cc99c7cdf435d0c936107161d0c16fb4399b49
Author: Didier Rémy <Didier.Remy@inria.fr>
Commit: Didier Rémy <Didier.Remy@inria.fr>
- Mouse navigation in a caml-help window does not open another window
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5983
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
caml-help.el | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/caml-help.el b/caml-help.el
index 75efff3..ea082bf 100644
--- a/caml-help.el
+++ b/caml-help.el
@@ -560,7 +560,7 @@ command. An entry may be an info module or a complete file
name."
;; Help function.
-(defun ocaml-goto-help (&optional module entry)
+(defun ocaml-goto-help (&optional module entry same-window)
"Searches info manual for MODULE and ENTRY in MODULE.
If unspecified, MODULE and ENTRY are inferred from the position in the
current buffer using \\[ocaml-qualified-identifier]."
@@ -578,9 +578,14 @@ current buffer using \\[ocaml-qualified-identifier]."
(location (cdr (cadr module-info))))
(cond
(location
- (view-file-other-window
- (concat location (ocaml-uncapitalize module) ".mli"))
- (bury-buffer (current-buffer)))
+ (let ((file (concat location (ocaml-uncapitalize module) ".mli")))
+ (if (window-live-p same-window)
+ (progn (select-window same-window)
+ (view-mode-exit view-return-to-alist view-exit-action))
+ ;; (view-buffer (find-file-noselect file) 'view))
+ )
+ (view-file-other-window file)
+ (bury-buffer (current-buffer))))
(info-section (error "Aborted"))
(t (error "No help for module %s" module))))
)
@@ -721,17 +726,19 @@ buffer positions."
(defun ocaml-link-goto (click)
(interactive "e")
(let* ((pos (caml-event-point-start click))
- (buf (window-buffer (caml-event-window click)))
+ (win (caml-event-window click))
+ (buf (window-buffer win))
(window (selected-window))
(link))
(setq link
(with-current-buffer buf
- (buffer-substring (previous-property-change
- pos buf (- pos 100))
- (next-property-change
- pos buf (+ pos 100)))))
+ (buffer-substring
+ (previous-single-property-change (+ pos 1) 'local-map
+ buf (- pos 100))
+ (next-single-property-change pos 'local-map
+ buf (+ pos 100)))))
(if (string-match (concat "^" ocaml-longident-regexp "$") link)
- (ocaml-goto-help (match-string 1 link) (match-string 2 link))
+ (ocaml-goto-help (match-string 1 link) (match-string 2 link) win)
(if (not (equal (window-buffer window) buf))
(switch-to-buffer-other-window buf))
(if (setq link (assoc link (cdr ocaml-links)))
- [nongnu] externals/caml 7c426ee 070/197: ajout -dtypes, (continued)
- [nongnu] externals/caml 7c426ee 070/197: ajout -dtypes, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml bb1103a 075/197: Scrolling .annot, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml c834fac 085/197: caml-xemacs.el, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml dbaedc7 086/197: added caml-emacs.el, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 2a6dc28 087/197: changed defmacro -> defalias, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml f751b4c 091/197: NOCOMPILE pour installer sans compiler (suggestion de Sven Luther), Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 0a4f815 093/197: Fix hilitghting of largest well-typed expr surrounding point., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml b19dc86 092/197: pour que ca marche avec camlp4, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 6f9f060 096/197: caml-types:, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml bcd8c14 097/197: Retrait des messages de debugging..., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 70cc99c 101/197: - Mouse navigation in a caml-help window does not open another window,
Stefan Monnier <=
- [nongnu] externals/caml ad3e9c2 105/197: Ajout de camldebug dans le menu Caml d'emacs., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 92e4789 104/197: indentation of comments, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 111e6db 109/197: nettoyage, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml e32742a 111/197: ajout des annotations pour variables et appels terminaux, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 5f8dd3f 113/197: PR#4440 added function to skip warnings and jump to error, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml a688081 114/197: PR#4469 enhanced caml-set-compile-command, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 99e7ea3 119/197: merge changes from 3.10.2merged to 3.11.0, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 51b6e03 120/197: merge changes from release/3.11.1 to release/3.11.2, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml d1fc793 125/197: Added save-excursion to ocaml-link-activate., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 97316f7 130/197: renaming of Objective Caml to OCaml and cleanup of copyright headers, Stefan Monnier, 2020/11/21