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.
This commit is contained in:
parent
aa82fe9931
commit
3beaa3131e
5 changed files with 11 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))))
|
||||
|
|
|
@ -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))))
|
||||
|
|
Loading…
Add table
Reference in a new issue