(let ((files (if (file-exists-p todo-directory)
(mapcar 'file-truename
(directory-files todo-directory t
- (if archives "\.toda$" "\.todo$") t)))))
+ (if archives "\\.toda$" "\\.todo$") t)))))
(sort files (lambda (s1 s2) (let ((cis1 (upcase s1))
(cis2 (upcase s2)))
(string< cis1 cis2))))))
(widget-put
widget :error
(format-message
- "Invalid value: must be distinct from ‘todo-item-mark’"))
+ "Invalid value: must be distinct from `todo-item-mark'"))
widget)))
:initialize 'custom-initialize-default
:set 'todo-reset-prefix
(snname (todo-short-file-name nname))
(files (directory-files todo-directory t
(concat ".*" (regexp-quote soname)
- ".*\.tod[aorty]$") t)))
+ ".*\\.tod[aorty]$") t)))
(dolist (f files)
(let* ((sfname (todo-short-file-name f))
(fext (file-name-extension f t))
"deleting it will also delete the file.\n"
"Do you want to proceed? ")))
((> archived 0)
- (todo-y-or-n-p (concat "This category has archived items; "
+ (todo-y-or-n-p (format-message
+ (concat "This category has archived items; "
"the archived category will remain\n"
"after deleting the todo category. "
"Do you still want to delete it\n"
- "(see ‘todo-skip-archived-categories’ "
- "for another option)? ")))
+ "(see `todo-skip-archived-categories' "
+ "for another option)? "))))
(t
(todo-y-or-n-p (concat "Permanently remove category \"" cat
"\"" (and arg " and all its entries")
(widget-put
widget :error
(format-message
- "Invalid value: must be distinct from ‘todo-prefix’"))
+ "Invalid value: must be distinct from `todo-prefix'"))
widget)))
:set (lambda (symbol value)
(custom-set-default symbol (propertize value 'face 'todo-mark)))
(defun todo-find-filtered-items-file ()
"Choose a filtered items file and visit it."
(interactive)
- (let ((files (directory-files todo-directory t "\.tod[rty]$" t))
+ (let ((files (directory-files todo-directory t "\\.tod[rty]$" t))
falist file)
(dolist (f files)
(let ((type (cond ((equal (file-name-extension f) "todr") "regexp")
(widen)
(goto-char (point-min))
(setq todo-categories
- (if (looking-at "\(\(\"")
+ (if (looking-at "((\"")
(read (buffer-substring-no-properties
(line-beginning-position)
(line-end-position)))
;; Warn user if categories sexp has changed.
(unless (string= ssexp cats)
(message (concat "The sexp at the beginning of the file differs "
- "from the value of ‘todo-categories’.\n"
+ "from the value of `todo-categories'.\n"
"If the sexp is wrong, you can fix it with "
"M-x todo-repair-categories-sexp,\n"
"but note this reverts any changes you have "
(todo-insert-item--this-key)
todo-insert-item--argsleft)))))))))
(setq todo-insert-item--argsleft todo-insert-item--newargsleft))
- (when prompt (message "Press a key (so far ‘%s’): %s"
+ (when prompt (message "Press a key (so far `%s'): %s"
todo-insert-item--keys-so-far prompt))
(set-transient-map map)
(setq todo-insert-item--argsleft argsleft)))
'(add/edit delete))
" comment"))))
params " "))
- (this-key (let ((key (read-key (concat todo-edit-item--prompt p->k))))
+ (key-prompt (substitute-command-keys todo-edit-item--prompt))
+ (this-key (let ((key (read-key (concat key-prompt p->k))))
(and (characterp key) (char-to-string key))))
(this-param (car (rassoc this-key params))))
(pcase this-param
(`delete (todo-edit-item--text 'comment-delete))
(`diary (todo-edit-item--diary-inclusion))
(`nonmarking (todo-edit-item--diary-inclusion 'nonmarking))
- (`date (let ((todo-edit-item--prompt "Press a key (so far ‘e d’): "))
+ (`date (let ((todo-edit-item--prompt "Press a key (so far `e d'): "))
(todo-edit-item--next-key
todo-edit-item--date-param-key-alist arg)))
(`full (progn (todo-edit-item--header 'date)
(when deleted
(let ((pl (> (length deleted) 1))
(names (mapconcat (lambda (f) (concat "\"" f "\"")) deleted ", ")))
- (message (concat "File" (if pl "s" "") " " names " ha" (if pl "ve" "s")
+ (message (concat "File" (if pl "s" "") " %s ha" (if pl "ve" "s")
" been deleted and removed from\n"
- "the list of category completion files")))
+ "the list of category completion files")
+ names))
(todo-reevaluate-category-completions-files-defcustom)
(custom-set-default 'todo-category-completions-files
(symbol-value 'todo-category-completions-files))
"The :set function for user option `todo-nondiary-marker'."
(let* ((oldvalue (symbol-value symbol))
(files (append todo-files todo-archives
- (directory-files todo-directory t "\.tod[rty]$" t))))
+ (directory-files todo-directory t "\\.tod[rty]$" t))))
(custom-set-default symbol value)
;; Need to reset these to get font-locking right.
(setq todo-nondiary-start (nth 0 todo-nondiary-marker)
"The :set function for user option `todo-done-string'."
(let ((oldvalue (symbol-value symbol))
(files (append todo-files todo-archives
- (directory-files todo-directory t "\.todr$" t))))
+ (directory-files todo-directory t "\\.todr$" t))))
(custom-set-default symbol value)
;; Need to reset this to get font-locking right.
(setq todo-done-string-start
"The :set function for user option `todo-comment-string'."
(let ((oldvalue (symbol-value symbol))
(files (append todo-files todo-archives
- (directory-files todo-directory t "\.todr$" t))))
+ (directory-files todo-directory t "\\.todr$" t))))
(custom-set-default symbol value)
(when (not (equal value oldvalue))
(dolist (f files)
"The :set function for user option `todo-highlight-item'."
(let ((oldvalue (symbol-value symbol))
(files (append todo-files todo-archives
- (directory-files todo-directory t "\.tod[rty]$" t))))
+ (directory-files todo-directory t "\\.tod[rty]$" t))))
(custom-set-default symbol value)
(when (not (equal value oldvalue))
(dolist (f files)
(if (called-interactively-p 'any)
(message "%s"
(substitute-command-keys
- "Type ‘\\[todo-show]’ to enter Todo mode"))
+ "Type `\\[todo-show]' to enter Todo mode"))
(todo-modes-set-1)
(todo-modes-set-2)
(todo-modes-set-3)