From eb392195ffdb108228c981f92ca8b5766afdcff9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 May 2015 00:10:00 -0700 Subject: [PATCH] Support curved quotes in doc strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emacs's traditional doc string style has been to quote symbols `like this'. This worked well on now-obsolete terminals where ` and ' were symmetric quotes, but nowadays curved quotes ‘like this’ look better. Support quoting the new way too. (Bug#20385) * doc/lispref/tips.texi (Documentation Tips): Symbols can be quoted ‘like-this’ as well as `like-this'. * etc/NEWS: Mention this. * lisp/cedet/srecode/texi.el (srecode-texi-texify-docstring): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2) (lisp-cl-font-lock-keywords-2): * lisp/finder.el (finder-font-lock-keywords): * lisp/gnus/gnus-art.el (gnus-button-alist): * lisp/help-mode.el (help-xref-symbol-regexp) (help-xref-info-regexp, help-xref-url-regexp): * lisp/international/mule-cmds.el (help-xref-mule-regexp-template): * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add "‘" and "’" to electric-pair-text-pairs. (elisp--form-quoted-p): Also allow "‘" as a quoting char. (elisp-completion-at-point, elisp--preceding-sexp): Also treat "‘" and "’" as quoting chars. * lisp/wid-edit.el (widget-documentation-link-regexp): Parse symbols quoted ‘like-this’ as well as `like-this'. --- doc/lispref/tips.texi | 33 ++++++++++++++++++--------------- etc/NEWS | 4 ++++ lisp/cedet/srecode/texi.el | 2 +- lisp/emacs-lisp/checkdoc.el | 5 +++-- lisp/emacs-lisp/lisp-mode.el | 8 ++++---- lisp/finder.el | 2 +- lisp/gnus/gnus-art.el | 8 ++++---- lisp/help-mode.el | 7 ++++--- lisp/international/mule-cmds.el | 2 +- lisp/progmodes/elisp-mode.el | 24 +++++++++++++----------- lisp/wid-edit.el | 2 +- 11 files changed, 54 insertions(+), 43 deletions(-) diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index cc1f0e4..912d746 100644 … diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 0a95783..dac3b1e 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -2863,7 +2863,7 @@ The following properties have special meanings for this widget: :type 'boolean :group 'widget-documentation) -(defcustom widget-documentation-link-regexp "`\\([^\n`' ]+\\)'" +(defcustom widget-documentation-link-regexp "[`‘]\\([^\n `'‘’]+\\)['’]" "Regexp for matching potential links in documentation strings. The first group should be the link itself." :type 'regexp -- 2.1.0