[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/obarray 3997133bf13 5/9: use obarrayp, not vectorp, to detect ob
From: |
Mattias Engdegård |
Subject: |
scratch/obarray 3997133bf13 5/9: use obarrayp, not vectorp, to detect obarrays |
Date: |
Mon, 12 Feb 2024 09:10:54 -0500 (EST) |
branch: scratch/obarray
commit 3997133bf13ea8cb7dfbc0f384a299b07676f0d3
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
use obarrayp, not vectorp, to detect 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 0bfc5c06313..6edfd2c36df 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) ;Obarray.
(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))))
- branch scratch/obarray created (now d6af4455d72), Mattias Engdegård, 2024/02/12
- scratch/obarray 82cf3ab0edf 2/9: Make minibuf-tests independent of obarray hash order, Mattias Engdegård, 2024/02/12
- scratch/obarray aa6f6434342 3/9: lread.c: Use bare symbol operations, Mattias Engdegård, 2024/02/12
- scratch/obarray 05e8b01d8c4 6/9: add obarray-clear and use it, Mattias Engdegård, 2024/02/12
- scratch/obarray 0a1c9810065 1/9: Internal function for obarray performance analysis (bug#68244), Mattias Engdegård, 2024/02/12
- scratch/obarray 0e821664f89 4/9: use obarray-make instead of make-vector, Mattias Engdegård, 2024/02/12
- scratch/obarray 3997133bf13 5/9: use obarrayp, not vectorp, to detect obarrays,
Mattias Engdegård <=
- scratch/obarray d6af4455d72 9/9: Use obarray object for initial obarray, Mattias Engdegård, 2024/02/12
- scratch/obarray 2fd9f17a063 7/9: remove check of obarray-default-size in tests, Mattias Engdegård, 2024/02/12
- scratch/obarray 37fdb9d87f3 8/9: add PVEC_OBARRAY and use it for obarray functions, Mattias Engdegård, 2024/02/12