diff options
| author | Paul Eggert | 2015-05-28 00:06:14 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-05-28 00:22:02 -0700 |
| commit | 0fd5e6593af620863dcf90dff5d04631458e24cd (patch) | |
| tree | eba3529cdd544089f6661db3b3b09f0218aa1076 | |
| parent | 11b2744f48fc03f1511de1152ad49807557c6f85 (diff) | |
| download | emacs-0fd5e6593af620863dcf90dff5d04631458e24cd.tar.gz emacs-0fd5e6593af620863dcf90dff5d04631458e24cd.zip | |
Support curved quotes in doc strings
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/mode-local.el (overload-docstring-extension)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cus-theme.el (describe-theme-1):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
* lisp/emacs-lisp/cl-generic.el (cl--generic-describe):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-class)
(eieio-help-constructor):
* lisp/emacs-lisp/package.el (describe-package-1):
* lisp/faces.el (describe-face):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode, help-fns--obsolete):
(help-fns--interactive-only, describe-function-1):
(describe-variable):
* lisp/help.el (describe-mode):
* lisp/international/mule-cmds.el (describe-input-method)
(describe-language-environment):
* lisp/international/mule-diag.el (describe-character-set)
(print-coding-system-briefly, list-input-methods)
(list-input-methods-1):
Insert curved quotes rather than grave accent and apostrophe.
* lisp/cedet/srecode/texi.el (srecode-texi-texify-docstring):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-proper-noun-region-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-fns.el (help-do-arg-highlight)
(describe-function-1, describe-variable):
* lisp/help-mode.el (help-xref-symbol-regexp)
(help-xref-info-regexp, help-xref-url-regexp):
* lisp/help.el (describe-mode):
* lisp/international/mule-cmds.el (help-xref-mule-regexp-template):
* lisp/wid-edit.el (widget-documentation-link-regexp):
Parse symbols quoted ‘like-this’ as well as `like-this'.
* 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.
| -rw-r--r-- | doc/lispref/tips.texi | 35 | ||||
| -rw-r--r-- | etc/NEWS | 6 | ||||
| -rw-r--r-- | lisp/cedet/mode-local.el | 17 | ||||
| -rw-r--r-- | lisp/cedet/srecode/texi.el | 2 | ||||
| -rw-r--r-- | lisp/cus-theme.el | 6 | ||||
| -rw-r--r-- | lisp/descr-text.el | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/checkdoc.el | 20 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-generic.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-opt.el | 20 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 8 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 6 | ||||
| -rw-r--r-- | lisp/faces.el | 15 | ||||
| -rw-r--r-- | lisp/finder.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 8 | ||||
| -rw-r--r-- | lisp/help-fns.el | 52 | ||||
| -rw-r--r-- | lisp/help-mode.el | 7 | ||||
| -rw-r--r-- | lisp/help.el | 5 | ||||
| -rw-r--r-- | lisp/international/mule-cmds.el | 11 | ||||
| -rw-r--r-- | lisp/international/mule-diag.el | 15 | ||||
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 24 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 2 |
21 files changed, 147 insertions, 124 deletions
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index cc1f0e42750..798b6700aac 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi | |||
| @@ -658,17 +658,22 @@ starting double-quote is not part of the string! | |||
| 658 | @anchor{Docstring hyperlinks} | 658 | @anchor{Docstring hyperlinks} |
| 659 | @item | 659 | @item |
| 660 | When a documentation string refers to a Lisp symbol, write it as it | 660 | When a documentation string refers to a Lisp symbol, write it as it |
| 661 | would be printed (which usually means in lower case), with a grave | 661 | would be printed (which usually means in lower case), surrounding |
| 662 | accent @samp{`} before and apostrophe @samp{'} after it. There are | 662 | it with curved single quotes (@samp{‘} and @samp{’}). There are |
| 663 | two exceptions: write @code{t} and @code{nil} without surrounding | 663 | two exceptions: write @code{t} and @code{nil} without surrounding |
| 664 | punctuation. For example: @samp{CODE can be `lambda', nil, or t.} | 664 | punctuation. For example: @samp{CODE can be ‘lambda’, nil, or t.} |
| 665 | (In this manual, we use a different convention, with single-quotes | 665 | |
| 666 | around symbols.) | 666 | Documentation strings can also use an older single-quoting convention, |
| 667 | which quotes symbols with grave accent @samp{`} and apostrophe | ||
| 668 | @samp{'}: @samp{`like-this'} rather than @samp{‘like-this’}. This | ||
| 669 | older convention was designed for now-obsolete displays in which grave | ||
| 670 | accent and apostrophe were mirror images. Documentation in this older | ||
| 671 | convention is converted to the standard convention when it is copied | ||
| 672 | into a help buffer. @xref{Keys in Documentation}. | ||
| 667 | 673 | ||
| 668 | @cindex hyperlinks in documentation strings | 674 | @cindex hyperlinks in documentation strings |
| 669 | Help mode automatically creates a hyperlink when a documentation string | 675 | Help mode automatically creates a hyperlink when a documentation string |
| 670 | uses a symbol name between grave accent and apostrophe, if the symbol | 676 | uses a single-quoted symbol name, if the symbol has either a |
| 671 | has either a | ||
| 672 | function or a variable definition. You do not need to do anything | 677 | function or a variable definition. You do not need to do anything |
| 673 | special to make use of this feature. However, when a symbol has both a | 678 | special to make use of this feature. However, when a symbol has both a |
| 674 | function definition and a variable definition, and you want to refer to | 679 | function definition and a variable definition, and you want to refer to |
| @@ -678,7 +683,7 @@ immediately before the symbol name. (Case makes no difference in | |||
| 678 | recognizing these indicator words.) For example, if you write | 683 | recognizing these indicator words.) For example, if you write |
| 679 | 684 | ||
| 680 | @example | 685 | @example |
| 681 | This function sets the variable `buffer-file-name'. | 686 | This function sets the variable ‘buffer-file-name’. |
| 682 | @end example | 687 | @end example |
| 683 | 688 | ||
| 684 | @noindent | 689 | @noindent |
| @@ -691,7 +696,7 @@ you can write the words @samp{symbol} or @samp{program} before the | |||
| 691 | symbol name to prevent making any hyperlink. For example, | 696 | symbol name to prevent making any hyperlink. For example, |
| 692 | 697 | ||
| 693 | @example | 698 | @example |
| 694 | If the argument KIND-OF-RESULT is the symbol `list', | 699 | If the argument KIND-OF-RESULT is the symbol ‘list’, |
| 695 | this function returns a list of all the objects | 700 | this function returns a list of all the objects |
| 696 | that satisfy the criterion. | 701 | that satisfy the criterion. |
| 697 | @end example | 702 | @end example |
| @@ -710,21 +715,21 @@ followed by the word @samp{face}. In that case, only the face | |||
| 710 | documentation will be shown, even if the symbol is also defined as a | 715 | documentation will be shown, even if the symbol is also defined as a |
| 711 | variable or as a function. | 716 | variable or as a function. |
| 712 | 717 | ||
| 713 | To make a hyperlink to Info documentation, write the name of the Info | 718 | To make a hyperlink to Info documentation, write the single-quoted |
| 714 | node (or anchor) between grave accent and apostrophe, preceded by | 719 | name of the Info node (or anchor), preceded by |
| 715 | @samp{info node}, @samp{Info node}, @samp{info anchor} or @samp{Info | 720 | @samp{info node}, @samp{Info node}, @samp{info anchor} or @samp{Info |
| 716 | anchor}. The Info file name defaults to @samp{emacs}. For example, | 721 | anchor}. The Info file name defaults to @samp{emacs}. For example, |
| 717 | 722 | ||
| 718 | @smallexample | 723 | @smallexample |
| 719 | See Info node `Font Lock' and Info node `(elisp)Font Lock Basics'. | 724 | See Info node ‘Font Lock’ and Info node ‘(elisp)Font Lock Basics’. |
| 720 | @end smallexample | 725 | @end smallexample |
| 721 | 726 | ||
| 722 | Finally, to create a hyperlink to URLs, write the URL between grave | 727 | Finally, to create a hyperlink to URLs, write the single-quoted URL, |
| 723 | accent and apostrophe, preceded by @samp{URL}. For example, | 728 | preceded by @samp{URL}. For example, |
| 724 | 729 | ||
| 725 | @smallexample | 730 | @smallexample |
| 726 | The home page for the GNU project has more information (see URL | 731 | The home page for the GNU project has more information (see URL |
| 727 | `http://www.gnu.org/'). | 732 | ‘http://www.gnu.org/’). |
| 728 | @end smallexample | 733 | @end smallexample |
| 729 | 734 | ||
| 730 | @item | 735 | @item |
| @@ -908,6 +908,12 @@ directory at point. | |||
| 908 | *** New macros `thread-first' and `thread-last' allow threading a form | 908 | *** New macros `thread-first' and `thread-last' allow threading a form |
| 909 | as the first or last argument of subsequent forms. | 909 | as the first or last argument of subsequent forms. |
| 910 | 910 | ||
| 911 | ** Documentation strings now support quoting with curved single quotes | ||
| 912 | ‘like-this’ in addition to the old style with grave accent and | ||
| 913 | apostrophe `like-this'. The new style looks better on today's displays. | ||
| 914 | When an old-style string is copied to a help buffer it is converted to | ||
| 915 | the new style. | ||
| 916 | |||
| 911 | +++ | 917 | +++ |
| 912 | ** Time-related changes: | 918 | ** Time-related changes: |
| 913 | 919 | ||
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index 3c176aeaf05..35363337aee 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el | |||
| @@ -598,15 +598,16 @@ PROMPT, INITIAL, HIST, and DEFAULT are the same as for `completing-read'." | |||
| 598 | (defun overload-docstring-extension (overload) | 598 | (defun overload-docstring-extension (overload) |
| 599 | "Return the doc string that augments the description of OVERLOAD." | 599 | "Return the doc string that augments the description of OVERLOAD." |
| 600 | (let ((doc "\n\This function can be overloaded\ | 600 | (let ((doc "\n\This function can be overloaded\ |
| 601 | with `define-mode-local-override'.") | 601 | with ‘define-mode-local-override’.") |
| 602 | (sym (overload-obsoleted-by overload))) | 602 | (sym (overload-obsoleted-by overload))) |
| 603 | (when sym | 603 | (when sym |
| 604 | (setq doc (format "%s\nIt has made the overload `%s' obsolete since %s." | 604 | (setq doc (format "%s\nIt has made the overload ‘%s’ obsolete since %s." |
| 605 | doc sym (get sym 'overload-obsoleted-since)))) | 605 | doc sym (get sym 'overload-obsoleted-since)))) |
| 606 | (setq sym (overload-that-obsolete overload)) | 606 | (setq sym (overload-that-obsolete overload)) |
| 607 | (when sym | 607 | (when sym |
| 608 | (setq doc (format "%s\nThis overload is obsolete since %s;\nUse `%s' instead." | 608 | (setq doc (format |
| 609 | doc (get overload 'overload-obsoleted-since) sym))) | 609 | "%s\nThis overload is obsolete since %s;\nuse ‘%s’ instead." |
| 610 | doc (get overload 'overload-obsoleted-since) sym))) | ||
| 610 | doc)) | 611 | doc)) |
| 611 | 612 | ||
| 612 | (defun mode-local-augment-function-help (symbol) | 613 | (defun mode-local-augment-function-help (symbol) |
| @@ -629,9 +630,9 @@ SYMBOL is a function that can be overridden." | |||
| 629 | (defun mode-local-print-binding (symbol) | 630 | (defun mode-local-print-binding (symbol) |
| 630 | "Print the SYMBOL binding." | 631 | "Print the SYMBOL binding." |
| 631 | (let ((value (symbol-value symbol))) | 632 | (let ((value (symbol-value symbol))) |
| 632 | (princ (format "\n `%s' value is\n " symbol)) | 633 | (princ (format "\n ‘%s’ value is\n " symbol)) |
| 633 | (if (and value (symbolp value)) | 634 | (if (and value (symbolp value)) |
| 634 | (princ (format "`%s'" value)) | 635 | (princ (format "‘%s’" value)) |
| 635 | (let ((pt (point))) | 636 | (let ((pt (point))) |
| 636 | (pp value) | 637 | (pp value) |
| 637 | (save-excursion | 638 | (save-excursion |
| @@ -689,7 +690,7 @@ SYMBOL is a function that can be overridden." | |||
| 689 | ) | 690 | ) |
| 690 | ((symbolp buffer-or-mode) | 691 | ((symbolp buffer-or-mode) |
| 691 | (setq mode buffer-or-mode) | 692 | (setq mode buffer-or-mode) |
| 692 | (princ (format "`%s'\n" buffer-or-mode)) | 693 | (princ (format "‘%s’\n" buffer-or-mode)) |
| 693 | ) | 694 | ) |
| 694 | ((signal 'wrong-type-argument | 695 | ((signal 'wrong-type-argument |
| 695 | (list 'buffer-or-mode buffer-or-mode)))) | 696 | (list 'buffer-or-mode buffer-or-mode)))) |
| @@ -699,7 +700,7 @@ SYMBOL is a function that can be overridden." | |||
| 699 | (while mode | 700 | (while mode |
| 700 | (setq table (get mode 'mode-local-symbol-table)) | 701 | (setq table (get mode 'mode-local-symbol-table)) |
| 701 | (when table | 702 | (when table |
| 702 | (princ (format "\n- From `%s'\n" mode)) | 703 | (princ (format "\n- From ‘%s’\n" mode)) |
| 703 | (mode-local-print-bindings table)) | 704 | (mode-local-print-bindings table)) |
| 704 | (setq mode (get-mode-local-parent mode))))) | 705 | (setq mode (get-mode-local-parent mode))))) |
| 705 | 706 | ||
diff --git a/lisp/cedet/srecode/texi.el b/lisp/cedet/srecode/texi.el index be75f3765c1..b75a6609323 100644 --- a/lisp/cedet/srecode/texi.el +++ b/lisp/cedet/srecode/texi.el | |||
| @@ -253,7 +253,7 @@ that class. | |||
| 253 | [ stuff ] => @code{[ stuff ]} | 253 | [ stuff ] => @code{[ stuff ]} |
| 254 | Key => @kbd{Key} (key is C\\-h, M\\-h, SPC, RET, TAB and the like) | 254 | Key => @kbd{Key} (key is C\\-h, M\\-h, SPC, RET, TAB and the like) |
| 255 | ... => @dots{}" | 255 | ... => @dots{}" |
| 256 | (while (string-match "`\\([-a-zA-Z0-9<>.]+\\)'" string) | 256 | (while (string-match "[`‘]\\([-a-zA-Z0-9<>.]+\\)['’]" string) |
| 257 | (let* ((vs (substring string (match-beginning 1) (match-end 1))) | 257 | (let* ((vs (substring string (match-beginning 1) (match-end 1))) |
| 258 | (v (intern-soft vs))) | 258 | (v (intern-soft vs))) |
| 259 | (setq string | 259 | (setq string |
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 224d2c541b2..1321fbc4b7e 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el | |||
| @@ -492,10 +492,10 @@ It includes all faces in list FACES." | |||
| 492 | '("" "c"))) | 492 | '("" "c"))) |
| 493 | doc) | 493 | doc) |
| 494 | (when fn | 494 | (when fn |
| 495 | (princ " in `") | 495 | (princ " in ‘") |
| 496 | (help-insert-xref-button (file-name-nondirectory fn) | 496 | (help-insert-xref-button (file-name-nondirectory fn) |
| 497 | 'help-theme-def fn) | 497 | 'help-theme-def fn) |
| 498 | (princ "'")) | 498 | (princ "’")) |
| 499 | (princ ".\n") | 499 | (princ ".\n") |
| 500 | (if (custom-theme-p theme) | 500 | (if (custom-theme-p theme) |
| 501 | (progn | 501 | (progn |
| @@ -517,7 +517,7 @@ It includes all faces in list FACES." | |||
| 517 | (setq doc (nth 2 sexp))))))) | 517 | (setq doc (nth 2 sexp))))))) |
| 518 | (princ "\n\nDocumentation:\n") | 518 | (princ "\n\nDocumentation:\n") |
| 519 | (princ (if (stringp doc) | 519 | (princ (if (stringp doc) |
| 520 | doc | 520 | (substitute-command-keys doc) |
| 521 | "No documentation available."))) | 521 | "No documentation available."))) |
| 522 | (princ "\n\nYou can ") | 522 | (princ "\n\nYou can ") |
| 523 | (help-insert-xref-button "customize" 'help-theme-edit theme) | 523 | (help-insert-xref-button "customize" 'help-theme-edit theme) |
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 484b8cc43ad..c8641aed8bb 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -161,8 +161,8 @@ otherwise." | |||
| 161 | ;; Buttons | 161 | ;; Buttons |
| 162 | (when (and button (not (widgetp wid-button))) | 162 | (when (and button (not (widgetp wid-button))) |
| 163 | (newline) | 163 | (newline) |
| 164 | (insert "Here is a `" (format "%S" button-type) | 164 | (insert "Here is a ‘" (format "%S" button-type) |
| 165 | "' button labeled `" button-label "'.\n\n")) | 165 | "’ button labeled ‘" button-label "’.\n\n")) |
| 166 | ;; Overlays | 166 | ;; Overlays |
| 167 | (when overlays | 167 | (when overlays |
| 168 | (newline) | 168 | (newline) |
| @@ -738,7 +738,7 @@ relevant to POS." | |||
| 738 | (when face | 738 | (when face |
| 739 | (insert (propertize " " 'display '(space :align-to 5)) | 739 | (insert (propertize " " 'display '(space :align-to 5)) |
| 740 | "face: ") | 740 | "face: ") |
| 741 | (insert (concat "`" (symbol-name face) "'")) | 741 | (insert (concat "‘" (symbol-name face) "’")) |
| 742 | (insert "\n"))))) | 742 | (insert "\n"))))) |
| 743 | (insert "these terminal codes:\n") | 743 | (insert "these terminal codes:\n") |
| 744 | (dotimes (i (length disp-vector)) | 744 | (dotimes (i (length disp-vector)) |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 18361c8888f..4761ac5e6fc 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -1524,7 +1524,7 @@ may require more formatting") | |||
| 1524 | ;; Instead, use the `\\[...]' construct to stand for them. | 1524 | ;; Instead, use the `\\[...]' construct to stand for them. |
| 1525 | (save-excursion | 1525 | (save-excursion |
| 1526 | (let ((f nil) (m nil) (start (point)) | 1526 | (let ((f nil) (m nil) (start (point)) |
| 1527 | (re "[^`A-Za-z0-9_]\\([CMA]-[a-zA-Z]\\|\\(\\([CMA]-\\)?\ | 1527 | (re "[^`‘A-Za-z0-9_]\\([CMA]-[a-zA-Z]\\|\\(\\([CMA]-\\)?\ |
| 1528 | mouse-[0-3]\\)\\)\\>")) | 1528 | mouse-[0-3]\\)\\)\\>")) |
| 1529 | ;; Find the first key sequence not in a sample | 1529 | ;; Find the first key sequence not in a sample |
| 1530 | (while (and (not f) (setq m (re-search-forward re e t))) | 1530 | (while (and (not f) (setq m (re-search-forward re e t))) |
| @@ -1554,7 +1554,8 @@ mouse-[0-3]\\)\\)\\>")) | |||
| 1554 | (save-excursion | 1554 | (save-excursion |
| 1555 | (let ((case-fold-search t) | 1555 | (let ((case-fold-search t) |
| 1556 | (ret nil) mb me) | 1556 | (ret nil) mb me) |
| 1557 | (while (and (re-search-forward "`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'" e t) | 1557 | (while (and (re-search-forward |
| 1558 | "[`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]" e t) | ||
| 1558 | (not ret)) | 1559 | (not ret)) |
| 1559 | (let* ((ms1 (match-string 1)) | 1560 | (let* ((ms1 (match-string 1)) |
| 1560 | (sym (intern-soft ms1))) | 1561 | (sym (intern-soft ms1))) |
| @@ -1785,16 +1786,17 @@ Replace with \"%s\"? " original replace) | |||
| 1785 | ))) | 1786 | ))) |
| 1786 | ;;* When a documentation string refers to a Lisp symbol, write it as | 1787 | ;;* When a documentation string refers to a Lisp symbol, write it as |
| 1787 | ;; it would be printed (which usually means in lower case), with | 1788 | ;; it would be printed (which usually means in lower case), with |
| 1788 | ;; single-quotes around it. For example: `lambda'. There are two | 1789 | ;; single-quotes around it. For example: ‘lambda’. There are two |
| 1789 | ;; exceptions: write t and nil without single-quotes. (In this | 1790 | ;; exceptions: write t and nil without single-quotes. (For |
| 1790 | ;; manual, we normally do use single-quotes for those symbols.) | 1791 | ;; compatibility with an older Emacs style, quoting with ` and ' |
| 1792 | ;; also works, e.g., `lambda' is treated like ‘lambda’.) | ||
| 1791 | (save-excursion | 1793 | (save-excursion |
| 1792 | (let ((found nil) (start (point)) (msg nil) (ms nil)) | 1794 | (let ((found nil) (start (point)) (msg nil) (ms nil)) |
| 1793 | (while (and (not msg) | 1795 | (while (and (not msg) |
| 1794 | (re-search-forward | 1796 | (re-search-forward |
| 1795 | ;; Ignore manual page references like | 1797 | ;; Ignore manual page references like |
| 1796 | ;; git-config(1). | 1798 | ;; git-config(1). |
| 1797 | "[^-([`':a-zA-Z]\\(\\w+[:-]\\(\\w\\|\\s_\\)+\\)[^](']" | 1799 | "[^-([`'‘’:a-zA-Z]\\(\\w+[:-]\\(\\w\\|\\s_\\)+\\)[^]('’]" |
| 1798 | e t)) | 1800 | e t)) |
| 1799 | (setq ms (match-string 1)) | 1801 | (setq ms (match-string 1)) |
| 1800 | ;; A . is a \s_ char, so we must remove periods from | 1802 | ;; A . is a \s_ char, so we must remove periods from |
| @@ -1812,7 +1814,7 @@ Replace with \"%s\"? " original replace) | |||
| 1812 | (if (checkdoc-autofix-ask-replace | 1814 | (if (checkdoc-autofix-ask-replace |
| 1813 | (match-beginning 1) (+ (match-beginning 1) | 1815 | (match-beginning 1) (+ (match-beginning 1) |
| 1814 | (length ms)) | 1816 | (length ms)) |
| 1815 | msg (concat "`" ms "'") t) | 1817 | msg (concat "‘" ms "’") t) |
| 1816 | (setq msg nil) | 1818 | (setq msg nil) |
| 1817 | (setq msg | 1819 | (setq msg |
| 1818 | (format "Lisp symbol `%s' should appear in quotes" | 1820 | (format "Lisp symbol `%s' should appear in quotes" |
| @@ -1824,7 +1826,7 @@ Replace with \"%s\"? " original replace) | |||
| 1824 | nil))) | 1826 | nil))) |
| 1825 | ;; t and nil case | 1827 | ;; t and nil case |
| 1826 | (save-excursion | 1828 | (save-excursion |
| 1827 | (if (re-search-forward "\\(`\\(t\\|nil\\)'\\)" e t) | 1829 | (if (re-search-forward "\\([`‘]\\(t\\|nil\\)['’]\\)" e t) |
| 1828 | (if (checkdoc-autofix-ask-replace | 1830 | (if (checkdoc-autofix-ask-replace |
| 1829 | (match-beginning 1) (match-end 1) | 1831 | (match-beginning 1) (match-end 1) |
| 1830 | (format "%s should not appear in quotes. Remove? " | 1832 | (format "%s should not appear in quotes. Remove? " |
| @@ -1989,7 +1991,7 @@ If the offending word is in a piece of quoted text, then it is skipped." | |||
| 1989 | (if (and (not (save-excursion | 1991 | (if (and (not (save-excursion |
| 1990 | (goto-char b) | 1992 | (goto-char b) |
| 1991 | (forward-char -1) | 1993 | (forward-char -1) |
| 1992 | (looking-at "`\\|\"\\|\\.\\|\\\\"))) | 1994 | (looking-at "[`\".‘]\\|\\\\"))) |
| 1993 | ;; surrounded by /, as in a URL or filename: /emacs/ | 1995 | ;; surrounded by /, as in a URL or filename: /emacs/ |
| 1994 | (not (and (= ?/ (char-after e)) | 1996 | (not (and (= ?/ (char-after e)) |
| 1995 | (= ?/ (char-before b)))) | 1997 | (= ?/ (char-before b)))) |
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 24a04d445de..96b86aa21cc 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el | |||
| @@ -876,11 +876,11 @@ Can only be used from within the lexical body of a primary or around method." | |||
| 876 | (cl--generic-method-specializers method))) | 876 | (cl--generic-method-specializers method))) |
| 877 | (file (find-lisp-object-file-name met-name 'cl-defmethod))) | 877 | (file (find-lisp-object-file-name met-name 'cl-defmethod))) |
| 878 | (when file | 878 | (when file |
| 879 | (insert " in `") | 879 | (insert " in ‘") |
| 880 | (help-insert-xref-button (help-fns-short-filename file) | 880 | (help-insert-xref-button (help-fns-short-filename file) |
| 881 | 'help-function-def met-name file | 881 | 'help-function-def met-name file |
| 882 | 'cl-defmethod) | 882 | 'cl-defmethod) |
| 883 | (insert "'.\n"))) | 883 | (insert "’.\n"))) |
| 884 | (insert "\n" (or (nth 2 info) "Undocumented") "\n\n"))))))) | 884 | (insert "\n" (or (nth 2 info) "Undocumented") "\n\n"))))))) |
| 885 | 885 | ||
| 886 | ;;; Support for (head <val>) specializers. | 886 | ;;; Support for (head <val>) specializers. |
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 02b89e043e4..11d99849a97 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el | |||
| @@ -90,11 +90,11 @@ If CLASS is actually an object, then also display current values of that object. | |||
| 90 | " class") | 90 | " class") |
| 91 | (let ((location (find-lisp-object-file-name class 'eieio-defclass))) | 91 | (let ((location (find-lisp-object-file-name class 'eieio-defclass))) |
| 92 | (when location | 92 | (when location |
| 93 | (insert " in `") | 93 | (insert " in ‘") |
| 94 | (help-insert-xref-button | 94 | (help-insert-xref-button |
| 95 | (help-fns-short-filename location) | 95 | (help-fns-short-filename location) |
| 96 | 'eieio-class-def class location 'eieio-defclass) | 96 | 'eieio-class-def class location 'eieio-defclass) |
| 97 | (insert "'"))) | 97 | (insert "’"))) |
| 98 | (insert ".\n") | 98 | (insert ".\n") |
| 99 | ;; Parents | 99 | ;; Parents |
| 100 | (let ((pl (eieio-class-parents class)) | 100 | (let ((pl (eieio-class-parents class)) |
| @@ -103,10 +103,10 @@ If CLASS is actually an object, then also display current values of that object. | |||
| 103 | (insert " Inherits from ") | 103 | (insert " Inherits from ") |
| 104 | (while (setq cur (pop pl)) | 104 | (while (setq cur (pop pl)) |
| 105 | (setq cur (eieio--class-name cur)) | 105 | (setq cur (eieio--class-name cur)) |
| 106 | (insert "`") | 106 | (insert "‘") |
| 107 | (help-insert-xref-button (symbol-name cur) | 107 | (help-insert-xref-button (symbol-name cur) |
| 108 | 'help-function cur) | 108 | 'help-function cur) |
| 109 | (insert (if pl "', " "'"))) | 109 | (insert (if pl "’, " "’"))) |
| 110 | (insert ".\n"))) | 110 | (insert ".\n"))) |
| 111 | ;; Children | 111 | ;; Children |
| 112 | (let ((ch (eieio-class-children class)) | 112 | (let ((ch (eieio-class-children class)) |
| @@ -114,10 +114,10 @@ If CLASS is actually an object, then also display current values of that object. | |||
| 114 | (when ch | 114 | (when ch |
| 115 | (insert " Children ") | 115 | (insert " Children ") |
| 116 | (while (setq cur (pop ch)) | 116 | (while (setq cur (pop ch)) |
| 117 | (insert "`") | 117 | (insert "‘") |
| 118 | (help-insert-xref-button (symbol-name cur) | 118 | (help-insert-xref-button (symbol-name cur) |
| 119 | 'help-function cur) | 119 | 'help-function cur) |
| 120 | (insert (if ch "', " "'"))) | 120 | (insert (if ch "’, " "’"))) |
| 121 | (insert ".\n"))) | 121 | (insert ".\n"))) |
| 122 | ;; System documentation | 122 | ;; System documentation |
| 123 | (let ((doc (documentation-property class 'variable-documentation))) | 123 | (let ((doc (documentation-property class 'variable-documentation))) |
| @@ -130,9 +130,9 @@ If CLASS is actually an object, then also display current values of that object. | |||
| 130 | (when generics | 130 | (when generics |
| 131 | (insert (propertize "Specialized Methods:\n\n" 'face 'bold)) | 131 | (insert (propertize "Specialized Methods:\n\n" 'face 'bold)) |
| 132 | (dolist (generic generics) | 132 | (dolist (generic generics) |
| 133 | (insert "`") | 133 | (insert "‘") |
| 134 | (help-insert-xref-button (symbol-name generic) 'help-function generic) | 134 | (help-insert-xref-button (symbol-name generic) 'help-function generic) |
| 135 | (insert "'") | 135 | (insert "’") |
| 136 | (pcase-dolist (`(,qualifiers ,args ,doc) | 136 | (pcase-dolist (`(,qualifiers ,args ,doc) |
| 137 | (eieio-method-documentation generic class)) | 137 | (eieio-method-documentation generic class)) |
| 138 | (insert (format " %s%S\n" qualifiers args) | 138 | (insert (format " %s%S\n" qualifiers args) |
| @@ -245,11 +245,11 @@ are not abstract." | |||
| 245 | (setq location | 245 | (setq location |
| 246 | (find-lisp-object-file-name ctr def))) | 246 | (find-lisp-object-file-name ctr def))) |
| 247 | (when location | 247 | (when location |
| 248 | (insert " in `") | 248 | (insert " in ‘") |
| 249 | (help-insert-xref-button | 249 | (help-insert-xref-button |
| 250 | (help-fns-short-filename location) | 250 | (help-fns-short-filename location) |
| 251 | 'eieio-class-def ctr location 'eieio-defclass) | 251 | 'eieio-class-def ctr location 'eieio-defclass) |
| 252 | (insert "'")) | 252 | (insert "’")) |
| 253 | (insert ".\nCreates an object of class " (symbol-name ctr) ".") | 253 | (insert ".\nCreates an object of class " (symbol-name ctr) ".") |
| 254 | (goto-char (point-max)) | 254 | (goto-char (point-max)) |
| 255 | (if (autoloadp def) | 255 | (if (autoloadp def) |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 6facf576055..ab01a109b7a 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -403,8 +403,8 @@ | |||
| 403 | ;; Words inside \\[] tend to be for `substitute-command-keys'. | 403 | ;; Words inside \\[] tend to be for `substitute-command-keys'. |
| 404 | ("\\\\\\\\\\[\\(\\(?:\\sw\\|\\s_\\)+\\)\\]" | 404 | ("\\\\\\\\\\[\\(\\(?:\\sw\\|\\s_\\)+\\)\\]" |
| 405 | (1 font-lock-constant-face prepend)) | 405 | (1 font-lock-constant-face prepend)) |
| 406 | ;; Words inside `' tend to be symbol names. | 406 | ;; Words inside ‘’ and `' tend to be symbol names. |
| 407 | ("`\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)'" | 407 | ("[`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]" |
| 408 | (1 font-lock-constant-face prepend)) | 408 | (1 font-lock-constant-face prepend)) |
| 409 | ;; Constant values. | 409 | ;; Constant values. |
| 410 | ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) | 410 | ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) |
| @@ -452,8 +452,8 @@ | |||
| 452 | ;; Erroneous structures. | 452 | ;; Erroneous structures. |
| 453 | (,(concat "(" cl-errs-re "\\_>") | 453 | (,(concat "(" cl-errs-re "\\_>") |
| 454 | (1 font-lock-warning-face)) | 454 | (1 font-lock-warning-face)) |
| 455 | ;; Words inside `' tend to be symbol names. | 455 | ;; Words inside ‘’ and `' tend to be symbol names. |
| 456 | ("`\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)'" | 456 | ("[`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]" |
| 457 | (1 font-lock-constant-face prepend)) | 457 | (1 font-lock-constant-face prepend)) |
| 458 | ;; Constant values. | 458 | ;; Constant values. |
| 459 | ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) | 459 | ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 3d5afa3edd2..97e6bd63da9 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -2137,17 +2137,17 @@ will be deleted." | |||
| 2137 | "Installed" | 2137 | "Installed" |
| 2138 | (capitalize status)) ;FIXME: Why comment-face? | 2138 | (capitalize status)) ;FIXME: Why comment-face? |
| 2139 | 'font-lock-face 'font-lock-comment-face)) | 2139 | 'font-lock-face 'font-lock-comment-face)) |
| 2140 | (insert " in `") | 2140 | (insert " in ‘") |
| 2141 | ;; Todo: Add button for uninstalling. | 2141 | ;; Todo: Add button for uninstalling. |
| 2142 | (help-insert-xref-button (abbreviate-file-name | 2142 | (help-insert-xref-button (abbreviate-file-name |
| 2143 | (file-name-as-directory pkg-dir)) | 2143 | (file-name-as-directory pkg-dir)) |
| 2144 | 'help-package-def pkg-dir) | 2144 | 'help-package-def pkg-dir) |
| 2145 | (if (and (package-built-in-p name) | 2145 | (if (and (package-built-in-p name) |
| 2146 | (not (package-built-in-p name version))) | 2146 | (not (package-built-in-p name version))) |
| 2147 | (insert "',\n shadowing a " | 2147 | (insert "’,\n shadowing a " |
| 2148 | (propertize "built-in package" | 2148 | (propertize "built-in package" |
| 2149 | 'font-lock-face 'font-lock-builtin-face)) | 2149 | 'font-lock-face 'font-lock-builtin-face)) |
| 2150 | (insert "'")) | 2150 | (insert "’")) |
| 2151 | (if signed | 2151 | (if signed |
| 2152 | (insert ".") | 2152 | (insert ".") |
| 2153 | (insert " (unsigned).")) | 2153 | (insert " (unsigned).")) |
diff --git a/lisp/faces.el b/lisp/faces.el index f6b11074af0..4366c0b9f23 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1428,18 +1428,19 @@ If FRAME is omitted or nil, use the selected frame." | |||
| 1428 | (when alias | 1428 | (when alias |
| 1429 | (setq face alias) | 1429 | (setq face alias) |
| 1430 | (insert | 1430 | (insert |
| 1431 | (format "\n %s is an alias for the face `%s'.\n%s" | 1431 | (format "\n %s is an alias for the face ‘%s’.\n%s" |
| 1432 | f alias | 1432 | f alias |
| 1433 | (if (setq obsolete (get f 'obsolete-face)) | 1433 | (if (setq obsolete (get f 'obsolete-face)) |
| 1434 | (format " This face is obsolete%s; use `%s' instead.\n" | 1434 | (format " This face is obsolete%s; use ‘%s’ instead.\n" |
| 1435 | (if (stringp obsolete) | 1435 | (if (stringp obsolete) |
| 1436 | (format " since %s" obsolete) | 1436 | (format " since %s" obsolete) |
| 1437 | "") | 1437 | "") |
| 1438 | alias) | 1438 | alias) |
| 1439 | "")))) | 1439 | "")))) |
| 1440 | (insert "\nDocumentation:\n" | 1440 | (insert "\nDocumentation:\n" |
| 1441 | (or (face-documentation face) | 1441 | (substitute-command-keys |
| 1442 | "Not documented as a face.") | 1442 | (or (face-documentation face) |
| 1443 | "Not documented as a face.")) | ||
| 1443 | "\n\n")) | 1444 | "\n\n")) |
| 1444 | (with-current-buffer standard-output | 1445 | (with-current-buffer standard-output |
| 1445 | (save-excursion | 1446 | (save-excursion |
| @@ -1448,12 +1449,12 @@ If FRAME is omitted or nil, use the selected frame." | |||
| 1448 | (help-xref-button 1 'help-customize-face f))) | 1449 | (help-xref-button 1 'help-customize-face f))) |
| 1449 | (setq file-name (find-lisp-object-file-name f 'defface)) | 1450 | (setq file-name (find-lisp-object-file-name f 'defface)) |
| 1450 | (when file-name | 1451 | (when file-name |
| 1451 | (princ "Defined in `") | 1452 | (princ "Defined in ‘") |
| 1452 | (princ (file-name-nondirectory file-name)) | 1453 | (princ (file-name-nondirectory file-name)) |
| 1453 | (princ "'") | 1454 | (princ "’") |
| 1454 | ;; Make a hyperlink to the library. | 1455 | ;; Make a hyperlink to the library. |
| 1455 | (save-excursion | 1456 | (save-excursion |
| 1456 | (re-search-backward "`\\([^`']+\\)'" nil t) | 1457 | (re-search-backward "‘\\([^‘’]+\\)’" nil t) |
| 1457 | (help-xref-button 1 'help-face-def f file-name)) | 1458 | (help-xref-button 1 'help-face-def f file-name)) |
| 1458 | (princ ".") | 1459 | (princ ".") |
| 1459 | (terpri) | 1460 | (terpri) |
diff --git a/lisp/finder.el b/lisp/finder.el index 47fab3cdc3d..306f2e27d57 100644 --- a/lisp/finder.el +++ b/lisp/finder.el | |||
| @@ -115,7 +115,7 @@ Each element has the form (KEYWORD . DESCRIPTION).") | |||
| 115 | "Syntax table used while in `finder-mode'.") | 115 | "Syntax table used while in `finder-mode'.") |
| 116 | 116 | ||
| 117 | (defvar finder-font-lock-keywords | 117 | (defvar finder-font-lock-keywords |
| 118 | '(("`\\([^'`]+\\)'" 1 font-lock-constant-face prepend)) | 118 | '(("[`‘]\\([^'`‘’]+\\)['’]" 1 font-lock-constant-face prepend)) |
| 119 | "Font-lock keywords for Finder mode.") | 119 | "Font-lock keywords for Finder mode.") |
| 120 | 120 | ||
| 121 | (defvar finder-headmark nil | 121 | (defvar finder-headmark nil |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7630afbdcf4..0ac9fb5b4de 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -7827,11 +7827,11 @@ positives are possible." | |||
| 7827 | ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]" | 7827 | ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]" |
| 7828 | ;; Exclude [.?] for URLs in gmane.emacs.cvs | 7828 | ;; Exclude [.?] for URLs in gmane.emacs.cvs |
| 7829 | 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) | 7829 | 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) |
| 7830 | ("`\\([a-z][-a-z0-9]+\\.el\\)'" | 7830 | ("[`‘]\\([a-z][-a-z0-9]+\\.el\\)['’]" |
| 7831 | 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) | 7831 | 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) |
| 7832 | ("`\\([a-z][a-z0-9]+-[a-z0-9]+-[-a-z0-9]*[a-z]\\|\\(gnus\\|message\\)-[-a-z]+\\)'" | 7832 | ("[`‘]\\([a-z][a-z0-9]+-[a-z0-9]+-[-a-z0-9]*[a-z]\\|\\(gnus\\|message\\)-[-a-z]+\\)['’]" |
| 7833 | 0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1) | 7833 | 0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1) |
| 7834 | ("`\\([a-z][a-z0-9]+-[a-z]+\\)'" | 7834 | ("[`‘]\\([a-z][a-z0-9]+-[a-z]+\\)['’]" |
| 7835 | 0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1) | 7835 | 0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1) |
| 7836 | ("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)" | 7836 | ("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)" |
| 7837 | 1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1) | 7837 | 1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1) |
| @@ -7841,7 +7841,7 @@ positives are possible." | |||
| 7841 | 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2) | 7841 | 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2) |
| 7842 | ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" | 7842 | ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" |
| 7843 | 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2) | 7843 | 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2) |
| 7844 | ("`\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'" | 7844 | ("[`‘]\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^'’]+\\)\\)['’]" |
| 7845 | ;; Unlike the other regexps we really have to require quoting | 7845 | ;; Unlike the other regexps we really have to require quoting |
| 7846 | ;; here to determine where it ends. | 7846 | ;; here to determine where it ends. |
| 7847 | 1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3) | 7847 | 1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3) |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 4982ee54f46..346e1e158c2 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -135,7 +135,7 @@ if the variable `help-downcase-arguments' is non-nil." | |||
| 135 | "\\)" | 135 | "\\)" |
| 136 | "\\(?:es\\|s\\|th\\)?" ; for ARGth, ARGs | 136 | "\\(?:es\\|s\\|th\\)?" ; for ARGth, ARGs |
| 137 | "\\(?:-[a-z0-9-]+\\)?" ; for ARG-xxx, ARG-n | 137 | "\\(?:-[a-z0-9-]+\\)?" ; for ARG-xxx, ARG-n |
| 138 | "\\(?:-[{([<`\"].*?\\)?"; for ARG-{x}, (x), <x>, [x], `x' | 138 | "\\(?:-[{([<`\"‘].*?\\)?"; for ARG-{x}, (x), <x>, [x], `x', ‘x’ |
| 139 | "\\>") ; end of word | 139 | "\\>") ; end of word |
| 140 | (help-highlight-arg arg) | 140 | (help-highlight-arg arg) |
| 141 | doc t t 1))) | 141 | doc t t 1))) |
| @@ -306,7 +306,7 @@ suitable file is found, return nil." | |||
| 306 | (when remapped | 306 | (when remapped |
| 307 | (princ "Its keys are remapped to ") | 307 | (princ "Its keys are remapped to ") |
| 308 | (princ (if (symbolp remapped) | 308 | (princ (if (symbolp remapped) |
| 309 | (concat "`" (symbol-name remapped) "'") | 309 | (concat "‘" (symbol-name remapped) "’") |
| 310 | "an anonymous command")) | 310 | "an anonymous command")) |
| 311 | (princ ".\n")) | 311 | (princ ".\n")) |
| 312 | 312 | ||
| @@ -340,16 +340,16 @@ suitable file is found, return nil." | |||
| 340 | (insert "\nThis function has a compiler macro") | 340 | (insert "\nThis function has a compiler macro") |
| 341 | (if (symbolp handler) | 341 | (if (symbolp handler) |
| 342 | (progn | 342 | (progn |
| 343 | (insert (format " `%s'" handler)) | 343 | (insert (format " ‘%s’" handler)) |
| 344 | (save-excursion | 344 | (save-excursion |
| 345 | (re-search-backward "`\\([^`']+\\)'" nil t) | 345 | (re-search-backward "‘\\([^‘’]+\\)’" nil t) |
| 346 | (help-xref-button 1 'help-function handler))) | 346 | (help-xref-button 1 'help-function handler))) |
| 347 | ;; FIXME: Obsolete since 24.4. | 347 | ;; FIXME: Obsolete since 24.4. |
| 348 | (let ((lib (get function 'compiler-macro-file))) | 348 | (let ((lib (get function 'compiler-macro-file))) |
| 349 | (when (stringp lib) | 349 | (when (stringp lib) |
| 350 | (insert (format " in `%s'" lib)) | 350 | (insert (format " in ‘%s’" lib)) |
| 351 | (save-excursion | 351 | (save-excursion |
| 352 | (re-search-backward "`\\([^`']+\\)'" nil t) | 352 | (re-search-backward "‘\\([^‘’]+\\)’" nil t) |
| 353 | (help-xref-button 1 'help-function-cmacro function lib))))) | 353 | (help-xref-button 1 'help-function-cmacro function lib))))) |
| 354 | (insert ".\n")))) | 354 | (insert ".\n")))) |
| 355 | 355 | ||
| @@ -393,13 +393,13 @@ suitable file is found, return nil." | |||
| 393 | (get function | 393 | (get function |
| 394 | 'derived-mode-parent)))) | 394 | 'derived-mode-parent)))) |
| 395 | (when parent-mode | 395 | (when parent-mode |
| 396 | (insert "\nParent mode: `") | 396 | (insert "\nParent mode: ‘") |
| 397 | (let ((beg (point))) | 397 | (let ((beg (point))) |
| 398 | (insert (format "%s" parent-mode)) | 398 | (insert (format "%s" parent-mode)) |
| 399 | (make-text-button beg (point) | 399 | (make-text-button beg (point) |
| 400 | 'type 'help-function | 400 | 'type 'help-function |
| 401 | 'help-args (list parent-mode))) | 401 | 'help-args (list parent-mode))) |
| 402 | (insert "'.\n")))) | 402 | (insert "’.\n")))) |
| 403 | 403 | ||
| 404 | (defun help-fns--obsolete (function) | 404 | (defun help-fns--obsolete (function) |
| 405 | ;; Ignore lambda constructs, keyboard macros, etc. | 405 | ;; Ignore lambda constructs, keyboard macros, etc. |
| @@ -415,7 +415,7 @@ suitable file is found, return nil." | |||
| 415 | (when (nth 2 obsolete) | 415 | (when (nth 2 obsolete) |
| 416 | (insert (format " since %s" (nth 2 obsolete)))) | 416 | (insert (format " since %s" (nth 2 obsolete)))) |
| 417 | (insert (cond ((stringp use) (concat ";\n" use)) | 417 | (insert (cond ((stringp use) (concat ";\n" use)) |
| 418 | (use (format ";\nuse `%s' instead." use)) | 418 | (use (format ";\nuse ‘%s’ instead." use)) |
| 419 | (t ".")) | 419 | (t ".")) |
| 420 | "\n")))) | 420 | "\n")))) |
| 421 | 421 | ||
| @@ -451,7 +451,7 @@ FILE is the file where FUNCTION was probably defined." | |||
| 451 | (format ";\nin Lisp code %s" interactive-only)) | 451 | (format ";\nin Lisp code %s" interactive-only)) |
| 452 | ((and (symbolp 'interactive-only) | 452 | ((and (symbolp 'interactive-only) |
| 453 | (not (eq interactive-only t))) | 453 | (not (eq interactive-only t))) |
| 454 | (format ";\nin Lisp code use `%s' instead." | 454 | (format ";\nin Lisp code use ‘%s’ instead." |
| 455 | interactive-only)) | 455 | interactive-only)) |
| 456 | (t ".")) | 456 | (t ".")) |
| 457 | "\n"))))) | 457 | "\n"))))) |
| @@ -520,7 +520,7 @@ FILE is the file where FUNCTION was probably defined." | |||
| 520 | ;; Aliases are Lisp functions, so we need to check | 520 | ;; Aliases are Lisp functions, so we need to check |
| 521 | ;; aliases before functions. | 521 | ;; aliases before functions. |
| 522 | (aliased | 522 | (aliased |
| 523 | (format "an alias for `%s'" real-def)) | 523 | (format "an alias for ‘%s’" real-def)) |
| 524 | ((autoloadp def) | 524 | ((autoloadp def) |
| 525 | (format "%s autoloaded %s" | 525 | (format "%s autoloaded %s" |
| 526 | (if (commandp def) "an interactive" "an") | 526 | (if (commandp def) "an interactive" "an") |
| @@ -554,21 +554,21 @@ FILE is the file where FUNCTION was probably defined." | |||
| 554 | (with-current-buffer standard-output | 554 | (with-current-buffer standard-output |
| 555 | (save-excursion | 555 | (save-excursion |
| 556 | (save-match-data | 556 | (save-match-data |
| 557 | (when (re-search-backward "alias for `\\([^`']+\\)'" nil t) | 557 | (when (re-search-backward "alias for ‘\\([^‘’]+\\)’" nil t) |
| 558 | (help-xref-button 1 'help-function real-def))))) | 558 | (help-xref-button 1 'help-function real-def))))) |
| 559 | 559 | ||
| 560 | (when file-name | 560 | (when file-name |
| 561 | (princ " in `") | 561 | (princ " in ‘") |
| 562 | ;; We used to add .el to the file name, | 562 | ;; We used to add .el to the file name, |
| 563 | ;; but that's completely wrong when the user used load-file. | 563 | ;; but that's completely wrong when the user used load-file. |
| 564 | (princ (if (eq file-name 'C-source) | 564 | (princ (if (eq file-name 'C-source) |
| 565 | "C source code" | 565 | "C source code" |
| 566 | (help-fns-short-filename file-name))) | 566 | (help-fns-short-filename file-name))) |
| 567 | (princ "'") | 567 | (princ "’") |
| 568 | ;; Make a hyperlink to the library. | 568 | ;; Make a hyperlink to the library. |
| 569 | (with-current-buffer standard-output | 569 | (with-current-buffer standard-output |
| 570 | (save-excursion | 570 | (save-excursion |
| 571 | (re-search-backward "`\\([^`']+\\)'" nil t) | 571 | (re-search-backward "‘\\([^‘’]+\\)’" nil t) |
| 572 | (help-xref-button 1 'help-function-def function file-name)))) | 572 | (help-xref-button 1 'help-function-def function file-name)))) |
| 573 | (princ ".") | 573 | (princ ".") |
| 574 | (with-current-buffer (help-buffer) | 574 | (with-current-buffer (help-buffer) |
| @@ -702,14 +702,14 @@ it is displayed along with the global value." | |||
| 702 | 702 | ||
| 703 | (if file-name | 703 | (if file-name |
| 704 | (progn | 704 | (progn |
| 705 | (princ " is a variable defined in `") | 705 | (princ " is a variable defined in ‘") |
| 706 | (princ (if (eq file-name 'C-source) | 706 | (princ (if (eq file-name 'C-source) |
| 707 | "C source code" | 707 | "C source code" |
| 708 | (file-name-nondirectory file-name))) | 708 | (file-name-nondirectory file-name))) |
| 709 | (princ "'.\n") | 709 | (princ "’.\n") |
| 710 | (with-current-buffer standard-output | 710 | (with-current-buffer standard-output |
| 711 | (save-excursion | 711 | (save-excursion |
| 712 | (re-search-backward "`\\([^`']+\\)'" nil t) | 712 | (re-search-backward "‘\\([^‘’]+\\)’" nil t) |
| 713 | (help-xref-button 1 'help-variable-def | 713 | (help-xref-button 1 'help-variable-def |
| 714 | variable file-name))) | 714 | variable file-name))) |
| 715 | (if valvoid | 715 | (if valvoid |
| @@ -839,7 +839,8 @@ if it is given a local binding.\n"))) | |||
| 839 | ;; Mention if it's an alias. | 839 | ;; Mention if it's an alias. |
| 840 | (unless (eq alias variable) | 840 | (unless (eq alias variable) |
| 841 | (setq extra-line t) | 841 | (setq extra-line t) |
| 842 | (princ (format " This variable is an alias for `%s'.\n" alias))) | 842 | (princ (format " This variable is an alias for ‘%s’.\n" |
| 843 | alias))) | ||
| 843 | 844 | ||
| 844 | (when obsolete | 845 | (when obsolete |
| 845 | (setq extra-line t) | 846 | (setq extra-line t) |
| @@ -847,7 +848,8 @@ if it is given a local binding.\n"))) | |||
| 847 | (if (nth 2 obsolete) | 848 | (if (nth 2 obsolete) |
| 848 | (princ (format " since %s" (nth 2 obsolete)))) | 849 | (princ (format " since %s" (nth 2 obsolete)))) |
| 849 | (princ (cond ((stringp use) (concat ";\n " use)) | 850 | (princ (cond ((stringp use) (concat ";\n " use)) |
| 850 | (use (format ";\n use `%s' instead." (car obsolete))) | 851 | (use (format ";\n use ‘%s’ instead." |
| 852 | (car obsolete))) | ||
| 851 | (t "."))) | 853 | (t "."))) |
| 852 | (terpri)) | 854 | (terpri)) |
| 853 | 855 | ||
| @@ -878,13 +880,13 @@ if it is given a local binding.\n"))) | |||
| 878 | (setq file (car file) | 880 | (setq file (car file) |
| 879 | dir-file nil))) | 881 | dir-file nil))) |
| 880 | (princ (if dir-file | 882 | (princ (if dir-file |
| 881 | "by the file\n `" | 883 | "by the file\n ‘" |
| 882 | "for the directory\n `")) | 884 | "for the directory\n ‘")) |
| 883 | (with-current-buffer standard-output | 885 | (with-current-buffer standard-output |
| 884 | (insert-text-button | 886 | (insert-text-button |
| 885 | file 'type 'help-dir-local-var-def | 887 | file 'type 'help-dir-local-var-def |
| 886 | 'help-args (list variable file))) | 888 | 'help-args (list variable file))) |
| 887 | (princ "'.\n"))) | 889 | (princ "’.\n"))) |
| 888 | (princ " This variable's value is file-local.\n"))) | 890 | (princ " This variable's value is file-local.\n"))) |
| 889 | 891 | ||
| 890 | (when (memq variable ignored-local-variables) | 892 | (when (memq variable ignored-local-variables) |
| @@ -899,7 +901,7 @@ variable.\n")) | |||
| 899 | file-local variable.\n") | 901 | file-local variable.\n") |
| 900 | (when (assq variable safe-local-variable-values) | 902 | (when (assq variable safe-local-variable-values) |
| 901 | (princ " However, you have added it to \ | 903 | (princ " However, you have added it to \ |
| 902 | `safe-local-variable-values'.\n"))) | 904 | ‘safe-local-variable-values’.\n"))) |
| 903 | 905 | ||
| 904 | (when safe-var | 906 | (when safe-var |
| 905 | (setq extra-line t) | 907 | (setq extra-line t) |
| @@ -907,7 +909,7 @@ file-local variable.\n") | |||
| 907 | (princ "if its value\n satisfies the predicate ") | 909 | (princ "if its value\n satisfies the predicate ") |
| 908 | (princ (if (byte-code-function-p safe-var) | 910 | (princ (if (byte-code-function-p safe-var) |
| 909 | "which is a byte-compiled expression.\n" | 911 | "which is a byte-compiled expression.\n" |
| 910 | (format "`%s'.\n" safe-var)))) | 912 | (format "‘%s’.\n" safe-var)))) |
| 911 | 913 | ||
| 912 | (if extra-line (terpri)) | 914 | (if extra-line (terpri)) |
| 913 | (princ "Documentation:\n") | 915 | (princ "Documentation:\n") |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index f99e9165bce..3fc0ad2b403 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -322,7 +322,7 @@ Commands: | |||
| 322 | "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" | 322 | "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" |
| 323 | "[ \t\n]+\\)?" | 323 | "[ \t\n]+\\)?" |
| 324 | ;; Note starting with word-syntax character: | 324 | ;; Note starting with word-syntax character: |
| 325 | "`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'")) | 325 | "[`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]")) |
| 326 | "Regexp matching doc string references to symbols. | 326 | "Regexp matching doc string references to symbols. |
| 327 | 327 | ||
| 328 | The words preceding the quoted symbol can be used in doc strings to | 328 | The words preceding the quoted symbol can be used in doc strings to |
| @@ -337,11 +337,12 @@ when help commands related to multilingual environment (e.g., | |||
| 337 | 337 | ||
| 338 | 338 | ||
| 339 | (defconst help-xref-info-regexp | 339 | (defconst help-xref-info-regexp |
| 340 | (purecopy "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+`\\([^']+\\)'") | 340 | (purecopy |
| 341 | "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+[`‘]\\([^'’]+\\)['’]") | ||
| 341 | "Regexp matching doc string references to an Info node.") | 342 | "Regexp matching doc string references to an Info node.") |
| 342 | 343 | ||
| 343 | (defconst help-xref-url-regexp | 344 | (defconst help-xref-url-regexp |
| 344 | (purecopy "\\<[Uu][Rr][Ll][ \t\n]+`\\([^']+\\)'") | 345 | (purecopy "\\<[Uu][Rr][Ll][ \t\n]+[`‘]\\([^'’]+\\)['’]") |
| 345 | "Regexp matching doc string references to a URL.") | 346 | "Regexp matching doc string references to a URL.") |
| 346 | 347 | ||
| 347 | ;;;###autoload | 348 | ;;;###autoload |
diff --git a/lisp/help.el b/lisp/help.el index 2b8f6423172..1411c1aab9a 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -964,11 +964,12 @@ documentation for the major and minor modes of that buffer." | |||
| 964 | (let* ((mode major-mode) | 964 | (let* ((mode major-mode) |
| 965 | (file-name (find-lisp-object-file-name mode nil))) | 965 | (file-name (find-lisp-object-file-name mode nil))) |
| 966 | (when file-name | 966 | (when file-name |
| 967 | (princ (concat " defined in `" (file-name-nondirectory file-name) "'")) | 967 | (princ (concat " defined in ‘" (file-name-nondirectory file-name) |
| 968 | "’")) | ||
| 968 | ;; Make a hyperlink to the library. | 969 | ;; Make a hyperlink to the library. |
| 969 | (with-current-buffer standard-output | 970 | (with-current-buffer standard-output |
| 970 | (save-excursion | 971 | (save-excursion |
| 971 | (re-search-backward "`\\([^`']+\\)'" nil t) | 972 | (re-search-backward "‘\\([^‘’]+\\)’" nil t) |
| 972 | (help-xref-button 1 'help-function-def mode file-name))))) | 973 | (help-xref-button 1 'help-function-def mode file-name))))) |
| 973 | (princ ":\n") | 974 | (princ ":\n") |
| 974 | (princ (documentation major-mode))))) | 975 | (princ (documentation major-mode))))) |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 4b63cb8f565..c8cd76f5eb1 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -177,7 +177,7 @@ | |||
| 177 | "\\(charset\\)" | 177 | "\\(charset\\)" |
| 178 | "\\)\\s-+\\)?" | 178 | "\\)\\s-+\\)?" |
| 179 | ;; Note starting with word-syntax character: | 179 | ;; Note starting with word-syntax character: |
| 180 | "`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'"))) | 180 | "[`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]"))) |
| 181 | 181 | ||
| 182 | (defun coding-system-change-eol-conversion (coding-system eol-type) | 182 | (defun coding-system-change-eol-conversion (coding-system eol-type) |
| 183 | "Return a coding system which differs from CODING-SYSTEM in EOL conversion. | 183 | "Return a coding system which differs from CODING-SYSTEM in EOL conversion. |
| @@ -1588,7 +1588,7 @@ which marks the variable `default-input-method' as set for Custom buffers." | |||
| 1588 | (with-output-to-temp-buffer (help-buffer) | 1588 | (with-output-to-temp-buffer (help-buffer) |
| 1589 | (let ((elt (assoc input-method input-method-alist))) | 1589 | (let ((elt (assoc input-method input-method-alist))) |
| 1590 | (princ (format | 1590 | (princ (format |
| 1591 | "Input method: %s (`%s' in mode line) for %s\n %s\n" | 1591 | "Input method: %s (‘%s’ in mode line) for %s\n %s\n" |
| 1592 | input-method (nth 3 elt) (nth 1 elt) (nth 4 elt)))))))))) | 1592 | input-method (nth 3 elt) (nth 1 elt) (nth 4 elt)))))))))) |
| 1593 | 1593 | ||
| 1594 | (defun describe-current-input-method () | 1594 | (defun describe-current-input-method () |
| @@ -2173,10 +2173,11 @@ See `set-language-info-alist' for use in programs." | |||
| 2173 | (search-backward (symbol-name (car l))) | 2173 | (search-backward (symbol-name (car l))) |
| 2174 | (help-xref-button 0 'help-coding-system (car l)) | 2174 | (help-xref-button 0 'help-coding-system (car l)) |
| 2175 | (goto-char (point-max)) | 2175 | (goto-char (point-max)) |
| 2176 | (insert " (`" | 2176 | (insert " (‘" |
| 2177 | (coding-system-mnemonic (car l)) | 2177 | (coding-system-mnemonic (car l)) |
| 2178 | "' in mode line):\n\t" | 2178 | "’ in mode line):\n\t" |
| 2179 | (coding-system-doc-string (car l)) | 2179 | (substitute-command-keys |
| 2180 | (coding-system-doc-string (car l))) | ||
| 2180 | "\n") | 2181 | "\n") |
| 2181 | (let ((aliases (coding-system-aliases (car l)))) | 2182 | (let ((aliases (coding-system-aliases (car l)))) |
| 2182 | (when aliases | 2183 | (when aliases |
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 42e78f9c904..7ef758b58de 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el | |||
| @@ -332,7 +332,7 @@ meanings of these arguments." | |||
| 332 | (let ((char (charset-iso-final-char charset))) | 332 | (let ((char (charset-iso-final-char charset))) |
| 333 | (when (> char 0) | 333 | (when (> char 0) |
| 334 | (insert "Final char of ISO2022 designation sequence: ") | 334 | (insert "Final char of ISO2022 designation sequence: ") |
| 335 | (insert (format "`%c'\n" char)))) | 335 | (insert (format "‘%c’\n" char)))) |
| 336 | (let (aliases) | 336 | (let (aliases) |
| 337 | (dolist (c charset-list) | 337 | (dolist (c charset-list) |
| 338 | (if (and (not (eq c charset)) | 338 | (if (and (not (eq c charset)) |
| @@ -581,7 +581,7 @@ docstring, and print only the first line of the docstring." | |||
| 581 | (if (string-match "\n" doc) | 581 | (if (string-match "\n" doc) |
| 582 | (setq doc (substring doc 0 (match-beginning 0)))) | 582 | (setq doc (substring doc 0 (match-beginning 0)))) |
| 583 | (setq doc (concat " " doc))) | 583 | (setq doc (concat " " doc))) |
| 584 | (princ (format "%s\n" doc)))))) | 584 | (princ (format "%s\n" (substitute-command-keys doc))))))) |
| 585 | 585 | ||
| 586 | ;;;###autoload | 586 | ;;;###autoload |
| 587 | (defun describe-current-coding-system () | 587 | (defun describe-current-coding-system () |
| @@ -1038,7 +1038,7 @@ see the function `describe-fontset' for the format of the list." | |||
| 1038 | (save-excursion | 1038 | (save-excursion |
| 1039 | (goto-char (point-min)) | 1039 | (goto-char (point-min)) |
| 1040 | (while (re-search-forward | 1040 | (while (re-search-forward |
| 1041 | "^ \\([^ ]+\\) (`.*' in mode line)$" nil t) | 1041 | "^ \\([^ ]+\\) (‘.*’ in mode line)$" nil t) |
| 1042 | (help-xref-button 1 'help-input-method (match-string 1))))))) | 1042 | (help-xref-button 1 'help-input-method (match-string 1))))))) |
| 1043 | 1043 | ||
| 1044 | (defun list-input-methods-1 () | 1044 | (defun list-input-methods-1 () |
| @@ -1046,7 +1046,7 @@ see the function `describe-fontset' for the format of the list." | |||
| 1046 | (princ " | 1046 | (princ " |
| 1047 | No input method is available, perhaps because you have not | 1047 | No input method is available, perhaps because you have not |
| 1048 | installed LEIM (Libraries of Emacs Input Methods).") | 1048 | installed LEIM (Libraries of Emacs Input Methods).") |
| 1049 | (princ "LANGUAGE\n NAME (`TITLE' in mode line)\n") | 1049 | (princ "LANGUAGE\n NAME (‘TITLE’ in mode line)\n") |
| 1050 | (princ " SHORT-DESCRIPTION\n------------------------------\n") | 1050 | (princ " SHORT-DESCRIPTION\n------------------------------\n") |
| 1051 | (setq input-method-alist | 1051 | (setq input-method-alist |
| 1052 | (sort input-method-alist | 1052 | (sort input-method-alist |
| @@ -1058,7 +1058,7 @@ installed LEIM (Libraries of Emacs Input Methods).") | |||
| 1058 | (setq language (nth 1 elt)) | 1058 | (setq language (nth 1 elt)) |
| 1059 | (princ language) | 1059 | (princ language) |
| 1060 | (terpri)) | 1060 | (terpri)) |
| 1061 | (princ (format " %s (`%s' in mode line)\n %s\n" | 1061 | (princ (format " %s (‘%s’ in mode line)\n %s\n" |
| 1062 | (car elt) | 1062 | (car elt) |
| 1063 | (let ((title (nth 3 elt))) | 1063 | (let ((title (nth 3 elt))) |
| 1064 | (if (and (consp title) (stringp (car title))) | 1064 | (if (and (consp title) (stringp (car title))) |
| @@ -1066,8 +1066,9 @@ installed LEIM (Libraries of Emacs Input Methods).") | |||
| 1066 | title)) | 1066 | title)) |
| 1067 | ;; If the doc is multi-line, indent all | 1067 | ;; If the doc is multi-line, indent all |
| 1068 | ;; non-blank lines. (Bug#8066) | 1068 | ;; non-blank lines. (Bug#8066) |
| 1069 | (replace-regexp-in-string "\n\\(.\\)" "\n \\1" | 1069 | (replace-regexp-in-string |
| 1070 | (or (nth 4 elt) "")))))))) | 1070 | "\n\\(.\\)" "\n \\1" |
| 1071 | (substitute-command-keys (or (nth 4 elt) ""))))))))) | ||
| 1071 | 1072 | ||
| 1072 | ;;; DIAGNOSIS | 1073 | ;;; DIAGNOSIS |
| 1073 | 1074 | ||
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index e06b920e5d7..b0700294637 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -231,7 +231,7 @@ Blank lines separate paragraphs. Semicolons start comments. | |||
| 231 | (lisp-mode-variables nil nil 'elisp) | 231 | (lisp-mode-variables nil nil 'elisp) |
| 232 | (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) | 232 | (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) |
| 233 | (setq-local electric-pair-text-pairs | 233 | (setq-local electric-pair-text-pairs |
| 234 | (cons '(?\` . ?\') electric-pair-text-pairs)) | 234 | (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs)) |
| 235 | (setq imenu-case-fold-search nil) | 235 | (setq imenu-case-fold-search nil) |
| 236 | (add-function :before-until (local 'eldoc-documentation-function) | 236 | (add-function :before-until (local 'eldoc-documentation-function) |
| 237 | #'elisp-eldoc-documentation-function) | 237 | #'elisp-eldoc-documentation-function) |
| @@ -394,7 +394,7 @@ It can be quoted, or be inside a quoted form." | |||
| 394 | ((or (eq (char-after) ?\[) | 394 | ((or (eq (char-after) ?\[) |
| 395 | (progn | 395 | (progn |
| 396 | (skip-chars-backward " ") | 396 | (skip-chars-backward " ") |
| 397 | (memq (char-before) '(?' ?`)))) | 397 | (memq (char-before) '(?' ?` ?‘)))) |
| 398 | (setq res t)) | 398 | (setq res t)) |
| 399 | ((eq (char-before) ?,) | 399 | ((eq (char-before) ?,) |
| 400 | (setq nesting nil)))) | 400 | (setq nesting nil)))) |
| @@ -459,7 +459,7 @@ It can be quoted, or be inside a quoted form." | |||
| 459 | (beg (condition-case nil | 459 | (beg (condition-case nil |
| 460 | (save-excursion | 460 | (save-excursion |
| 461 | (backward-sexp 1) | 461 | (backward-sexp 1) |
| 462 | (skip-syntax-forward "'") | 462 | (skip-chars-forward "`',‘") |
| 463 | (point)) | 463 | (point)) |
| 464 | (scan-error pos))) | 464 | (scan-error pos))) |
| 465 | (end | 465 | (end |
| @@ -470,7 +470,7 @@ It can be quoted, or be inside a quoted form." | |||
| 470 | (save-excursion | 470 | (save-excursion |
| 471 | (goto-char beg) | 471 | (goto-char beg) |
| 472 | (forward-sexp 1) | 472 | (forward-sexp 1) |
| 473 | (skip-chars-backward "'") | 473 | (skip-chars-backward "'’") |
| 474 | (when (>= (point) pos) | 474 | (when (>= (point) pos) |
| 475 | (point))) | 475 | (point))) |
| 476 | (scan-error pos)))) | 476 | (scan-error pos)))) |
| @@ -478,7 +478,7 @@ It can be quoted, or be inside a quoted form." | |||
| 478 | (funpos (eq (char-before beg) ?\()) | 478 | (funpos (eq (char-before beg) ?\()) |
| 479 | (quoted (elisp--form-quoted-p beg))) | 479 | (quoted (elisp--form-quoted-p beg))) |
| 480 | (when (and end (or (not (nth 8 (syntax-ppss))) | 480 | (when (and end (or (not (nth 8 (syntax-ppss))) |
| 481 | (eq (char-before beg) ?`))) | 481 | (memq (char-before beg) '(?` ?‘)))) |
| 482 | (let ((table-etc | 482 | (let ((table-etc |
| 483 | (if (or (not funpos) quoted) | 483 | (if (or (not funpos) quoted) |
| 484 | ;; FIXME: We could look at the first element of the list and | 484 | ;; FIXME: We could look at the first element of the list and |
| @@ -901,15 +901,17 @@ If CHAR is not a character, return nil." | |||
| 901 | (defun elisp--preceding-sexp () | 901 | (defun elisp--preceding-sexp () |
| 902 | "Return sexp before the point." | 902 | "Return sexp before the point." |
| 903 | (let ((opoint (point)) | 903 | (let ((opoint (point)) |
| 904 | ignore-quotes | 904 | (left-quote ?‘) |
| 905 | expr) | 905 | expr) |
| 906 | (save-excursion | 906 | (save-excursion |
| 907 | (with-syntax-table emacs-lisp-mode-syntax-table | 907 | (with-syntax-table emacs-lisp-mode-syntax-table |
| 908 | ;; If this sexp appears to be enclosed in `...' | 908 | ;; If this sexp appears to be enclosed in `...' or ‘...’ |
| 909 | ;; then ignore the surrounding quotes. | 909 | ;; then ignore the surrounding quotes. |
| 910 | (setq ignore-quotes | 910 | (cond ((eq (preceding-char) ?’) |
| 911 | (or (eq (following-char) ?\') | 911 | (progn (forward-char -1) (setq opoint (point)))) |
| 912 | (eq (preceding-char) ?\'))) | 912 | ((or (eq (following-char) ?\') |
| 913 | (eq (preceding-char) ?\')) | ||
| 914 | (setq left-quote ?\`))) | ||
| 913 | (forward-sexp -1) | 915 | (forward-sexp -1) |
| 914 | ;; If we were after `?\e' (or similar case), | 916 | ;; If we were after `?\e' (or similar case), |
| 915 | ;; use the whole thing, not just the `e'. | 917 | ;; use the whole thing, not just the `e'. |
| @@ -933,7 +935,7 @@ If CHAR is not a character, return nil." | |||
| 933 | (forward-sexp -1)))) | 935 | (forward-sexp -1)))) |
| 934 | 936 | ||
| 935 | (save-restriction | 937 | (save-restriction |
| 936 | (if (and ignore-quotes (eq (following-char) ?`)) | 938 | (if (eq (following-char) left-quote) |
| 937 | ;; vladimir@cs.ualberta.ca 30-Jul-1997: Skip ` in `variable' so | 939 | ;; vladimir@cs.ualberta.ca 30-Jul-1997: Skip ` in `variable' so |
| 938 | ;; that the value is returned, not the name. | 940 | ;; that the value is returned, not the name. |
| 939 | (forward-char)) | 941 | (forward-char)) |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index d09214b42a3..295e2aada2a 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -2863,7 +2863,7 @@ The following properties have special meanings for this widget: | |||
| 2863 | :type 'boolean | 2863 | :type 'boolean |
| 2864 | :group 'widget-documentation) | 2864 | :group 'widget-documentation) |
| 2865 | 2865 | ||
| 2866 | (defcustom widget-documentation-link-regexp "`\\([^\n`' ]+\\)'" | 2866 | (defcustom widget-documentation-link-regexp "[`‘]\\([^\n `'‘’]+\\)['’]" |
| 2867 | "Regexp for matching potential links in documentation strings. | 2867 | "Regexp for matching potential links in documentation strings. |
| 2868 | The first group should be the link itself." | 2868 | The first group should be the link itself." |
| 2869 | :type 'regexp | 2869 | :type 'regexp |