(calendar-extract-year
(calendar-bahai-from-absolute
(calendar-absolute-from-gregorian today)))))
- (completion-ignore-case t)
(month (cdr (assoc
- (completing-read
+ (completing-read-case-insensitive
"Bahá’í calendar month name: "
(mapcar 'list
(append calendar-bahai-month-name-array nil))
(calendar-coptic-from-absolute
(calendar-absolute-from-gregorian today)))
calendar-coptic-name))
- (completion-ignore-case t)
(month (cdr (assoc-string
- (completing-read
+ (completing-read-case-insensitive
(format "%s calendar month name: " calendar-coptic-name)
(mapcar 'list
(append calendar-coptic-month-name-array nil))
(reverse
(mapcar #'calendar-french-trim-feast
feasts))))))))
- (completion-ignore-case t)
(month (cdr (assoc-string
- (completing-read
+ (completing-read-case-insensitive
"Mois ou \"jour complémentaire\" ou fête: "
month-list
nil t)
(month-array (if (calendar-hebrew-leap-year-p year)
calendar-hebrew-month-name-array-leap-year
calendar-hebrew-month-name-array-common-year))
- (completion-ignore-case t)
(month (cdr (assoc-string
- (completing-read
+ (completing-read-case-insensitive
"Hebrew calendar month name: "
(mapcar 'list (append month-array nil))
(if (= year 3761)
(lambda (x) (> x 0))
(calendar-extract-year today)))
(month-array calendar-month-name-array)
- (completion-ignore-case t)
(month (cdr (assoc-string
- (completing-read
+ (completing-read-case-insensitive
"Month of death (name): "
(mapcar 'list (append month-array nil))
nil t)
(calendar-islamic-from-absolute
(calendar-absolute-from-gregorian today)))))
(month-array calendar-islamic-month-name-array)
- (completion-ignore-case t)
(month (cdr (assoc-string
- (completing-read
+ (completing-read-case-insensitive
"Islamic calendar month name: "
(mapcar 'list (append month-array nil))
nil t)
(calendar-absolute-from-gregorian
today)))))
(month-array calendar-month-name-array)
- (completion-ignore-case t)
(month (cdr (assoc-string
- (completing-read
+ (completing-read-case-insensitive
"Julian calendar month name: "
(mapcar 'list (append month-array nil))
nil t)
(defun calendar-mayan-read-haab-date ()
"Prompt for a Mayan haab date."
- (let* ((completion-ignore-case t)
- (haab-day (calendar-read-sexp
+ (let* ((haab-day (calendar-read-sexp
"Haab kin (0-19)"
(lambda (x) (and (>= x 0) (< x 20)))))
(haab-month-list (append calendar-mayan-haab-month-name-array
(and (< haab-day 5) '("Uayeb"))))
(haab-month (cdr
(assoc-string
- (completing-read "Haab uinal: "
- (mapcar 'list haab-month-list)
- nil t)
+ (completing-read-case-insensitive
+ "Haab uinal: "
+ (mapcar 'list haab-month-list)
+ nil t)
(calendar-make-alist haab-month-list 1) t))))
(cons haab-day haab-month)))
(defun calendar-mayan-read-tzolkin-date ()
"Prompt for a Mayan tzolkin date."
- (let* ((completion-ignore-case t)
- (tzolkin-count (calendar-read-sexp
+ (let* ((tzolkin-count (calendar-read-sexp
"Tzolkin kin (1-13)"
(lambda (x) (and (> x 0) (< x 14)))))
(tzolkin-name-list (append calendar-mayan-tzolkin-names-array nil))
(tzolkin-name (cdr
(assoc-string
- (completing-read "Tzolkin uinal: "
- (mapcar 'list tzolkin-name-list)
- nil t)
+ (completing-read-case-insensitive
+ "Tzolkin uinal: "
+ (mapcar 'list tzolkin-name-list)
+ nil t)
(calendar-make-alist tzolkin-name-list 1) t))))
(cons tzolkin-count tzolkin-name)))
(calendar-persian-from-absolute
(calendar-absolute-from-gregorian
(calendar-current-date))))))
- (completion-ignore-case t)
(month (cdr (assoc
- (completing-read
+ (completing-read-case-insensitive
"Persian calendar month name: "
(mapcar 'list
(append calendar-persian-month-name-array nil))
defyear))
(month-array calendar-month-name-array)
(defmon (aref month-array (1- (calendar-extract-month default-date))))
- (completion-ignore-case t)
(month (cdr (assoc-string
(let ((completion-extra-properties
'(:category calendar-month)))
- (completing-read
+ (completing-read-case-insensitive
(format-prompt "Month name" defmon)
- (append month-array nil)
+ (completion-table-with-metadata
+ (append month-array nil)
+ '((category . calendar-month)))
nil t nil nil defmon))
(calendar-make-alist month-array 1) t)))
(defday (calendar-extract-day default-date))
This function is suitable for execution in an init file."
(interactive "P")
(save-excursion
- (let* ((completion-ignore-case t)
- (date (if arg (calendar-read-date t)
+ (let* ((date (if arg (calendar-read-date t)
(calendar-current-date)))
(displayed-month (calendar-extract-month date))
(displayed-year (calendar-extract-year date)))
(lambda (x) (>= x start-year))
start-year
start-year))
- (completion-ignore-case t)
(lists (holiday-available-holiday-lists))
(choice (capitalize
- (completing-read "List (TAB for choices): " lists nil t)))
+ (completing-read-case-insensitive
+ "List (TAB for choices): " lists nil t)))
(which (if (string-equal choice "Ask")
(symbol-value (read-variable "Enter list name: "))
(cdr (assoc choice lists))))
return the absolute truename of a todo archive file. With non-nil
MUSTMATCH the name of an existing file must be chosen;
otherwise, a new file name is allowed."
- (let* ((completion-ignore-case todo-completion-ignore-case)
- (files (mapcar #'todo-short-file-name
+ (let* ((files (mapcar #'todo-short-file-name
;; (funcall todo-files-function archive)))
(if archive todo-archives todo-files)))
- (file (completing-read prompt files nil mustmatch nil nil
- (if files
- ;; If user hit RET without
- ;; choosing a file, default to
- ;; current or default file.
- (todo-short-file-name
- (or todo-current-todo-file
- (and todo-show-current-file
- todo-global-current-todo-file)
- (todo-absolute-file-name
- todo-default-todo-file)))
- ;; Trigger prompt for initial file.
- ""))))
+ (file (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case
+ todo-completion-ignore-case))
+ (completing-read prompt files nil mustmatch nil nil
+ (if files
+ ;; If user hit RET without
+ ;; choosing a file, default to
+ ;; current or default file.
+ (todo-short-file-name
+ (or todo-current-todo-file
+ (and todo-show-current-file
+ todo-global-current-todo-file)
+ (todo-absolute-file-name
+ todo-default-todo-file)))
+ ;; Trigger prompt for initial file.
+ "")))))
(unless (file-exists-p todo-directory)
(make-directory todo-directory))
(unless (or mustmatch (member file files))
(archive (eq match-type 'archive))
(file0 (when (and file (> (length todo-files) 1))
(todo-read-file-name (concat "Choose a" (if archive
- "n archive"
- " todo")
+ "n archive"
+ " todo")
" file: ")
archive t)))
(completions (unless file0 (todo-category-completions archive)))
todo-categories))
(t
completions)))
- (completion-ignore-case todo-completion-ignore-case)
- (cat (completing-read prompt categories nil
- (eq match-type 'todo) nil nil
- ;; Unless we're adding a category via
- ;; todo-add-category, set default
- ;; for existing categories to the
- ;; current category of the chosen
- ;; file or else of the current file.
- (if (and categories (not add))
- (with-current-buffer
- (find-file-noselect
- (or file0
- todo-current-todo-file
- (todo-absolute-file-name
- todo-default-todo-file)))
- (todo-current-category))
- ;; Trigger prompt for initial category.
- "")))
+ (cat
+ (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case
+ todo-completion-ignore-case))
+ (completing-read prompt categories nil
+ (eq match-type 'todo) nil nil
+ ;; Unless we're adding a category via
+ ;; todo-add-category, set default
+ ;; for existing categories to the
+ ;; current category of the chosen
+ ;; file or else of the current file.
+ (if (and categories (not add))
+ (with-current-buffer
+ (find-file-noselect
+ (or file0
+ todo-current-todo-file
+ (todo-absolute-file-name
+ todo-default-todo-file)))
+ (todo-current-category))
+ ;; Trigger prompt for initial category.
+ ""))))
(catfil (cdr (assoc cat completions)))
(str "Category \"%s\" from which file (TAB for choices)? "))
;; If we do category completion and the chosen category name
;; moving, confirm that it should be added, then validate.
(unless add
(if (todo-y-or-n-p (format "Add new category \"%s\" to file \"%s\"? "
- cat (todo-short-file-name file0)))
+ cat (todo-short-file-name file0)))
(progn
(when (assoc cat categories)
(let ((todo-categories categories))
(let* ((marray todo-month-name-array)
(mlist (append marray nil))
(mabarray todo-month-abbrev-array)
- (mablist (append mabarray nil))
- (completion-ignore-case todo-completion-ignore-case))
- (setq monthname (completing-read
- "Month name (RET for current month, * for any month): "
- mlist nil t nil nil
- (calendar-month-name
- (calendar-extract-month (calendar-current-date)) t))
+ (mablist (append mabarray nil)))
+ (setq monthname
+ (minibuffer-with-setup-hook
+ (lambda ()
+ (setq-local completion-ignore-case
+ todo-completion-ignore-case))
+ (completing-read
+ "Month name (RET for current month, * for any month): "
+ mlist nil t nil nil
+ (calendar-month-name
+ (calendar-extract-month (calendar-current-date)) t)))
month (1+ (- (length mlist)
(length (or (member monthname mlist)
(member monthname mablist))))))
(defun todo-read-dayname ()
"Choose name of a day of the week with completion and return it."
- (let ((completion-ignore-case todo-completion-ignore-case))
+ (minibuffer-with-setup-hook
+ (lambda ()
+ (setq-local completion-ignore-case todo-completion-ignore-case))
(completing-read "Enter a day name: "
(append calendar-day-name-array nil)
nil t)))
(save-match-data
;; Recurse on the sorted list.
(let* ((max-lisp-eval-depth 10000)
- (completion-ignore-case nil)
(open (cond ((stringp paren) paren) (paren "\\(")))
(re (if strings
(regexp-opt-group
"Internally controlled items for `erc-nick-popup-alist'.")
(defun erc-nick-popup (nick)
- (let* ((completion-ignore-case t)
- (alist (append erc-nick-popup-alist erc-button--nick-popup-alist))
- (action (completing-read (format-message
- "What action to take on `%s'? " nick)
- alist))
+ (let* ((alist (append erc-nick-popup-alist erc-button--nick-popup-alist))
+ (action (completing-read-case-insensitive
+ (format-message "What action to take on `%s'? " nick) alist))
(code (cdr (assoc action alist))))
(when code
(erc-set-active-buffer (current-buffer))
Choose port at random if multiple candidates exist, but always
prefer TLS without asking. When a port can't be determined,
return the host alone sans URL formatting (for compatibility)."
- (let* ((completion-ignore-case t)
- (net (intern
- (completing-read "Network: "
- (delete-dups
- (mapcar (lambda (x)
- (list (nth 1 x)))
- erc-server-alist)))))
+ (let* ((net (intern
+ (completing-read-case-insensitive
+ "Network: "
+ (delete-dups
+ (mapcar (lambda (x)
+ (list (nth 1 x)))
+ erc-server-alist)))))
(s-choose (lambda (entry)
(and (equal (nth 1 entry) net)
(if-let ((b (string-search ": " (car entry))))
(cdr entry))
entry))))
(s-entries (delq nil (mapcar s-choose erc-server-alist)))
- (srv (assoc (completing-read "Server: " s-entries) s-entries))
+ (srv (assoc (completing-read-case-insensitive "Server: " s-entries)
+ s-entries))
(host (nth 2 srv))
(pspec (nthcdr 3 srv))
(ports (erc-ports-list (or (cadr pspec) (car pspec))))
;; Capitalize NAME (we don't use `capitalize' because that capitalizes
;; each word in a string separately).
(setq name (concat (upcase (substring name 0 1)) (substring name 1)))
- (let* ((completion-ignore-case t)
- (value (completing-read
+ (let* ((value (completing-read-case-insensitive
(format-prompt "%s for face `%s'" default name face)
completion-alist nil nil nil nil default)))
(if (equal value "") default value)))
(defun read-face-font (face &optional frame)
"Read the name of a font for FACE on FRAME.
If optional argument FRAME is nil or omitted, use the selected frame."
- (let ((completion-ignore-case t))
- (completing-read (format-message
- "Set font attributes of face `%s' from font: " face)
- (append (fontset-list) (x-list-fonts "*" nil frame)))))
+ (completing-read-case-insensitive
+ (format-message
+ "Set font attributes of face `%s' from font: " face)
+ (append (fontset-list) (x-list-fonts "*" nil frame))))
(defun read-all-face-attributes (face &optional frame)
candidates. The optional argument FACE determines the other
face attributes of the candidates on display."
(interactive "i\np\ni\np") ; Always convert to RGB interactively.
- (let* ((completion-ignore-case t)
- (color-alist
+ (let* ((color-alist
`(("foreground at point" . ,(foreground-color-at-point))
("background at point" . ,(background-color-at-point))
,@(if allow-empty-name '(("" . unspecified)))
(faces--string-with-color name color
foreground face)))
color-alist))
- (color (completing-read
+ (color (completing-read-case-insensitive
(or prompt "Color (name or #RGB triplet): ")
;; Completing function for reading colors, accepting
;; both color names and RGB triplets.
If INHIBIT-CUSTOMIZE is non-nil, don't update the user's
Customization settings."
(interactive
- (let* ((completion-ignore-case t)
- (default (frame-parameter nil 'font))
- (font (completing-read (format-prompt "Font name" default)
- ;; x-list-fonts will fail with an error
- ;; if this frame doesn't support fonts.
- (x-list-fonts "*" nil (selected-frame))
- nil nil nil nil default)))
+ (let* ((default (frame-parameter nil 'font))
+ (font (completing-read-case-insensitive
+ (format-prompt "Font name" default)
+ ;; x-list-fonts will fail with an error
+ ;; if this frame doesn't support fonts.
+ (x-list-fonts "*" nil (selected-frame))
+ nil nil nil nil default)))
(list font current-prefix-arg nil)))
(when (or (stringp font) (fontp font))
(let* ((this-frame (selected-frame))
article. If BACKWARD (the prefix) is non-nil, search backward instead."
(interactive
(list
- (let ((completion-ignore-case t))
+ (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case t))
(gnus-completing-read
"Header name"
(mapcar #'symbol-name
(append
- '(Number Subject From Lines Date Message-ID
- Xref References Body)
- gnus-extra-headers))
+ '(Number Subject From Lines Date Message-ID
+ Xref References Body)
+ gnus-extra-headers))
'require-match))
(read-string "Regexp: ")
(read-key-sequence "Command: ")
(1+ (point)))
(point))
(skip-chars-backward "^, \t\n") (point))))
- (completion-ignore-case t)
(e (progn (skip-chars-forward "^,\t\n ") (point)))
(collection (when (and (boundp 'gnus-active-hashtb)
gnus-active-hashtb)
in the current Info file, or \"(FILENAME)NODENAME\", referring to
a node in FILENAME. \"(FILENAME)\" is a short format to go to
the Top node in FILENAME."
- (let* ((completion-ignore-case t)
- (Info-read-node-completion-table (Info-build-node-completions))
- (nodename (completing-read prompt #'Info-read-node-name-1 nil t nil
- 'Info-minibuf-history default)))
+ (let* ((Info-read-node-completion-table (Info-build-node-completions))
+ (nodename (completing-read-case-insensitive
+ prompt #'Info-read-node-name-1 nil t nil
+ 'Info-minibuf-history default)))
(if (equal nodename "")
(Info-read-node-name prompt)
nodename)))
a new Info buffer. If FORK is a string, it is the name to use for the
new buffer."
(interactive
- (let ((completion-ignore-case t)
- (case-fold-search t)
+ (let ((case-fold-search t)
completions default alt-default (start-point (point)) str i bol eol)
(save-excursion
;; Store end and beginning of line.
(if (eq (length completions) 1)
(setq default (car completions)))
(if completions
- (let ((input (completing-read (format-prompt "Follow reference named"
- default)
- completions nil t)))
+ (let ((input (completing-read-case-insensitive
+ (format-prompt "Follow reference named" default)
+ completions nil t)))
(list (if (equal input "")
default input)
current-prefix-arg))
instead. Also note that many of these characters can be input
with the regular \\`C-x 8' map without having to specify a language
here."
- (interactive (list (let ((completion-ignore-case t))
- (completing-read "Set which language? "
- iso-transl-language-alist nil t))))
+ (interactive (list (completing-read-case-insensitive
+ "Set which language? "
+ iso-transl-language-alist nil t)))
(iso-transl-define-keys (cdr (assoc lang iso-transl-language-alist))))
If KEY is nil, read any language environment.
Prompt with PROMPT. DEFAULT is the default choice of language environment.
This returns a language environment name as a string."
- (let* ((completion-ignore-case t)
- (name (completing-read prompt
- language-info-alist
- (and key
- (lambda (elm) (and (listp elm) (assq key elm))))
- t nil nil default)))
+ (let* ((name (completing-read-case-insensitive
+ prompt
+ language-info-alist
+ (and key
+ (lambda (elm) (and (listp elm) (assq key elm))))
+ t nil nil default)))
(if (and (> (length name) 0)
(or (not key)
(get-language-info name key)))
The return value is a string."
(if default
(setq prompt (format prompt default)))
- (let* ((completion-ignore-case t)
- ;; This binding is necessary because input-method-history is
+ (let* (;; This binding is necessary because input-method-history is
;; buffer local.
- (input-method (completing-read prompt input-method-alist
- nil t nil 'input-method-history
- (if (and default (symbolp default))
- (symbol-name default)
- default))))
+ (input-method (completing-read-case-insensitive
+ prompt input-method-alist
+ nil t nil 'input-method-history
+ (if (and default (symbolp default))
+ (symbol-name default)
+ default))))
(if (and input-method (symbolp input-method))
(setq input-method (symbol-name input-method)))
(if (> (length input-method) 0)
(error "No fontsets being used")
(let ((fontset-list (nconc
(fontset-list)
- (mapcar 'cdr fontset-alias-alist)))
- (completion-ignore-case t))
- (list (completing-read
+ (mapcar 'cdr fontset-alias-alist))))
+ (list (completing-read-case-insensitive
(format-prompt "Fontset" "used by the current frame")
fontset-list nil t)))))
(let ((help-buffer-under-preparation t))
If the argument is nil, we return the display table to its standard state."
(interactive
(list
- (let* ((completion-ignore-case t))
- (completing-read
- (format-prompt "Cyrillic language" "nil")
- cyrillic-language-alist nil t nil nil nil))))
+ (completing-read-case-insensitive
+ (format-prompt "Cyrillic language" "nil")
+ cyrillic-language-alist nil t nil nil nil)))
(or standard-display-table
(setq standard-display-table (make-display-table)))
(defun what-domain (domain)
"Convert mail domain DOMAIN to the country it corresponds to."
(interactive
- (let ((completion-ignore-case t))
- (list (completing-read "Domain: "
- mail-extr-all-top-level-domains nil t))))
+ (list (completing-read-case-insensitive
+ "Domain: " mail-extr-all-top-level-domains nil t)))
(or (setq domain (intern-soft (downcase domain)
mail-extr-all-top-level-domains))
(error "No such domain"))
To change it later, customize the option `send-mail-function'.\n"))
(goto-char (point-min))
(display-buffer (current-buffer))
- (let ((completion-ignore-case t))
- (completing-read
- (format-prompt "Send mail via" (caar options))
- options nil 'require-match nil nil (car options))))))
+ (completing-read-case-insensitive
+ (format-prompt "Send mail via" (caar options))
+ options nil 'require-match nil nil (car options)))))
;; Return the choice.
(cdr (assoc-string choice options t))))
\f
;; so you're accustomed not to bother about the case
;; ("man -k" is case-insensitive similarly, so the
;; table has everything available to complete)
- (completion-ignore-case t)
Man-completion-cache ;Don't cache across calls.
- (input (completing-read
+ (input (completing-read-case-insensitive
(format-prompt "Manual entry"
(and (not (equal default-entry ""))
default-entry))
(let* ((default (if (member Man--last-section Man--sections)
Man--last-section
(car Man--sections)))
- (completion-ignore-case t)
(prompt (format-prompt "Go to section" default))
- (chosen (completing-read prompt Man--sections
- nil nil nil nil default)))
+ (chosen (completing-read-case-insensitive
+ prompt Man--sections nil nil nil nil default)))
(list chosen))
man-common)
(setq Man--last-section section)
"Hook run in minibuffer after pushing new input to `completion-history'."
:type 'hook)
+(defun completing-read-case-insensitive
+ ( prompt collection &optional
+ predicate require-match initial-input
+ hist def inherit-input-method)
+ "`completing-read' with `completion-ignore-case' set to t in the minibuffer."
+ (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case t))
+ (completing-read
+ prompt collection predicate require-match
+ initial-input hist def inherit-input-method)))
+
(provide 'minibuffer)
;;; minibuffer.el ends here
"Create a new browser for TAG."
(interactive
(list
- (let ((completion-ignore-case t))
- (intern
- (completing-read "Tag: " mpc-tag-browser-tagtypes nil 'require-match)))))
+ (intern
+ (completing-read-case-insensitive
+ "Tag: " mpc-tag-browser-tagtypes nil 'require-match))))
(let* ((newbuf (mpc-tagbrowser-buf tag))
(win (get-buffer-window newbuf 0)))
(if win (select-window win)
(defun dictionary-completing-read-word (dictionary)
"Prompt for a word with completion based on matches in DICTIONARY."
- (let* ((completion-ignore-case t)
- (dictionary-default-dictionary dictionary)
+ (let* ((dictionary-default-dictionary dictionary)
(word-at-point (thing-at-point 'word t))
(default (dictionary-match-word word-at-point)))
- (completing-read (format-prompt dictionary-read-word-prompt default)
- (external-completion-table 'dictionary-definition
- #'dictionary-match-word)
- nil t nil 'dictionary-word-history default t)))
+ (completing-read-case-insensitive
+ (format-prompt dictionary-read-word-prompt default)
+ (external-completion-table 'dictionary-definition
+ #'dictionary-match-word)
+ nil t nil 'dictionary-word-history default t)))
(defun dictionary-dictionaries ()
"Return the list of dictionaries the server supports.
(defun newsticker-treeview-jump (feed-name)
"Jump to feed FEED-NAME in newsticker treeview."
(interactive
- (list (let ((completion-ignore-case t))
- (completing-read
- "Jump to feed/group: "
- (append '("new" "obsolete" "immortal" "all")
- (mapcar #'car (append newsticker-url-list
- newsticker-url-list-defaults)))
- nil t))))
+ (list (completing-read-case-insensitive
+ "Jump to feed/group: "
+ (append '("new" "obsolete" "immortal" "all")
+ (mapcar #'car (append newsticker-url-list
+ newsticker-url-list-defaults)))
+ nil t)))
(newsticker--treeview-unfold-node feed-name))
;; ======================================================================
"Add group NAME to group PARENT."
(interactive
(list (read-string "Name of new group: ")
- (let ((completion-ignore-case t))
- (completing-read "Name of parent group (optional): " (newsticker--group-all-groups)
- nil t))))
+ (completing-read-case-insensitive
+ "Name of parent group (optional): " (newsticker--group-all-groups)
+ nil t)))
(if (newsticker--group-get-group name)
(error "Group %s exists already" name))
(let ((p (if (and parent (not (string= parent "")))
(defun newsticker-group-delete-group (name)
"Delete group NAME."
(interactive
- (list (let ((completion-ignore-case t))
- (completing-read "Delete group: "
- (newsticker--group-names)
- nil t (car (newsticker--group-find-parent-group
- newsticker--treeview-current-feed))))))
+ (list (completing-read-case-insensitive
+ "Delete group: "
+ (newsticker--group-names)
+ nil t (car (newsticker--group-find-parent-group
+ newsticker--treeview-current-feed)))))
(let ((parent-group (newsticker--group-find-parent-group name)))
(unless parent-group
(error "Parent %s does not exist" parent-group))
(defun newsticker-group-rename-group (old-name new-name)
"Rename group OLD-NAME to NEW-NAME."
(interactive
- (list (let* ((completion-ignore-case t))
- (completing-read "Rename group: "
- (newsticker--group-names)
- nil t (car (newsticker--group-find-parent-group
- newsticker--treeview-current-feed))))
+ (list (completing-read-case-insensitive
+ "Rename group: "
+ (newsticker--group-names)
+ nil t (car (newsticker--group-find-parent-group
+ newsticker--treeview-current-feed)))
(read-string "Rename to: ")))
(setq newsticker-groups (newsticker--group-do-rename-group old-name new-name))
(newsticker--group-manage-orphan-feeds)
"Move feed NAME to group GROUP-NAME.
Update treeview afterwards unless NO-UPDATE is non-nil."
(interactive
- (let ((completion-ignore-case t))
- (list (completing-read "Name of feed or group to move: "
- (append (mapcar #'car newsticker-url-list)
- (newsticker--group-names))
- nil t newsticker--treeview-current-feed)
- (completing-read "Name of new parent group: " (newsticker--group-names)
- nil t))))
+ (list (completing-read-case-insensitive
+ "Name of feed or group to move: "
+ (append (mapcar #'car newsticker-url-list)
+ (newsticker--group-names))
+ nil t newsticker--treeview-current-feed)
+ (completing-read-case-insensitive
+ "Name of new parent group: " (newsticker--group-names)
+ nil t)))
(let* ((group (if (and group-name (not (string= group-name "")))
(newsticker--group-get-group group-name)
newsticker-groups))
"Read from the minibuffer, with completion.
Like `completing-read', but the variable `snmp-completion-ignore-case'
controls whether case is significant."
- (let ((completion-ignore-case snmp-completion-ignore-case))
+ (minibuffer-with-setup-hook
+ (lambda ()
+ (setq-local completion-ignore-case snmp-completion-ignore-case))
(completing-read prompt table pred require init hist)))
;; OBJECT-TYPE macro template
Please submit bug reports and other feedback to the author, Neil W. Van Dyke
<nwv@acm.org>."
(interactive)
- (let* ((completion-ignore-case t)
- (item (assoc-string
- (completing-read "WebJump to site: " webjump-sites nil t)
+ (let* ((item (assoc-string
+ (completing-read-case-insensitive
+ "WebJump to site: " webjump-sites nil t)
webjump-sites t))
(name (car item))
(expr (cdr item))
(car urls))
(defun webjump-read-choice (name what choices &optional default)
- (let* ((completion-ignore-case t)
- (choice (completing-read (concat name " " what ": ") choices nil t)))
+ (let* ((choice (completing-read-case-insensitive
+ (concat name " " what ": ") choices nil t)))
(if (webjump-null-or-blank-string-p choice)
default
(cdr (assoc choice choices)))))
(defun rng-read-type-id ()
(condition-case err
- (let ((type-ids (rng-possible-type-ids))
- (completion-ignore-case nil))
- (completing-read "Document type id: "
- (mapcar (lambda (x) (cons x nil))
- type-ids)
- nil
- t
- nil
- 'rng-document-type-history))
+ (let ((type-ids (rng-possible-type-ids)))
+ (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case nil))
+ (completing-read "Document type id: "
+ (mapcar (lambda (x) (cons x nil))
+ type-ids)
+ nil
+ t
+ nil
+ 'rng-document-type-history)))
(nxml-file-parse-error
(nxml-display-file-parse-error err))))
(defun org-babel-goto-named-src-block (name)
"Go to a source-code block with NAME."
(interactive
- (let ((completion-ignore-case t)
- (case-fold-search t)
+ (let ((case-fold-search t)
(all-block-names (org-babel-src-block-names)))
- (list (completing-read
+ (list (completing-read-case-insensitive
"source-block name: " all-block-names nil t
(let* ((context (org-element-context))
(type (org-element-type context))
((memq type '(babel-call inline-babel-call)) ;#+CALL:
(org-element-property :call context))
((car (org-element-property :results context))) ;#+RESULTS:
- ((let ((symbol (thing-at-point 'symbol))) ;Symbol.
+ ((let ((symbol (thing-at-point 'symbol))) ;Symbol.
(and symbol
(member-ignore-case symbol all-block-names)
symbol)))
(defun org-babel-goto-named-result (name)
"Go to a result with NAME."
(interactive
- (let ((completion-ignore-case t))
- (list (completing-read "Source-block name: "
- (org-babel-result-names) nil t))))
+ (list (completing-read-case-insensitive
+ "Source-block name: " (org-babel-result-names) nil t)))
(let ((point (org-babel-find-named-result name)))
(if point
;; taken from `org-open-at-point'
(require 'man)
(concat
"man:"
- (let ((completion-ignore-case t) ; See `man' comments.
- (Man-completion-cache)) ; See `man' implementation.
- (completing-read
- "Manual entry: "
- 'Man-completion-table))))
+ (let ((Man-completion-cache)) ; See `man' implementation.
+ (completing-read-case-insensitive "Manual entry: " 'Man-completion-table))))
(provide 'ol-man)
(when (and (stringp arg) (not (string-match "\\S-" arg)))
(setq arg nil))
(let* ((today (calendar-gregorian-from-absolute (org-today)))
- (completion-ignore-case t)
todo-keywords org-select-this-todo-keyword todo-entries all-todo-entries files file pos)
(catch 'exit
(setq org-agenda-buffer-name
(org-agenda--get-buffer-name
(when org-agenda-sticky
- (if (stringp org-select-this-todo-keyword)
- (format "*Org Agenda(%s:%s)*" (or org-keys "t")
- org-select-this-todo-keyword)
- (format "*Org Agenda(%s)*" (or org-keys "t"))))))
+ (if (stringp org-select-this-todo-keyword)
+ (format "*Org Agenda(%s:%s)*" (or org-keys "t")
+ org-select-this-todo-keyword)
+ (format "*Org Agenda(%s)*" (or org-keys "t"))))))
(org-agenda-prepare "TODO")
(setq todo-keywords org-todo-keywords-for-agenda
org-select-this-todo-keyword (cond ((stringp arg) arg)
(setq org-select-this-todo-keyword
(mapconcat #'identity
(let ((crm-separator "|"))
- (completing-read-multiple
- "Keyword (or KWD1|KWD2|...): "
- (mapcar #'list todo-keywords) nil nil))
+ (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case t))
+ (completing-read-multiple
+ "Keyword (or KWD1|KWD2|...): "
+ (mapcar #'list todo-keywords) nil nil)))
"|")))
(when (equal arg 0)
(setq org-select-this-todo-keyword nil))
match (nth 1 org-agenda-overriding-arguments)))
(let* ((org-tags-match-list-sublevels
org-tags-match-list-sublevels)
- (completion-ignore-case t)
(org--matcher-tags-todo-only todo-only)
rtn rtnall files file pos matcher
buffer)
(unless (local-variable-p 'org-global-tags-completion-table)
(setq-local org-global-tags-completion-table
(org-global-tags-completion-table)))
- (let ((completion-ignore-case t))
- (setq tag (completing-read
- "Tag: " org-global-tags-completion-table nil t))))
+ (setq tag (completing-read-case-insensitive
+ "Tag: " org-global-tags-completion-table nil t)))
(cond
((eq char ?\r)
(org-agenda-filter-show-all-tag)
(cdr x))
(cons (concat (car x) extra) (cdr x))))
org-refile-target-table))
- (completion-ignore-case t)
cdef
(prompt (let ((default (or (car org-refile-history)
(and (assoc cbnex tbl) (setq cdef cbnex)
(org-format-prompt prompt default)))
pa answ parent-target child parent old-hist)
(setq old-hist org-refile-history)
- (setq answ (funcall cfunc prompt tbl nil (not new-nodes)
- nil 'org-refile-history
- (or cdef (car org-refile-history))))
+ (setq answ
+ (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case t))
+ (funcall cfunc prompt tbl nil (not new-nodes)
+ nil 'org-refile-history
+ (or cdef (car org-refile-history)))))
(if (setq pa (org-refile--get-location answ tbl))
(let ((last-refile-loc (car org-refile-history)))
(org-refile-check-position pa)
((member default allowed) default)
(t nil))))
(org-trim
- (if allowed
- (funcall set-function
- prompt allowed nil
- (not (get-text-property 0 'org-unrestricted (caar allowed)))
- default nil default)
- (let ((all (mapcar #'list
- (append (org-property-values property)
- (and epom
- (org-with-point-at epom
- (org-property-values property)))))))
- (funcall set-function prompt all nil nil default nil current))))))
+ (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case t))
+ (if allowed
+ (funcall set-function
+ prompt allowed nil
+ (not (get-text-property 0 'org-unrestricted (caar allowed)))
+ default nil default)
+ (let ((all (mapcar #'list
+ (append (org-property-values property)
+ (and epom
+ (org-with-point-at epom
+ (org-property-values property)))))))
+ (funcall set-function prompt all nil nil default nil current)))))))
(defvar org-last-set-property nil)
(defvar org-last-set-property-value nil)
(defun org-read-property-name ()
"Read a property name."
- (let ((completion-ignore-case t)
- (default-prop (or (and (org-at-property-p)
+ (let ((default-prop (or (and (org-at-property-p)
(match-string-no-properties 2))
org-last-set-property)))
- (org-completing-read
- (concat "Property"
- (if default-prop (concat " [" default-prop "]") "")
- ": ")
- (mapcar #'list (org-buffer-property-keys nil t t))
- nil nil nil nil default-prop)))
+ (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case t))
+ (org-completing-read
+ (concat "Property"
+ (if default-prop (concat " [" default-prop "]") "")
+ ": ")
+ (mapcar #'list (org-buffer-property-keys nil t t))
+ nil nil nil nil default-prop))))
(defun org-set-property-and-value (use-last)
"Allow setting [PROPERTY]: [value] direction from prompt.
When use-default, don't even ask, just use the last
\"[PROPERTY]: [value]\" string from the history."
(interactive "P")
- (let* ((completion-ignore-case t)
- (pv (or (and use-last org-last-set-property-value)
- (org-completing-read
- "Enter a \"[Property]: [value]\" pair: "
- nil nil nil nil nil
- org-last-set-property-value)))
+ (let* ((pv (or (and use-last org-last-set-property-value)
+ (minibuffer-with-setup-hook
+ (lambda () (setq-local completion-ignore-case t))
+ (org-completing-read
+ "Enter a \"[Property]: [value]\" pair: "
+ nil nil nil nil nil
+ org-last-set-property-value))))
prop val)
(when (string-match "^[ \t]*\\([^:]+\\):[ \t]*\\(.*\\)[ \t]*$" pv)
(setq prop (match-string 1 pv)
(defun org-delete-property (property)
"In the current entry, delete PROPERTY."
(interactive
- (let* ((completion-ignore-case t)
- (cat (org-entry-get (point) "CATEGORY"))
+ (let* ((cat (org-entry-get (point) "CATEGORY"))
(props0 (org-entry-properties nil 'standard))
(props (if cat props0
(delete `("CATEGORY" . ,(org-get-category)) props0)))
(prop (if (< 1 (length props))
- (completing-read "Property: " props nil t)
+ (completing-read-case-insensitive "Property: " props nil t)
(caar props))))
(list prop)))
(if (not property)
"Remove PROPERTY globally, from all entries.
This function ignores narrowing, if any."
(interactive
- (let* ((completion-ignore-case t)
- (prop (completing-read
- "Globally remove property: "
- (mapcar #'list (org-buffer-property-keys)))))
- (list prop)))
+ (list
+ (completing-read-case-insensitive
+ "Globally remove property: "
+ (mapcar #'list (org-buffer-property-keys)))))
(org-with-wide-buffer
(goto-char (point-min))
(let ((count 0)
(let* ((process-alist (proced-marked-processes))
(pnum (if (= 1 (length process-alist))
"1 process"
- (format "%d processes" (length process-alist))))
- (completion-ignore-case t)
- (completion-extra-properties
- `(:annotation-function
- ,(lambda (s) (cdr (assoc s proced-signal-list))))))
+ (format "%d processes" (length process-alist)))))
(proced-with-processes-buffer process-alist
- (list (completing-read (format-prompt "Send signal [%s]"
- "TERM" pnum)
- proced-signal-list
- nil nil nil nil "TERM")
- process-alist)))
+ (list
+ (minibuffer-with-setup-hook
+ (lambda ()
+ (setq-local completion-ignore-case t
+ completion-extra-properties
+ `(:annotation-function
+ ,(lambda (s) (cdr (assoc s proced-signal-list))))))
+ (completing-read (format-prompt "Send signal [%s]"
+ "TERM" pnum)
+ proced-signal-list
+ nil nil nil nil "TERM"))
+ process-alist)))
proced-mode)
(unless (and signal process-alist)
;; of the code required for interactive and noninteractive calls so that
;; the command can be used more flexibly in noninteractive ways, too.
(unless (get 'proced-send-signal 'proced-outdated)
- (put 'proced-send-signal 'proced-outdated t)
- (message "Outdated usage of `proced-send-signal'")
- (sit-for 2))
+ (put 'proced-send-signal 'proced-outdated t)
+ (message "Outdated usage of `proced-send-signal'")
+ (sit-for 2))
(setq process-alist (proced-marked-processes))
(unless signal
(let ((pnum (if (= 1 (length process-alist))
"1 process"
- (format "%d processes" (length process-alist))))
- (completion-ignore-case t)
- (completion-extra-properties
- `(:annotation-function
- ,(lambda (s) (cdr (assoc s proced-signal-list))))))
+ (format "%d processes" (length process-alist)))))
(proced-with-processes-buffer process-alist
- (setq signal (completing-read (format-prompt "Send signal [%s]"
- "TERM" pnum)
- proced-signal-list
- nil nil nil nil "TERM"))))))
+ (setq signal
+ (minibuffer-with-setup-hook
+ (lambda ()
+ (setq-local completion-ignore-case t
+ completion-extra-properties
+ `(:annotation-function
+ ,(lambda (s) (cdr (assoc s proced-signal-list))))))
+ (completing-read (format-prompt "Send signal [%s]"
+ "TERM" pnum)
+ proced-signal-list
+ nil nil nil nil "TERM")))))))
(let (failures)
;; Why not always use `signal-process'? See
(if (string-match "\\`[0-9]+\\'" signal)
(string-to-number signal)
(make-symbol signal))
- signal))) ; number
+ signal))) ; number
(dolist (process process-alist)
(condition-case err
(unless (zerop (funcall
(file-remote-p default-directory)))
(proced-log "%s\n" (cdr process))
(push (cdr process) failures))
- (error ; catch errors from failed signals
+ (error ; catch errors from failed signals
(proced-log "%s\n" err)
(proced-log "%s\n" (cdr process))
(push (cdr process) failures)))))
(proced-log (current-buffer))
(proced-log "%s\n" (cdr process))
(push (cdr process) failures))
- (error ; catch errors from failed signals
+ (error ; catch errors from failed signals
(proced-log (current-buffer))
(proced-log "%s\n" (cdr process))
(push (cdr process) failures)))))))
(if (atom (cdr kind))
(list level nil (cdr kind))
(let* ((table (elt antlr-options-alists (1- level)))
- (completion-ignore-case t) ;dynamic
- (input (completing-read (format "Insert %s option: "
- (elt antlr-options-headings
- (1- level)))
- table)))
+ (input (completing-read-case-insensitive
+ (format "Insert %s option: "
+ (elt antlr-options-headings
+ (1- level)))
+ table)))
(list level input (cdr kind))))))
(defun antlr-options-menu-filter (level _menu-items)
TABLE can also be a function evaluation to an alist.
Used inside `antlr-options-alists'."
- (let* ((completion-ignore-case t) ; dynamic
- (table0 (and (or table table-x)
+ (let* ((table0 (and (or table table-x)
(append table-x
(if (functionp table) (funcall table) table))))
(input (if table0
- (completing-read prompt table0 nil nil initial-contents)
+ (completing-read-case-insensitive
+ prompt table0 nil nil initial-contents)
(read-from-minibuffer prompt initial-contents))))
(if (and as-string
(or (eq as-string t)
c-set-style is called like this from anywhere else, it will usually behave as
a null operation."
(interactive
- (list (let ((completion-ignore-case t)
- (prompt (format "Which %s indentation style? "
- mode-name)))
- (completing-read prompt c-style-alist nil t nil
- 'c-set-style-history
- c-indentation-style))))
+ (list (completing-read-case-insensitive
+ (format "Which %s indentation style? " mode-name)
+ c-style-alist nil t nil 'c-set-style-history c-indentation-style)))
(or c-buffer-is-cc-mode
(error "Buffer %s is not a CC Mode buffer (c-set-style)" (buffer-name)))
(or (stringp stylename)
"Using tags, return a completion table for the text around point.
If no tags table is loaded, do nothing and return nil."
(when (or tags-table-list tags-file-name)
- (let ((completion-ignore-case (find-tag--completion-ignore-case))
- (pattern (find-tag--default))
- beg)
+ (let ((pattern (find-tag--default)) beg)
(when pattern
(save-excursion
;; Avoid end-of-buffer error.