diff options
| author | Stefan Kangas | 2022-03-12 06:34:05 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2022-03-12 06:34:05 +0100 |
| commit | 3af12cb8f20d93a3fdbebe2e3b987948e8228f03 (patch) | |
| tree | 225beef43037e95665916ea78eb0a5825f6ebc1f | |
| parent | b5ac604b15532db0418f3c2393907daa317f2ca5 (diff) | |
| parent | dbe6a3ecf74536cbfb7ca59630b48020ae4e732a (diff) | |
| download | emacs-3af12cb8f20d93a3fdbebe2e3b987948e8228f03.tar.gz emacs-3af12cb8f20d93a3fdbebe2e3b987948e8228f03.zip | |
Merge from origin/emacs-28
dbe6a3ecf7 Fix regression in 'custom-prompt-customize-unsaved-options'
a9920473f6 Improve documentation of 'map-charset-chars'
| -rw-r--r-- | doc/lispref/nonascii.texi | 15 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 8 | ||||
| -rw-r--r-- | src/charset.c | 25 |
3 files changed, 31 insertions, 17 deletions
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index f495910fcd6..d7d25dc36af 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -855,15 +855,24 @@ function to all or part of the characters in a charset: | |||
| 855 | Call @var{function} for characters in @var{charset}. @var{function} | 855 | Call @var{function} for characters in @var{charset}. @var{function} |
| 856 | is called with two arguments. The first one is a cons cell | 856 | is called with two arguments. The first one is a cons cell |
| 857 | @code{(@var{from} . @var{to})}, where @var{from} and @var{to} | 857 | @code{(@var{from} . @var{to})}, where @var{from} and @var{to} |
| 858 | indicate a range of characters contained in charset. The second | 858 | indicate a range of characters contained in @var{charset}. The second |
| 859 | argument passed to @var{function} is @var{arg}. | 859 | argument passed to @var{function} is @var{arg}, or @code{nil} if |
| 860 | @var{arg} is omitted. | ||
| 860 | 861 | ||
| 861 | By default, the range of codepoints passed to @var{function} includes | 862 | By default, the range of codepoints passed to @var{function} includes |
| 862 | all the characters in @var{charset}, but optional arguments | 863 | all the characters in @var{charset}, but optional arguments |
| 863 | @var{from-code} and @var{to-code} limit that to the range of | 864 | @var{from-code} and @var{to-code} limit that to the range of |
| 864 | characters between these two codepoints of @var{charset}. If either | 865 | characters between these two codepoints of @var{charset}. If either |
| 865 | of them is @code{nil}, it defaults to the first or last codepoint of | 866 | of them is @code{nil}, it defaults to the first or last codepoint of |
| 866 | @var{charset}, respectively. | 867 | @var{charset}, respectively. Note that @var{from-code} and |
| 868 | @var{to-code} are @var{charset}'s codepoints, not the Emacs codes of | ||
| 869 | characters; by contrast, the values @var{from} and @var{to} in the | ||
| 870 | cons cell passed to @var{function} @emph{are} Emacs character codes. | ||
| 871 | Those Emacs character codes are either Unicode code points, or Emacs | ||
| 872 | internal code points that extend Unicode and are beyond the Unicode | ||
| 873 | range of characters @code{0..#x10FFFF} (@pxref{Text Representations}). | ||
| 874 | The latter happens rarely, with legacy CJK charsets for codepoints of | ||
| 875 | @var{charset} which specify characters not yet unified with Unicode. | ||
| 867 | @end defun | 876 | @end defun |
| 868 | 877 | ||
| 869 | @node Scanning Charsets | 878 | @node Scanning Charsets |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index bec7348099a..79320313975 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1560,12 +1560,12 @@ If TYPE is `groups', include only groups." | |||
| 1560 | ;;;###autoload | 1560 | ;;;###autoload |
| 1561 | (defun custom-prompt-customize-unsaved-options () | 1561 | (defun custom-prompt-customize-unsaved-options () |
| 1562 | "Prompt user to customize any unsaved customization options. | 1562 | "Prompt user to customize any unsaved customization options. |
| 1563 | Return non-nil if user chooses to customize, for use in | 1563 | Return nil if user chooses to customize, for use in |
| 1564 | `kill-emacs-query-functions'." | 1564 | `kill-emacs-query-functions'." |
| 1565 | (not (and (custom-unsaved-options) | 1565 | (not (and (custom-unsaved-options) |
| 1566 | (yes-or-no-p "Some customized options have not been saved; Examine? ") | 1566 | (yes-or-no-p |
| 1567 | (customize-unsaved) | 1567 | "Some customized options have not been saved; Examine? ") |
| 1568 | t))) | 1568 | (progn (customize-unsaved) t)))) |
| 1569 | 1569 | ||
| 1570 | ;;; Buffer. | 1570 | ;;; Buffer. |
| 1571 | 1571 | ||
diff --git a/src/charset.c b/src/charset.c index d0cfe60952e..9edbd4c8c84 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -793,16 +793,21 @@ map_charset_chars (void (*c_function)(Lisp_Object, Lisp_Object), Lisp_Object fun | |||
| 793 | 793 | ||
| 794 | DEFUN ("map-charset-chars", Fmap_charset_chars, Smap_charset_chars, 2, 5, 0, | 794 | DEFUN ("map-charset-chars", Fmap_charset_chars, Smap_charset_chars, 2, 5, 0, |
| 795 | doc: /* Call FUNCTION for all characters in CHARSET. | 795 | doc: /* Call FUNCTION for all characters in CHARSET. |
| 796 | FUNCTION is called with an argument RANGE and the optional 3rd | 796 | Optional 3rd argument ARG is an additional argument to be passed |
| 797 | argument ARG. | 797 | to FUNCTION, see below. |
| 798 | 798 | Optional 4th and 5th arguments FROM-CODE and TO-CODE specify the | |
| 799 | RANGE is a cons (FROM . TO), where FROM and TO indicate a range of | 799 | range of code points (in CHARSET) of target characters on which to |
| 800 | characters contained in CHARSET. | 800 | map the FUNCTION. Note that these are not character codes, but code |
| 801 | 801 | points of CHARSET; for the difference see `decode-char' and | |
| 802 | The optional 4th and 5th arguments FROM-CODE and TO-CODE specify the | 802 | `list-charset-chars'. If FROM-CODE is nil or imitted, it stands for |
| 803 | range of code points (in CHARSET) of target characters. Note that | 803 | the first code point of CHARSET; if TO-CODE is nil or omitted, it |
| 804 | these are not character codes, but code points in CHARSET; for the | 804 | stands for the last code point of CHARSET. |
| 805 | difference see `decode-char' and `list-charset-chars'. */) | 805 | |
| 806 | FUNCTION will be called with two arguments: RANGE and ARG. | ||
| 807 | RANGE is a cons (FROM . TO), where FROM and TO specify a range of | ||
| 808 | characters that belong to CHARSET on which FUNCTION should do its | ||
| 809 | job. FROM and TO are Emacs character codes, unlike FROM-CODE and | ||
| 810 | TO-CODE, which are CHARSET code points. */) | ||
| 806 | (Lisp_Object function, Lisp_Object charset, Lisp_Object arg, Lisp_Object from_code, Lisp_Object to_code) | 811 | (Lisp_Object function, Lisp_Object charset, Lisp_Object arg, Lisp_Object from_code, Lisp_Object to_code) |
| 807 | { | 812 | { |
| 808 | struct charset *cs; | 813 | struct charset *cs; |