Skip to content

Commit 8d45475

Browse files
committed
Move ess-help-web-search to use cl-defgeneric
1 parent fd60ffb commit 8d45475

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lisp/ess-stata-mode.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
(ess-help-sec-keys-alist . ess-help-STA-sec-keys-alist)
7272
(ess-loop-timeout . 500000 )
7373
(ess-object-name-db-file . "ess-sta-namedb.el" )
74-
(ess-help-web-search-command . "https://www.stata.com/search/?q=%s&restrict=&btnG=Search&client=stata&num=&output=xml_no_dtd&site=stata&ie=&oe=UTF-8&sort=&proxystylesheet=stata")
7574
(inferior-ess-program . inferior-STA-program)
7675
(inferior-ess-objects-command . "describe\n")
7776
(inferior-ess-help-command . "help %s\n") ;; assumes set more off
@@ -88,6 +87,12 @@
8887
(ess-load-command . "run \"%s\"\n"))
8988
"Variables to customize for Stata.")
9089

90+
(cl-defmethod ess--help-web-search-override (cmd &context (ess-dialect "stata"))
91+
"Browse the web for documentation about CMD in Stata."
92+
(browse-url
93+
(format
94+
"https://www.stata.com/search/?q=%s&restrict=&btnG=Search&client=stata&num=&output=xml_no_dtd&site=stata&ie=&oe=UTF-8&sort=&proxystylesheet=stata"
95+
cmd)))
9196

9297
;;;###autoload
9398
(define-derived-mode ess-stata-mode ess-mode "ESS[STA]"

0 commit comments

Comments
 (0)