[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode d6f7e0b 287/468: lua-documentation-function: New
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode d6f7e0b 287/468: lua-documentation-function: New custom variable. |
Date: |
Thu, 5 Aug 2021 04:58:54 -0400 (EDT) |
branch: elpa/lua-mode
commit d6f7e0b330845c28f4a189ec99572b5b40391db9
Author: Mark Oteiza <mvoteiza@udel.edu>
Commit: Mark Oteiza <mvoteiza@udel.edu>
lua-documentation-function: New custom variable.
Lets the lua mode browser be customizable.
Provides some choices for browser functions.
lua-documentation-url: Try to use local documentation
Change lua-search-url-prefix to lua-documentation-url and let
`lua-search-documentation' add the fragment.
---
lua-mode.el | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index 66f07d2..adb8992 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)
@@ -1790,7 +1801,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 0781d83 404/468: Merge pull request #175 from immerrr/add-lua-backward-up-list-command, (continued)
- [nongnu] elpa/lua-mode 0781d83 404/468: Merge pull request #175 from immerrr/add-lua-backward-up-list-command, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d6dc6fb 406/468: Don't add "continuation line" indentation inside parentheses/brackets, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ed01d35 071/468: Implement proper syntax-status querying: improve precision a lot, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0a1e915 262/468: bug fixes for show/hide process buffer, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6315591 265/468: indentation-test: extend unary op test cases, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6c4f7cb 251/468: lua-default-command-switches: declare buffer-local with make-variable-buffer-local, not make-local-variable, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9117cfc 269/468: Makefile: add tryout target to start editing test.lua, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 2453e37 272/468: Makefile: account EMACS env variable in 'tryout' target, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3e8d475 275/468: Fixed broken local variable assignments, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1d804f6 279/468: Drop pre-Emacs23 support macros, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d6f7e0b 287/468: lua-documentation-function: New custom variable.,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode f2e5c4b 299/468: Merge pull request #90 from Schnouki/lua53, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 625ed2f 281/468: Move credits to AUTHORS, cleanup Commentary section a bit, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0b41d44 319/468: Merge master into stable, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ea7e35c 321/468: Escape tabs in lua-make-lua-string, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 33097fe 329/468: Merge pull request #123 from zonuexe/fix/auto-mode-alist, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e6faecc 328/468: Use \\' instead of $, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5640afe 332/468: Merge pull request #128 from immerrr/update-makefile-and-travis-yml, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 56691b8 338/468: Add tests for preserving point location when filling, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6daec31 342/468: utils: update to new buttercup matcher definition logic (#138), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a80d912 350/468: Fix a minor bug in lua-kill-process, Philip Kaludercic, 2021/08/05