From 2b31e667be95731d7e9ee328c8331eecf69b3831 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 21 Jul 2022 09:53:45 +0300 Subject: ;Improve documentation of locale-specific string comparison * doc/lispref/strings.texi (Text Comparison): Mention the Unicode collation rules and buffer-local case-tables. --- doc/lispref/strings.texi | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index c9612e598a3..89120575f52 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -564,11 +564,19 @@ equal with respect to collation rules. A collation rule is not only determined by the lexicographic order of the characters contained in @var{string1} and @var{string2}, but also further rules about relations between these characters. Usually, it is defined by the -@var{locale} environment Emacs is running with. - -For example, characters with different coding points but -the same meaning might be considered as equal, like different grave -accent Unicode characters: +@var{locale} environment Emacs is running with and by the Standard C +library against which Emacs was linked@footnote{ +For more information about collation rules and their locale +dependencies, see @uref{https://unicode.org/reports/tr10/, The Unicode +Collation Algorithm}. Some Standard C libraries, such as the +@acronym{GNU} C Library (a.k.a.@: @dfn{glibc}) implement large +portions of the Unicode Collation Algorithm and use the associated +locale data, Common Locale Data Repository, or @acronym{CLDR}. +}. + +For example, characters with different code points but the same +meaning, like different grave accent Unicode characters, might, in +some locales, be considered as equal: @example @group @@ -756,7 +764,8 @@ The strings are compared by the numeric values of their characters. For instance, @var{str1} is considered less than @var{str2} if its first differing character has a smaller numeric value. If @var{ignore-case} is non-@code{nil}, characters are converted to -upper-case before comparing them. Unibyte strings are converted to +upper-case, using the current buffer's case-table (@pxref{Case +Tables}), before comparing them. Unibyte strings are converted to multibyte for comparison (@pxref{Text Representations}), so that a unibyte string and its conversion to multibyte are always regarded as equal. -- cgit v1.2.1 From 25bc330a6da3e8f224289560aa59958f6b0f3148 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 21 Jul 2022 10:18:30 +0300 Subject: Make 'describe-function' say "byte-compiled" when appropriate * lisp/help-fns.el (help-fns-function-description-header): Say "byte-compiled" when describing byte-compiled functions. --- lisp/help-fns.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index f78c6ab0dfa..6a7951d160e 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -874,7 +874,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." (aliased (format-message "an alias for `%s'" real-def)) ((subr-native-elisp-p def) - (concat beg "native compiled Lisp function")) + (concat beg "native-compiled Lisp function")) ((subrp def) (concat beg (if (eq 'unevalled (cdr (subr-arity def))) "special form" @@ -893,7 +893,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." (macrop function)) (concat beg "Lisp macro")) ((byte-code-function-p def) - (concat beg "compiled Lisp function")) + (concat beg "byte-compiled Lisp function")) ((module-function-p def) (concat beg "module function")) ((eq (car-safe def) 'lambda) -- cgit v1.2.1 From 8f8373170f9da089caf823b321ce08ee7990f853 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 21 Jul 2022 10:42:24 +0200 Subject: * lisp/progmodes/cperl-mode.el: Don't mention obsolete archive. --- lisp/progmodes/cperl-mode.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index ae36789af82..04e4a62c607 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -32,11 +32,6 @@ ;; the MooseX::Declare CPAN module, as well as Perl 5.10 keyword ;; support. -;; The latest version is available from -;; https://github.com/jrockway/cperl-mode -;; -;; (perhaps in the moosex-declare branch) - ;; You can either fine-tune the bells and whistles of this mode or ;; bulk enable them by putting -- cgit v1.2.1 From 0b4c81a1520aa126b1eab335e3601808c611a293 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 22 Jul 2022 10:10:36 +0200 Subject: * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): Fix grammar --- lisp/net/tramp-gvfs.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 4adc35bcb6d..e0b786f015a 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -87,7 +87,7 @@ ;; For hostname completion, information is retrieved from the zeroconf ;; daemon (for the "afp", "dav", "davs", and "sftp" methods). The ;; zeroconf daemon is pre-configured to discover services in the -;; "local" domain. If another domain shall be used for discovering +;; "local" domain. If another domain should be used for discovering ;; services, the user option `tramp-gvfs-zeroconf-domain' can be set ;; accordingly. @@ -949,7 +949,7 @@ The call will be traced by Tramp with trace level 6." "Current Tramp file name to be used, as vector. It is needed when D-Bus signals or errors arrive, because there is no information where to trace the message. -Globally, the value shall always be nil; it is bound where needed.") +The global value will always be nil; it is bound where needed.") (defun tramp-gvfs-dbus-event-error (event err) "Called when a D-Bus error message arrives, see `dbus-event-error-functions'." -- cgit v1.2.1 From b9ac8c29aec90b31b044137e1e056daacd8fa1f2 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 22 Jul 2022 10:14:45 +0200 Subject: Improve terminal-live-p docstring * src/terminal.c (Fterminal_live_p): Explain what happens when the argument is nil. --- src/terminal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/terminal.c b/src/terminal.c index 3674eccdbb7..39ba3925b72 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -421,7 +421,8 @@ The terminal device is represented by its integer identifier. */) DEFUN ("terminal-live-p", Fterminal_live_p, Sterminal_live_p, 1, 1, 0, doc: /* Return non-nil if OBJECT is a terminal which has not been deleted. -Value is nil if OBJECT is not a live display terminal. +Value is nil if OBJECT is not a live display terminal. Uses the +terminal of the currently selected frame if OBJECT is nil. If object is a live display terminal, the return value indicates what sort of output terminal it uses. See the documentation of `framep' for possible return values. */) -- cgit v1.2.1 From 7fa491a9e9ca00b21a290926c971ae861791824e Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 22 Jul 2022 14:03:01 +0200 Subject: Improve 'terminal-live-p' docstring some more * terminal.c (Fterminal_live_p): Improve description of arguments and return value. --- src/terminal.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/terminal.c b/src/terminal.c index 39ba3925b72..4580d0b7267 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -421,11 +421,12 @@ The terminal device is represented by its integer identifier. */) DEFUN ("terminal-live-p", Fterminal_live_p, Sterminal_live_p, 1, 1, 0, doc: /* Return non-nil if OBJECT is a terminal which has not been deleted. -Value is nil if OBJECT is not a live display terminal. Uses the -terminal of the currently selected frame if OBJECT is nil. -If object is a live display terminal, the return value indicates what -sort of output terminal it uses. See the documentation of `framep' for -possible return values. */) +Return nil if OBJECT is not a live display terminal. +OBJECT may be a terminal object, a frame, or nil (meaning the +selected frame's terminal). +If OBJECT is a live display terminal, return what sort of output +terminal it uses. See the documentation of `framep' for possible +return values. */) (Lisp_Object object) { struct terminal *t = decode_terminal (object); -- cgit v1.2.1 From 04bdcf4aaa46612e066f32fa6452d76e40eff8e8 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 22 Jul 2022 14:19:04 +0200 Subject: * src/terminal.c (Fframe_terminal): Use active voice --- src/terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal.c b/src/terminal.c index 4580d0b7267..48d581e6ea4 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -402,7 +402,7 @@ but if the second argument FORCE is non-nil, you may do so. */) DEFUN ("frame-terminal", Fframe_terminal, Sframe_terminal, 0, 1, 0, doc: /* Return the terminal that FRAME is displayed on. -If FRAME is nil, the selected frame is used. +If FRAME is nil, use the selected frame. The terminal device is represented by its integer identifier. */) (Lisp_Object frame) -- cgit v1.2.1 From ae1ace1cf4a8b0624f72a8f76e702d78b643ea32 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 23 Jul 2022 00:06:38 +0200 Subject: Adjust help-fns.el tests for recent change * test/lisp/help-fns-tests.el (help-fns-test-lisp-defun) (help-fns-test-lisp-defsubst): Adjust tests for recent change. --- test/lisp/help-fns-tests.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el index 4002501ddee..3132a590231 100644 --- a/test/lisp/help-fns-tests.el +++ b/test/lisp/help-fns-tests.el @@ -63,13 +63,13 @@ Return first line of the output of (describe-function-1 FUNC)." (ert-deftest help-fns-test-lisp-defun () (let ((regexp (if (featurep 'native-compile) - "a native compiled Lisp function in .+subr\\.el" - "a compiled Lisp function in .+subr\\.el")) + "a native-compiled Lisp function in .+subr\\.el" + "a byte-compiled Lisp function in .+subr\\.el")) (result (help-fns-tests--describe-function 'last))) (should (string-match regexp result)))) (ert-deftest help-fns-test-lisp-defsubst () - (let ((regexp "a compiled Lisp function in .+subr\\.el") + (let ((regexp "a byte-compiled Lisp function in .+subr\\.el") (result (help-fns-tests--describe-function 'posn-window))) (should (string-match regexp result)))) -- cgit v1.2.1