diff options
| author | Sam Steingold | 2022-07-26 14:08:38 -0400 |
|---|---|---|
| committer | Sam Steingold | 2022-07-26 14:08:38 -0400 |
| commit | 90ec9bb83e213712e2170e7f2ed69f11d925919b (patch) | |
| tree | e8ffc74479d091748d82fa58b02b9933428dde4b | |
| parent | 1e3a7bf69d05dbbe5c853780f18caf81f1e22d32 (diff) | |
| download | emacs-90ec9bb83e213712e2170e7f2ed69f11d925919b.tar.gz emacs-90ec9bb83e213712e2170e7f2ed69f11d925919b.zip | |
restore and obsolete `gnus-string-equal' and `bibtex-string='
* lisp/gnus/gnus-util.el (gnus-string-equal): Restore and declare obsolete.
* lisp/textmodes/bibtex.el (bibtex-string=): Likewise.
| -rw-r--r-- | lisp/gnus/gnus-util.el | 10 | ||||
| -rw-r--r-- | lisp/textmodes/bibtex.el | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 31a275c7d05..dda2b4ff5fc 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1073,6 +1073,16 @@ ARG is passed to the first function." | |||
| 1073 | s) | 1073 | s) |
| 1074 | (error string))) | 1074 | (error string))) |
| 1075 | 1075 | ||
| 1076 | ;; This might use `compare-strings' to reduce consing in the | ||
| 1077 | ;; case-insensitive case, but it has to cope with null args. | ||
| 1078 | ;; (`string-equal' uses symbol print names.) | ||
| 1079 | (defun gnus-string-equal (x y) | ||
| 1080 | "Like `string-equal', except it compares case-insensitively." | ||
| 1081 | (declare (obsolete string-equal-ignore-case "29.1")) | ||
| 1082 | (and (= (length x) (length y)) | ||
| 1083 | (or (string-equal x y) | ||
| 1084 | (string-equal (downcase x) (downcase y))))) | ||
| 1085 | |||
| 1076 | (defcustom gnus-use-byte-compile t | 1086 | (defcustom gnus-use-byte-compile t |
| 1077 | "If non-nil, byte-compile crucial run-time code." | 1087 | "If non-nil, byte-compile crucial run-time code." |
| 1078 | :type 'boolean | 1088 | :type 'boolean |
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 64cb0dc0fe6..8135d40d261 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -2213,6 +2213,11 @@ Point must be at beginning of preamble. Do not move point." | |||
| 2213 | 2213 | ||
| 2214 | ;; Helper Functions | 2214 | ;; Helper Functions |
| 2215 | 2215 | ||
| 2216 | (defsubst bibtex-string= (str1 str2) | ||
| 2217 | "Return t if STR1 and STR2 are equal, ignoring case." | ||
| 2218 | (declare (obsolete string-equal-ignore-case "29.1")) | ||
| 2219 | (eq t (compare-strings str1 0 nil str2 0 nil t))) | ||
| 2220 | |||
| 2216 | (defun bibtex-delete-whitespace () | 2221 | (defun bibtex-delete-whitespace () |
| 2217 | "Delete all whitespace starting at point." | 2222 | "Delete all whitespace starting at point." |
| 2218 | (if (looking-at "[ \t\n]+") | 2223 | (if (looking-at "[ \t\n]+") |