[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 3423be4 227/316: Merge pull request #364 from blc/
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash 3423be4 227/316: Merge pull request #364 from blc/info-look |
Date: |
Mon, 15 Feb 2021 15:58:06 -0500 (EST) |
branch: externals/dash
commit 3423be4e5354493f4ec763107d29633184a390c9
Merge: 31a655b eaf33b3
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Merge pull request #364 from blc/info-look
---
README.md | 15 +++++++++++++++
dash-template.texi | 19 +++++++++++++++++++
dash.el | 35 ++++++++++++++++++++++++++++++++++-
dash.texi | 19 +++++++++++++++++++
readme-template.md | 15 +++++++++++++++
5 files changed, 102 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 91d69a7..0b29a8c 100644
--- a/README.md
+++ b/README.md
@@ -58,6 +58,21 @@ either interactively or from your `user-init-file`:
(global-dash-fontify-mode)
```
+## Info symbol lookup
+
+While editing Elisp files, you can use `C-h S` (`info-lookup-symbol`)
+to look up Elisp symbols in the relevant Info manuals (see [`(emacs)
+Info
+Lookup`](https://gnu.org/software/emacs/manual/html_node/emacs/Info-Lookup.html)).
+To enable the same for Dash symbols, use the command
+`dash-register-info-lookup`. It can be called directly when needed,
+or automatically from your `user-init-file`. For example:
+
+```el
+(with-eval-after-load 'info-look
+ (dash-register-info-lookup))
+```
+
## Functions
All functions and constructs in the library use a dash (`-`) prefix.
diff --git a/dash-template.texi b/dash-template.texi
index e194078..cb97a3b 100644
--- a/dash-template.texi
+++ b/dash-template.texi
@@ -64,6 +64,7 @@ Installation
* Using in a package:: Listing Dash as a package dependency.
* Fontification of special variables:: Font Lock of anaphoric macro variables.
+* Info symbol lookup:: Looking up Dash symbols in this manual.
Functions
@@ -101,6 +102,7 @@ Alternatively, you can just dump @file{dash.el} or
@menu
* Using in a package:: Listing Dash as a package dependency.
* Fontification of special variables:: Font Lock of anaphoric macro variables.
+* Info symbol lookup:: Looking up Dash symbols in this manual.
@end menu
@node Using in a package
@@ -142,6 +144,23 @@ call its autoloaded global counterpart
(global-dash-fontify-mode)
@end lisp
+@node Info symbol lookup
+@section Info symbol lookup
+
+@findex dash-register-info-lookup
+While editing Elisp files, you can use @kbd{C-h S}
+(@code{info-lookup-symbol}) to look up Elisp symbols in the relevant
+Info manuals (@pxref{Info Lookup,,, emacs, The GNU Emacs Manual}). To
+enable the same for Dash symbols, use the command
+@code{dash-register-info-lookup}. It can be called directly when
+needed, or automatically from your @code{user-init-file}. For
+example:
+
+@lisp
+(with-eval-after-load 'info-look
+ (dash-register-info-lookup))
+@end lisp
+
@node Functions
@chapter Functions
diff --git a/dash.el b/dash.el
index b461ea4..f249f5b 100644
--- a/dash.el
+++ b/dash.el
@@ -2894,7 +2894,7 @@ replaced with new ones. This is useful when you need to
clone a
structure such as plist or alist."
(declare (pure t) (side-effect-free t))
(-tree-map 'identity list))
-
+
;;; Font lock
(defvar dash--keywords
@@ -3050,6 +3050,39 @@ See also `dash-fontify-mode-lighter' and
(define-obsolete-function-alias
'dash-enable-font-lock #'global-dash-fontify-mode "2.18.0")
+
+;;; Info
+
+(defvar dash--info-doc-spec '("(dash) Index" nil "^ -+ .*: " "\\( \\|$\\)")
+ "The Dash :doc-spec entry for `info-lookup-alist'.
+It is based on that for `emacs-lisp-mode'.")
+
+(defun dash--info-elisp-docs ()
+ "Return the `emacs-lisp-mode' symbol docs from `info-lookup-alist'.
+Specifically, return the cons containing their
+`info-lookup->doc-spec' so that we can modify it."
+ (defvar info-lookup-alist)
+ (nthcdr 3 (assq #'emacs-lisp-mode (cdr (assq 'symbol info-lookup-alist)))))
+
+;;;###autoload
+(defun dash-register-info-lookup ()
+ "Register the Dash Info manual with `info-lookup-symbol'.
+This allows Dash symbols to be looked up with \\[info-lookup-symbol]."
+ (interactive)
+ (require 'info-look)
+ (let ((docs (dash--info-elisp-docs)))
+ (setcar docs (append (car docs) (list dash--info-doc-spec)))
+ (info-lookup-reset)))
+
+(defun dash-unload-function ()
+ "Remove Dash from `info-lookup-alist'.
+Used by `unload-feature', which see."
+ (let ((docs (and (featurep 'info-look)
+ (dash--info-elisp-docs))))
+ (when (member dash--info-doc-spec (car docs))
+ (setcar docs (remove dash--info-doc-spec (car docs)))
+ (info-lookup-reset)))
+ nil)
(provide 'dash)
;;; dash.el ends here
diff --git a/dash.texi b/dash.texi
index 866bc29..175035e 100644
--- a/dash.texi
+++ b/dash.texi
@@ -64,6 +64,7 @@ Installation
* Using in a package:: Listing Dash as a package dependency.
* Fontification of special variables:: Font Lock of anaphoric macro variables.
+* Info symbol lookup:: Looking up Dash symbols in this manual.
Functions
@@ -116,6 +117,7 @@ Alternatively, you can just dump @file{dash.el} or
@menu
* Using in a package:: Listing Dash as a package dependency.
* Fontification of special variables:: Font Lock of anaphoric macro variables.
+* Info symbol lookup:: Looking up Dash symbols in this manual.
@end menu
@node Using in a package
@@ -157,6 +159,23 @@ call its autoloaded global counterpart
(global-dash-fontify-mode)
@end lisp
+@node Info symbol lookup
+@section Info symbol lookup
+
+@findex dash-register-info-lookup
+While editing Elisp files, you can use @kbd{C-h S}
+(@code{info-lookup-symbol}) to look up Elisp symbols in the relevant
+Info manuals (@pxref{Info Lookup,,, emacs, The GNU Emacs Manual}). To
+enable the same for Dash symbols, use the command
+@code{dash-register-info-lookup}. It can be called directly when
+needed, or automatically from your @code{user-init-file}. For
+example:
+
+@lisp
+(with-eval-after-load 'info-look
+ (dash-register-info-lookup))
+@end lisp
+
@node Functions
@chapter Functions
diff --git a/readme-template.md b/readme-template.md
index 6cc06b7..8ae2693 100644
--- a/readme-template.md
+++ b/readme-template.md
@@ -58,6 +58,21 @@ either interactively or from your `user-init-file`:
(global-dash-fontify-mode)
```
+## Info symbol lookup
+
+While editing Elisp files, you can use `C-h S` (`info-lookup-symbol`)
+to look up Elisp symbols in the relevant Info manuals (see [`(emacs)
+Info
+Lookup`](https://gnu.org/software/emacs/manual/html_node/emacs/Info-Lookup.html)).
+To enable the same for Dash symbols, use the command
+`dash-register-info-lookup`. It can be called directly when needed,
+or automatically from your `user-init-file`. For example:
+
+```el
+(with-eval-after-load 'info-look
+ (dash-register-info-lookup))
+```
+
## Functions
All functions and constructs in the library use a dash (`-`) prefix.
- [elpa] externals/dash 018d30c 200/316: Update all library headers for 2021, (continued)
- [elpa] externals/dash 018d30c 200/316: Update all library headers for 2021, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2200db0 204/316: Various Texinfo manual improvements, ELPA Syncer, 2021/02/15
- [elpa] externals/dash e8cc2ec 205/316: Merge pull request #358 from blc/texi, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2a94ea5 209/316: Remove unnecessary helper function, ELPA Syncer, 2021/02/15
- [elpa] externals/dash adf3a0d 208/316: Merge pull request #359 from blc/make, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1d58249 212/316: Write -iterate in terms of --iterate, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 47f8b2b 214/316: Clean up -doto, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 794bf8c 219/316: ; Fix omission in last change, ELPA Syncer, 2021/02/15
- [elpa] externals/dash f9d67ae 223/316: Merge pull request #314 from blc/reductions, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 31a655b 224/316: Fix -cons* with no arguments, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3423be4 227/316: Merge pull request #364 from blc/info-look,
ELPA Syncer <=
- [elpa] externals/dash 558cd95 230/316: Fix take/drop splits (again), ELPA Syncer, 2021/02/15
- [elpa] externals/dash f975634 233/316: Merge pull request #235, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 8248997 234/316: Merge pull request #207 from holomorph/iota, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3694ae9 236/316: * dash.el (-iota): Simplify and purify., ELPA Syncer, 2021/02/15
- [elpa] externals/dash ca36c57 239/316: Allow -lambda with no arguments, ELPA Syncer, 2021/02/15
- [elpa] externals/dash bf8a462 243/316: Partially revert last change, ELPA Syncer, 2021/02/15
- [elpa] externals/dash d7d0acb 242/316: Don't call eval, ELPA Syncer, 2021/02/15
- [elpa] externals/dash bf8d876 238/316: Merge pull request #363 from blc/list, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 76ace7f 240/316: Fix error signaling, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1ccf08d 244/316: ; Fix last change, ELPA Syncer, 2021/02/15