diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-08-31 00:28:55 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-08-31 00:29:40 -0700 |
commit | 6cd2629bd1b3ce77d29ac28e29237c94a4197116 (patch) | |
tree | 4e90f898cdb6f9d99489fce790a7ec64680824d5 | |
parent | 41ed99a322f35639bdc7402b1b7089d85782e8d3 (diff) | |
download | emacs-6cd2629bd1b3ce77d29ac28e29237c94a4197116.tar.gz |
Quoting fixes in lisp/org
* lisp/org/org-agenda.el (org-search-view, org-todo-list)
(org-tags-view):
* lisp/org/org-capture.el (org-capture-mode)
* lisp/org/org-ctags.el (org-ctags-visit-buffer-or-file)
(org-ctags-ask-append-topic):
* lisp/org/org.el (org-time-string-to-time)
(org-time-string-to-absolute):
* lisp/org/org-ctags.el (org-ctags-visit-buffer-or-file)
(org-ctags-ask-append-topic):
* lisp/org/org.el (org-time-string-to-time)
(org-time-string-to-absolute):
Respect ‘text-quoting-style’ in diagnostics.
* lisp/org/org-agenda.el (org-agenda-custom-commands)
(org-agenda-dim-blocked-tasks): Plural of TODO is TODOs, not TODO’s.
* lisp/org/org-capture.el (org-capture-fill-template):
Avoid contraction in output file that might be ASCII.
* lisp/org/org-compat.el (format-message):
Define if not already defined, for backward compatibility.
* lisp/org/org-src.el (org-edit-src-save):
* lisp/org/org.el (org-cycle, org-ctrl-c-ctrl-c):
Escape apostrophes in diagnostics.
-rw-r--r-- | lisp/org/org-agenda.el | 12 | ||||
-rw-r--r-- | lisp/org/org-capture.el | 5 | ||||
-rw-r--r-- | lisp/org/org-compat.el | 4 | ||||
-rw-r--r-- | lisp/org/org-ctags.el | 7 | ||||
-rw-r--r-- | lisp/org/org-src.el | 2 | ||||
-rw-r--r-- | lisp/org/org.el | 8 |
6 files changed, 23 insertions, 15 deletions
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index b73e130fad1..a3c8b84bfca 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -433,7 +433,7 @@ This will be spliced into the custom type of (defcustom org-agenda-custom-commands - '(("n" "Agenda and all TODO's" ((agenda "") (alltodo "")))) + '(("n" "Agenda and all TODOs" ((agenda "") (alltodo "")))) "Custom commands for the agenda. These commands will be offered on the splash screen displayed by the agenda dispatcher \\[org-agenda]. Each entry is a list like this: @@ -3815,7 +3815,7 @@ FILTER-ALIST is an alist of filters we need to apply when (defvar org-depend-tag-blocked) (defun org-agenda-dim-blocked-tasks (&optional invisible) - "Dim currently blocked TODO's in the agenda display. + "Dim currently blocked TODOs in the agenda display. When INVISIBLE is non-nil, hide currently blocked TODO instead of dimming them." (interactive "P") @@ -4647,7 +4647,8 @@ in `org-agenda-text-search-extra-files'." (add-text-properties pos (1- (point)) (list 'face 'org-warning)) (setq pos (point)) (unless org-agenda-multi - (insert "Press `[', `]' to add/sub word, `{', `}' to add/sub regexp, `C-u r' to edit\n") + (insert (substitute-command-keys + "Press `[', `]' to add/sub word, `{', `}' to add/sub regexp, `C-u r' to edit\n")) (add-text-properties pos (1- (point)) (list 'face 'org-agenda-structure)))) (org-agenda-mark-header-line (point-min)) @@ -4741,7 +4742,7 @@ for a keyword. A numeric prefix directly selects the Nth keyword in org-select-this-todo-keyword)) (setq pos (point)) (unless org-agenda-multi - (insert "Available with `N r': (0)[ALL]") + (insert (substitute-command-keys "Available with `N r': (0)[ALL]")) (let ((n 0) s) (mapc (lambda (x) (setq s (format "(%d)%s" (setq n (1+ n)) x)) @@ -4836,7 +4837,8 @@ The prefix arg TODO-ONLY limits the search to TODO entries." (add-text-properties pos (1- (point)) (list 'face 'org-warning)) (setq pos (point)) (unless org-agenda-multi - (insert "Press `C-u r' to search again with new search string\n")) + (insert (substitute-command-keys + "Press `C-u r' to search again with new search string\n"))) (add-text-properties pos (1- (point)) (list 'face 'org-agenda-structure))) (org-agenda-mark-header-line (point-min)) (when rtnall diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index 64e30152a5b..7b4b6eadc5e 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -434,7 +434,8 @@ Turning on this mode runs the normal hook `org-capture-mode-hook'." nil " Rem" org-capture-mode-map (org-set-local 'header-line-format - "Capture buffer. Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'.")) + (substitute-command-keys + "Capture buffer. Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'."))) (define-key org-capture-mode-map "\C-c\C-c" 'org-capture-finalize) (define-key org-capture-mode-map "\C-c\C-k" 'org-capture-kill) (define-key org-capture-mode-map "\C-c\C-w" 'org-capture-refile) @@ -1600,7 +1601,7 @@ The template may still contain \"%?\" for cursor positioning." (delete-region start end) (condition-case error (insert-file-contents filename) - (error (insert (format "%%![Couldn't insert %s: %s]" + (error (insert (format "%%![Could not insert %s: %s]" filename error))))))) ;; %() embedded elisp (org-capture-expand-embedded-elisp) diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index d3c477e7f3f..4c90cdae628 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -418,6 +418,10 @@ Pass BUFFER to the XEmacs version of `move-to-column'." (unless (fboundp 'user-error) (defalias 'user-error 'error)) +;; ‘format-message’ is available only from 25 on +(unless (fboundp 'format-message) + (defalias 'format-message 'format)) + (defmacro org-no-popups (&rest body) "Suppress popup windows. Let-bind some variables to nil around BODY to achieve the desired diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index 911ee2e923b..75de8c284e1 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el @@ -394,7 +394,8 @@ the new file." (org-open-file filename t)) ((or (eql create t) (and (eql create 'ask) - (y-or-n-p (format "File `%s.org' not found; create?" name)))) + (y-or-n-p (format-message + "File `%s.org' not found; create?" name)))) (org-ctags-open-file filename name)) (t ;; File does not exist, and we don't want to create it. nil)))) @@ -433,8 +434,8 @@ the heading a destination for the tag `NAME'." "This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS. Wrapper for org-ctags-append-topic, which first asks the user if they want to append a new topic." - (if (y-or-n-p (format "Topic `%s' not found; append to end of buffer?" - name)) + (if (y-or-n-p (format-message + "Topic `%s' not found; append to end of buffer?" name)) (org-ctags-append-topic name narrowp) nil)) diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 4f7998678be..8a6c77a8182 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -801,7 +801,7 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"." "Save parent buffer with current state source-code buffer." (interactive) (if (string-match "Fixed Width" (buffer-name)) - (user-error "Use C-c ' to save and exit, C-c C-k to abort editing") + (user-error "%s" "Use C-c ' to save and exit, C-c C-k to abort editing") (org-src-in-org-buffer (save-buffer)))) (declare-function org-babel-tangle "ob-tangle" (&optional arg target-file lang)) diff --git a/lisp/org/org.el b/lisp/org/org.el index acfc6f0743e..963da77f592 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -6629,7 +6629,7 @@ in special contexts. ;; Table: enter it or move to the next field. ((org-at-table-p 'any) (if (org-at-table.el-p) - (message "Use C-c ' to edit table.el tables") + (message "%s" "Use C-c ' to edit table.el tables") (if arg (org-table-edit-field t) (org-table-justify-field-maybe) (call-interactively 'org-table-next-field)))) @@ -17102,7 +17102,7 @@ days in order to avoid rounding problems." (error (error "Bad timestamp `%s'%s\nError was: %s" s (if (not (and buffer pos)) "" - (format " at %d in buffer `%s'" pos buffer)) + (format-message " at %d in buffer `%s'" pos buffer)) (cdr errdata))))) (defun org-time-string-to-seconds (s) @@ -17130,7 +17130,7 @@ The variable `date' is bound by the calendar when this is called." (error (error "Bad timestamp `%s'%s\nError was: %s" s (if (not (and buffer pos)) "" - (format " at %d in buffer `%s'" pos buffer)) + (format-message " at %d in buffer `%s'" pos buffer)) (cdr errdata)))))))) (defun org-days-to-iso-week (days) @@ -20446,7 +20446,7 @@ This command does many different things, depending on context: ;; a `table.el' type, just give up. At a table row or ;; cell, maybe recalculate line but always align table. (if (eq (org-element-property :type context) 'table.el) - (message "Use C-c ' to edit table.el tables") + (message "%s" "Use C-c ' to edit table.el tables") (let ((org-enable-table-editor t)) (if (or (eq type 'table) ;; Check if point is at a TBLFM line. |