[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3beaa3131e7 2/7: Use obarrayp, not vectorp, to detect obarrays
From: |
Mattias Engdegård |
Subject: |
master 3beaa3131e7 2/7: Use obarrayp, not vectorp, to detect obarrays |
Date: |
Fri, 23 Feb 2024 07:16:11 -0500 (EST) |
branch: master
commit 3beaa3131e78bea618cb93d03c5d8b0f8977fb94
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Use obarrayp, not vectorp, to detect obarrays
* lisp/abbrev.el (abbrev--active-tables):
* lisp/mail/mailabbrev.el (mail-abbrevs-setup, build-mail-abbrevs)
(define-mail-abbrev, mail-resolve-all-aliases)
(mail-abbrev-insert-alias):
* lisp/mail/rmail.el (rmail-resend):
* lisp/minibuffer.el (completion-table-with-context):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
(etags--xref-apropos-additional):
Use obarrayp as predicate for obarrays.
---
lisp/abbrev.el | 2 +-
lisp/mail/mailabbrev.el | 12 ++++++------
lisp/mail/rmail.el | 2 +-
lisp/minibuffer.el | 2 +-
lisp/progmodes/etags.el | 4 ++--
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 2bd9faad69d..b523977fed5 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -721,7 +721,7 @@ either a single abbrev table or a list of abbrev tables."
;; to treat the distinction between a single table and a list of tables.
(cond
((consp tables) tables)
- ((vectorp tables) (list tables))
+ ((obarrayp tables) (list tables))
(t
(let ((tables (if (listp local-abbrev-table)
(append local-abbrev-table
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 68d325ea261..c8006294a7d 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -171,7 +171,7 @@ no aliases, which is represented by this being a table with
no entries.)")
;;;###autoload
(defun mail-abbrevs-setup ()
"Initialize use of the `mailabbrev' package."
- (if (and (not (vectorp mail-abbrevs))
+ (if (and (not (obarrayp mail-abbrevs))
(file-exists-p mail-personal-alias-file))
(progn
(setq mail-abbrev-modtime
@@ -196,7 +196,7 @@ no aliases, which is represented by this being a table with
no entries.)")
"Read mail aliases from personal mail alias file and set `mail-abbrevs'.
By default this is the file specified by `mail-personal-alias-file'."
(setq file (expand-file-name (or file mail-personal-alias-file)))
- (if (vectorp mail-abbrevs)
+ (if (obarrayp mail-abbrevs)
nil
(setq mail-abbrevs nil)
(define-abbrev-table 'mail-abbrevs '()))
@@ -278,7 +278,7 @@ double-quotes."
;; true, and we do some evil space->comma hacking like /bin/mail does.
(interactive "sDefine mail alias: \nsDefine %s as mail alias for: ")
;; Read the defaults first, if we have not done so.
- (unless (vectorp mail-abbrevs) (build-mail-abbrevs))
+ (unless (obarrayp mail-abbrevs) (build-mail-abbrevs))
;; strip garbage from front and end
(if (string-match "\\`[ \t\n,]+" definition)
(setq definition (substring definition (match-end 0))))
@@ -355,7 +355,7 @@ double-quotes."
(if mail-abbrev-aliases-need-to-be-resolved
(progn
;; (message "Resolving mail aliases...")
- (if (vectorp mail-abbrevs)
+ (if (obarrayp mail-abbrevs)
(mapatoms (function mail-resolve-all-aliases-1) mail-abbrevs))
(setq mail-abbrev-aliases-need-to-be-resolved nil)
;; (message "Resolving mail aliases... done.")
@@ -555,9 +555,9 @@ of a mail alias. The value is set up, buffer-local, when
first needed.")
(defun mail-abbrev-insert-alias (&optional alias)
"Prompt for and insert a mail alias."
(interactive (progn
- (if (not (vectorp mail-abbrevs)) (mail-abbrevs-setup))
+ (if (not (obarrayp mail-abbrevs)) (mail-abbrevs-setup))
(list (completing-read "Expand alias: " mail-abbrevs nil t))))
- (if (not (vectorp mail-abbrevs)) (mail-abbrevs-setup))
+ (if (not (obarrayp mail-abbrevs)) (mail-abbrevs-setup))
(insert (or (and alias (symbol-value (intern-soft alias mail-abbrevs))) ""))
(mail-abbrev-expand-hook))
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 85eaec33660..6f343c23bbe 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4097,7 +4097,7 @@ typically for purposes of moderating a list."
(let ((end (point-marker))
(local-abbrev-table mail-abbrevs)
(old-syntax-table (syntax-table)))
- (if (and (not (vectorp mail-abbrevs))
+ (if (and (not (obarrayp mail-abbrevs))
(file-exists-p mail-personal-alias-file))
(build-mail-abbrevs))
(unless mail-abbrev-syntax-table
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 708f3684d11..099fa1599d5 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -321,7 +321,7 @@ the form (concat S2 S)."
;; Predicates are called differently depending on the nature of
;; the completion table :-(
(cond
- ((vectorp table) ;Obarray.
+ ((obarrayp table)
(lambda (sym) (funcall pred (concat prefix (symbol-name sym)))))
((hash-table-p table)
(lambda (s _v) (funcall pred (concat prefix s))))
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index b9bd772ddfc..476037eb8bd 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1488,7 +1488,7 @@ hits the start of file."
(setq symbs (symbol-value symbs))
(insert (format-message "symbol `%s' has no value\n" symbs))
(setq symbs nil)))
- (if (vectorp symbs)
+ (if (obarrayp symbs)
(mapatoms ins-symb symbs)
(dolist (sy symbs)
(funcall ins-symb (car sy))))
@@ -2183,7 +2183,7 @@ file name, add `tag-partial-file-name-match-p' to the
list value.")
(setq symbs (symbol-value symbs))
(warn "symbol `%s' has no value" symbs)
(setq symbs nil))
- (if (vectorp symbs)
+ (if (obarrayp symbs)
(mapatoms add-xref symbs)
(dolist (sy symbs)
(funcall add-xref (car sy))))
- master updated (32843c7b36b -> a8f167547bc), Mattias Engdegård, 2024/02/23
- master 462d8ba813e 4/7: Add a proper type for obarrays, Mattias Engdegård, 2024/02/23
- master aa82fe99318 1/7: Use obarray-make instead of make-vector to create obarrays, Mattias Engdegård, 2024/02/23
- master 6803b70c197 6/7: Update NEWS and manual after obarray changes, Mattias Engdegård, 2024/02/23
- master 3beaa3131e7 2/7: Use obarrayp, not vectorp, to detect obarrays,
Mattias Engdegård <=
- master 6a182658a53 3/7: Add obarray-clear and use it, Mattias Engdegård, 2024/02/23
- master a8f167547bc 7/7: Replace use of obsolete eshell-kill-output in test, Mattias Engdegård, 2024/02/23
- master 3ea77c735de 5/7: Use the new obarray type for the initial obarray, Mattias Engdegård, 2024/02/23