[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 8a37fce 288/468: Merge pull request #82 from holo
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 8a37fce 288/468: Merge pull request #82 from holomorph/browse-url |
Date: |
Thu, 5 Aug 2021 04:58:54 -0400 (EDT) |
branch: elpa/lua-mode
commit 8a37fce95f346236efa716775a914ecf36c0efbd
Merge: 5995697 d6f7e0b
Author: immerrr again <immerrr@gmail.com>
Commit: immerrr again <immerrr@gmail.com>
Merge pull request #82 from holomorph/browse-url
Make documentation browser customizable
---
lua-mode.el | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index 0903a1e..6640468 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -222,8 +222,19 @@ Should be a list of strings."
:type 'boolean
:group 'lua)
-(defcustom lua-search-url-prefix
"http://www.lua.org/manual/5.1/manual.html#pdf-"
- "*URL at which to search for documentation on a word"
+(defcustom lua-documentation-function 'browse-url
+ "Function used to fetch the Lua reference manual."
+ :type `(radio (function-item browse-url)
+ ,@(when (fboundp 'eww) '((function-item eww)))
+ ,@(when (fboundp 'w3m-browse-url) '((function-item
w3m-browse-url)))
+ (function :tag "Other function"))
+ :group 'lua)
+
+(defcustom lua-documentation-url
+ (or (and (file-readable-p "/usr/share/doc/lua/manual.html")
+ "file:///usr/share/doc/lua/manual.html")
+ "http://www.lua.org/manual/5.1/manual.html")
+ "URL pointing to the Lua reference manual."
:type 'string
:group 'lua)
@@ -1786,7 +1797,8 @@ Create a Lua process if one doesn't already exist."
(defun lua-search-documentation ()
"Search Lua documentation for the word at the point."
(interactive)
- (browse-url (concat lua-search-url-prefix (lua-funcname-at-point))))
+ (let ((url (concat lua-documentation-url "#pdf-" (lua-funcname-at-point))))
+ (funcall lua-documentation-function url)))
(defun lua-toggle-electric-state (&optional arg)
"Toggle the electric indentation feature.
- [nongnu] elpa/lua-mode ec1b634 271/468: Bump NEWS, (continued)
- [nongnu] elpa/lua-mode ec1b634 271/468: Bump NEWS, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d4ee03e 278/468: Use syntax-propertize-function if it is available, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode fd0f6ba 280/468: Merge pull request #69 from atomontage/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 694421c 274/468: Add lua-remove-syntax-table-property to syntactic keywords, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b73794f 276/468: Merge pull request #79 from j-fu/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 13f6ffa 277/468: Provide lua--setq-local fallback macro for pre-24.3, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ce0a813 282/468: Mention xristos in AUTHORS, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6d66aee 284/468: Redo handling of "stdin:N" in tracebacks, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d7855bc 285/468: remove function lua-comment-p, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5995697 286/468: Merge pull request #81 from v2e4lisp/remove-lua-comment-p, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8a37fce 288/468: Merge pull request #82 from holomorph/browse-url,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode c3b103d 290/468: lua-beginning-of-proc: improve defun header regex, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 522edaf 289/468: with-lua-buffer: mark as debuggable, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a57e25e 293/468: Update documentation, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ceb74ae 296/468: Add file test/.nosearch, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a7780dc 304/468: silence 25.1 byte-compiler, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 37f3c42 306/468: Silence compilation warning about referencing a variable from compile.el, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 148858c 309/468: Migrate tests to buttercup, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0ce2b96 314/468: Allow to set lua-indent-level as file local variable, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8b9d895 311/468: Fix comments being spilled into the code (issue #25), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode cadc1ea 312/468: to-be-fontified-as: improve error messages, Philip Kaludercic, 2021/08/05