From ac16149ba470ae8a625d42a61adbb6e84254c675 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 17 Nov 2015 15:28:50 -0800 Subject: =?UTF-8?q?Fix=20docstring=20quoting=20problems=20with=20=E2=80=98?= =?UTF-8?q?=20'=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Artur Malabarba in: http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html Most of these fixes are to documentation; many involve fixing longstanding quoting glitches that are independent of the recent substitute-command-keys changes. The changes to code are: * lisp/cedet/mode-local.el (mode-local-augment-function-help) (describe-mode-local-overload): Substitute docstrings before displaying them. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Quote the generated docstring for later substitution. --- lisp/progmodes/js.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lisp/progmodes/js.el') diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 3ce1c17352f..356a31db094 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -97,7 +97,7 @@ name.") "\\.\\(" js--name-re "\\)\\s-*?=\\s-*?\\(function\\)\\_>") "Regexp matching an explicit JavaScript prototype \"method\" declaration. Group 1 is a (possibly-dotted) class name, group 2 is a method name, -and group 3 is the 'function' keyword.") +and group 3 is the `function' keyword.") (defconst js--plain-class-re (concat "^\\s-*\\(" js--dotted-name-re "\\)\\.prototype" @@ -831,7 +831,7 @@ lines." (defun js--forward-function-decl () "Move forward over a JavaScript function declaration. -This puts point at the 'function' keyword. +This puts point at the `function' keyword. If this is a syntactically-correct non-expression function, return the name of the function, or t if the name could not be @@ -3366,8 +3366,8 @@ left-to-right." (defun js--read-tab (prompt) "Read a Mozilla tab with prompt PROMPT. -Return a cons of (TYPE . OBJECT). TYPE is either 'window or -'tab, and OBJECT is a JavaScript handle to a ChromeWindow or a +Return a cons of (TYPE . OBJECT). TYPE is either `window' or +`tab', and OBJECT is a JavaScript handle to a ChromeWindow or a browser, respectively." ;; Prime IDO @@ -3778,12 +3778,12 @@ If one hasn't been set, or if it's stale, prompt for a new one." "Major mode for editing JSX. To customize the indentation for this mode, set the SGML offset -variables (`sgml-basic-offset', `sgml-attribute-offset' et al) +variables (`sgml-basic-offset', `sgml-attribute-offset' et al.) locally, like so: (defun set-jsx-indentation () (setq-local sgml-basic-offset js-indent-level)) - (add-hook 'js-jsx-mode-hook #'set-jsx-indentation)" + (add-hook \\='js-jsx-mode-hook #\\='set-jsx-indentation)" :group 'js (setq-local indent-line-function #'js-jsx-indent-line)) -- cgit v1.2.1 From 48471e9614c5a0d1cf63a4604970a45931092230 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 1 Dec 2015 05:40:57 +0200 Subject: Don't mistake certain JS method calls for keywords * lisp/progmodes/js.el (js--ctrl-statement-indentation): Braceless keyword can't come after a period (bug#22063). --- lisp/progmodes/js.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp/progmodes/js.el') diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 356a31db094..310b7ba371f 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1823,6 +1823,7 @@ nil." (skip-syntax-backward " ") (skip-syntax-backward "w_") (looking-at js--possibly-braceless-keyword-re)) + (memq (char-before) '(?\s ?\t ?\n ?\})) (not (js--end-of-do-while-loop-p)))) (save-excursion (goto-char (match-beginning 0)) -- cgit v1.2.1