Fix whitespace and compiler wanings

This commit is contained in:
Carsten Dominik 2010-04-01 13:11:54 +02:00
parent f813b09747
commit 8fdf80bb5b
19 changed files with 55 additions and 57 deletions

View File

@ -606,7 +606,7 @@ past Don't show entries with a deadline timestamp for today or in the past.
future Don't show entries with a deadline timestamp in the future, not even
when they become `near' ones. Use it with caution.
all Ignore all TODO entries that do have a deadline.
all Ignore all TODO entries that do have a deadline.
t Same as `near', for backward compatibility.
@ -894,12 +894,12 @@ This function makes sure that dates are aligned for easy reading."
(format "%-10s %2d %s %4d%s"
dayname day monthname year weekstring)))
(defcustom org-agenda-time-leading-zero nil
(defcustom org-agenda-time-leading-zero nil
"Non-nil means use leading zero for military times in agenda.
For example, 9:30am would become 09:30 rather than 9:30."
:group 'org-agenda-daily/weekly
:type 'boolean)
(defcustom org-agenda-weekend-days '(6 0)
"Which days are weekend?
These days get the special face `org-agenda-date-weekend' in the agenda
@ -3425,7 +3425,7 @@ as a whole, to incude whitespace.
that can also be achieved with a prefix argument.
- If (possibly after star and exclamation mark) the search string starts
with a colon, this will mean that the (non-regexp) snippets of the
Boolean search must match as full words.
Boolean search must match as full words.
This command searches the agenda files, and in addition the files listed
in `org-agenda-text-search-extra-files'."

View File

@ -40,7 +40,7 @@
:type '(choice
(const org-archive-subtree)
(const org-archive-to-archive-sibling)
(const org-archive-set-tag)))
(const org-archive-set-tag)))
(defcustom org-archive-reversed-order nil
"Non-nil means make the tree first child under the archive heading, not last."

View File

@ -122,7 +122,7 @@ utf8 Use all UTF-8 characters")
(if interactivep
(call-interactively command)
(apply command args))))
;;;###autoload
(defun org-export-as-ascii-to-buffer (arg)

View File

@ -256,7 +256,7 @@ in org-export-latex-classes."
(and frame-level (= level frame-level)))
;; A frame
(org-beamer-get-special props)
(setq in (org-fill-template
"\\begin{frame}%a%A%o%T%S%x"
(list (cons "a" (or action ""))

View File

@ -468,7 +468,6 @@ If not, show simply the clocked time like 01:50."
(concat (org-propertize
org-task-overrun-text
'face 'org-mode-line-clock-overrun) org-mode-line-string)))
(force-mode-line-update))
(defun org-clock-get-clocked-time ()
@ -523,7 +522,7 @@ Notification is shown only once."
(when (org-clocking-p)
(let ((effort-in-minutes (org-hh:mm-string-to-minutes org-clock-effort))
(clocked-time (org-clock-get-clocked-time)))
(if (setq org-task-overrun
(if (setq org-task-overrun
(if (or (null effort-in-minutes) (zerop effort-in-minutes))
nil
(>= clocked-time effort-in-minutes)))

View File

@ -94,7 +94,7 @@ heading. This can also be overridden in the CRYPTKEY property."
"Returns the encryption key for the current heading."
(save-excursion
(org-back-to-heading t)
(or (org-entry-get nil "CRYPTKEY" 'selective)
(or (org-entry-get nil "CRYPTKEY" 'selective)
org-crypt-key
(and (boundp 'epa-file-encrypt-to) epa-file-encrypt-to)
(error "No crypt key set"))))
@ -116,7 +116,7 @@ heading. This can also be overridden in the CRYPTKEY property."
(org-back-over-empty-lines)
(setq end (point)
encrypted-text
(epg-encrypt-string
(epg-encrypt-string
epg-context
(buffer-substring-no-properties beg end)
(epg-list-keys epg-context crypt-key)))
@ -137,12 +137,12 @@ heading. This can also be overridden in the CRYPTKEY property."
(forward-line)
(when (looking-at "-----BEGIN PGP MESSAGE-----")
(let* ((beg (point))
(end (save-excursion
(end (save-excursion
(search-forward "-----END PGP MESSAGE-----")
(forward-line)
(point)))
(epg-context (epg-make-context nil t t))
(decrypted-text
(decrypted-text
(decode-coding-string
(epg-decrypt-string
epg-context
@ -162,19 +162,19 @@ heading. This can also be overridden in the CRYPTKEY property."
(defun org-decrypt-entries ()
"Decrypt all entries in the current buffer."
(interactive)
(org-scan-tags
(org-scan-tags
'org-decrypt-entry
(cdr (org-make-tags-matcher org-crypt-tag-matcher))))
(defun org-crypt-use-before-save-magic ()
"Adds a hook that will automatically encrypt entries before a
file is saved to disk."
(add-hook
'org-mode-hook
(add-hook
'org-mode-hook
(lambda () (add-hook 'before-save-hook 'org-encrypt-entries nil t))))
(add-hook 'org-reveal-start-hook 'org-decrypt-entry)
(provide 'org-crypt)
;; arch-tag: 8202ed2c-221e-4001-9e4b-54674a7e846e

View File

@ -131,7 +131,7 @@ tag destinations in org-mode files.
Format is: /REGEXP/TAGNAME/FLAGS,TAGTYPE/
See the ctags documentation for more information.")
(defcustom org-ctags-path-to-ctags
(defcustom org-ctags-path-to-ctags
(case system-type
(windows-nt "ctags.exe")
(darwin "ctags-exuberant")
@ -141,14 +141,14 @@ See the ctags documentation for more information.")
:type 'file)
(defcustom org-ctags-open-link-functions
'(org-ctags-find-tag
'(org-ctags-find-tag
org-ctags-ask-rebuild-tags-file-then-find-tag
org-ctags-ask-append-topic)
"List of functions to be prepended to ORG-OPEN-LINK-FUNCTIONS when
ORG-CTAGS is active."
:group 'org-ctags
:type 'hook
:options '(org-ctags-find-tag
:options '(org-ctags-find-tag
org-ctags-ask-rebuild-tags-file-then-find-tag
org-ctags-rebuild-tags-file-then-find-tag
org-ctags-ask-append-topic
@ -196,7 +196,7 @@ The following patterns are replaced in the string:
(setq org-ctags-enabled-p t)
(dolist (fn org-ctags-open-link-functions)
(add-hook 'org-open-link-functions fn t)))
;;; General utility functions. ===============================================
;;; These work outside org-ctags mode.

View File

@ -1696,7 +1696,7 @@ When it is nil, all comments will be removed."
(while (re-search-forward "^[ \t]*|" nil t)
(beginning-of-line 1)
(if (or (looking-at "[ \t]*| *[!_^] *|")
(not
(not
(memq
nil
(mapcar

View File

@ -703,7 +703,7 @@ If it is less than 8, the level-1 face gets re-used for level N+1 etc."
(org-copy-face 'modeline 'org-mode-line-clock
"Face used for clock display in mode line.")
(org-copy-face 'modeline 'org-mode-line-clock-overrun
(org-copy-face 'modeline 'org-mode-line-clock-overrun
"Face used for clock display for overrun tasks in mode line."
:background "red")

View File

@ -405,7 +405,7 @@ referenced sequence."
(fill-paragraph)))
(if (not a) (push (list ref marker def (if idef t nil))
ref-table)))))
;; First find and remove the footnote section
(goto-char (point-min))
(cond

View File

@ -682,7 +682,7 @@ Otherwise give an error say the file exists."
(while (>= current-level next-level)
(with-current-buffer mm-buffer
(insert "</node>\n")
(setq current-level
(setq current-level
(- current-level (if odd-only 2 1))))))
(setq this-node-end (1+ next-node-end))
(setq this-m2 next-m2)
@ -706,7 +706,7 @@ Otherwise give an error say the file exists."
(with-current-buffer mm-buffer
(while (> current-level base-level)
(insert "</node>\n")
(setq current-level
(setq current-level
(- current-level (if odd-only 2 1)))
))
(with-current-buffer mm-buffer

View File

@ -443,7 +443,7 @@ This may also be a function, building and inserting the postamble.")
(if (string-match "\\`[a-z]\\{1,10\\}:\\(.+\\)" label)
(setq l1 (substring label (match-beginning 1)))
(setq l1 label)))
(replace-match (format "[[#%s][l1]]" label l1) t t)))))
(replace-match (format "[[#%s][%s]]" label l1) t t)))))
;;;###autoload
(defun org-export-as-html-and-open (arg)
@ -1014,7 +1014,7 @@ lang=\"%s\" xml:lang=\"%s\">
"\" class=\"target\">" (match-string 1 line)
"@</a> ")
t t line)))))
(setq line (org-html-handle-time-stamps line))
;; replace "&" by "&amp;", "<" and ">" by "&lt;" and "&gt;"
@ -1897,7 +1897,7 @@ If there are links in the string, don't modify these."
(push l res))
(push (org-html-do-expand string) res)
(apply 'concat (nreverse res)))))
(defun org-html-do-expand (s)
"Apply all active conversions to translate special ASCII to HTML."
(setq s (org-html-protect s))

View File

@ -611,7 +611,7 @@ when PUB-DIR is set, use this as the publishing directory."
(file-name-sans-extension
(file-name-nondirectory buffer-file-name)))
"No Title"))
(filename
(filename
(and (not to-buffer)
(concat
(file-name-as-directory
@ -1457,7 +1457,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(let ((ass (org-entity-get string-after)))
(cond
(ass (if (nth 2 ass)
(concat string-before
(concat string-before
(org-export-latex-protect-string
(concat "$" (nth 1 ass) "$")))
(concat string-before (org-export-latex-protect-string
@ -1481,7 +1481,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(concat string-before "\\textbackslash{}" string-after)))
(t (org-export-latex-protect-string
(concat string-before "\\textbackslash{}" string-after))))))
(defun org-export-latex-keywords ()
"Convert special keywords to LaTeX."
(goto-char (point-min))
@ -1672,7 +1672,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(setq tbl (mapconcat 'identity (delq nil lines) "\n"))))
(when (and align (string-match "\\\\begin{tabular}{.*}" tbl))
(setq tbl (replace-match (concat "\\begin{tabular}{" align "}")
t t tbl)))
t t tbl)))
(and (get-buffer "*org-export-table*")
(kill-buffer (get-buffer "*org-export-table*")))
(beginning-of-line 0)
@ -1830,7 +1830,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(org-remove-initial-hash
(org-solidify-link-text raw-path))
desc)))
(path
(path
(when (org-at-table-p)
;; There is a strange problem when we have a link in a table,
;; ampersands then cause a problem. I think this must be
@ -1851,7 +1851,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(setq wrapp t floatp nil attr (replace-match "" t t attr)))
(if (string-match "[ \t]*\\<float\\>" attr)
(setq wrapp nil floatp t attr (replace-match "" t t attr))))
(setq placement
(cond
(wrapp "{l}{0.5\\textwidth}")

View File

@ -263,11 +263,10 @@ create all custom agenda views, for upload to the mobile phone."
(kill-buffer a-buffer)
(let ((cw (selected-window)))
(select-window (get-buffer-window a-buffer))
(org-agenda-redo)
(select-window cw)))))
(message "Files for mobile viewer staged"))
(defvar org-mobile-before-process-capture-hook nil
"Hook that is run after content was moved to `org-mobile-inbox-for-pull'.
The inbox file is visited by the current buffer, and the buffer is
@ -330,7 +329,7 @@ agenda view showing the flagged items."
(def-todo (default-value 'org-todo-keywords))
(def-tags (default-value 'org-tag-alist))
file link-name todo-kwds done-kwds tags drawers entry kwds dwds twds)
(org-prepare-agenda-buffers (mapcar 'car files-alist))
(setq done-kwds (org-uniquify org-done-keywords-for-agenda))
(setq todo-kwds (org-delete-all
@ -886,7 +885,7 @@ be returned that indicates what went wrong."
(org-todo (or new 'none)) t)
(t (error "State before change was expected as \"%s\", but is \"%s\""
old current))))
((eq what 'tags)
(setq current (org-get-tags)
new1 (and new (org-split-string new ":+"))
@ -899,7 +898,7 @@ be returned that indicates what went wrong."
(org-set-tags-to new1) t)
(t (error "Tags before change were expected as \"%s\", but are \"%s\""
(or old "") (or current "")))))
((eq what 'priority)
(when (looking-at org-complex-heading-regexp)
(setq current (and (match-end 3) (substring (match-string 3) 2 3)))
@ -925,7 +924,7 @@ be returned that indicates what went wrong."
(delete-region (point) (+ (point) (length current)))
(org-set-tags nil 'align))
(t (error "Heading changed in MobileOrg and on the computer")))))
((eq what 'body)
(setq current (buffer-substring (min (1+ (point-at-eol)) (point-max))
(save-excursion (outline-next-heading)
@ -945,7 +944,7 @@ be returned that indicates what went wrong."
(point))))
t)
(t (error "Body was changed in MobileOrg and on the computer")))))))
(defun org-mobile-tags-same-p (list1 list2)
"Are the two tag lists the same?"

View File

@ -42,11 +42,11 @@
(defun org-publish-sanitize-plist (plist)
(mapcar (lambda (x)
(or (cdr (assoq x '((:index-filename . :sitemap-filename)
(:index-title . :sitemap-title)
(:index-function . :sitemap-function)
(:index-style . :sitemap-style)
(:auto-index . :auto-sitemap))))
(or (cdr (assq x '((:index-filename . :sitemap-filename)
(:index-title . :sitemap-title)
(:index-function . :sitemap-function)
(:index-style . :sitemap-style)
(:auto-index . :auto-sitemap))))
x))
plist))
@ -740,7 +740,7 @@ the project."
(cdr (assoc target org-export-id-target-alist))
target))
(push (cons entry target) index)))
(with-temp-file
(with-temp-file
(concat (file-name-sans-extension org-current-export-file) ".orgx")
(dolist (entry (nreverse index))
(insert (format "INDEX: (%s) %s\n" (cdr entry) (car entry)))))))

View File

@ -131,7 +131,7 @@ Furthermore, the following %-escapes will be replaced with content:
You may define a prompt like %^{Please specify birthday
%n user name (taken from `user-full-name')
%a annotation, normally the link created with org-store-link
%i initial content, copied from the active region. If %i is
%i initial content, copied from the active region. If %i is
indented, the entire inserted text will be indented as well.
%c current kill ring head
%x content of the X clipboard
@ -1025,7 +1025,7 @@ See also the variable `org-reverse-note-order'."
(beginning-of-line 2)
(end-of-line 1)
(insert "\n"))))
(org-paste-subtree (if clocksp
(org-paste-subtree (if clocksp
level
(org-get-valid-level level 1)) txt)
(and org-auto-align-tags (org-set-tags nil t))

View File

@ -192,7 +192,7 @@ There is a mode hook, and keybindings for `org-edit-src-exit' and
The example is copied to a separate buffer, and that buffer is switched
to the correct language mode. When done, exit with \\[org-edit-src-exit].
This will remove the original code in the Org buffer, and replace it with
the edited version. Optional argument CONTEXT is used by
the edited version. Optional argument CONTEXT is used by
\\[org-edit-src-save] when calling this function."
(interactive)
(unless (eq context 'save)

View File

@ -1028,10 +1028,10 @@ When ALIGN is set, als realign the table."
(progn (org-table-goto-column column nil 'force) t)
(org-table-get-field column value)))
(and align (org-table-align))))
(defun org-table-current-line ()
"Return the index of the current data line."
(let ((pos (point)) (end (org-table-end)) (cnt 0))
(let ((pos (point)) (end (org-table-end)) (cnt 0))
(save-excursion
(goto-char (org-table-begin))
(while (and (re-search-forward org-table-dataline-regexp end t)

View File

@ -5774,7 +5774,7 @@ If USE-MARKERS is set, return the positions as markers."
(save-restriction
(widen)
(delq nil
(mapcar (lambda (o)
(mapcar (lambda (o)
(when (eq (org-overlay-get o 'invisible) 'outline)
(setq beg (org-overlay-start o)
end (org-overlay-end o))
@ -9102,7 +9102,7 @@ and to use an external application to visit the file.
Optional LINE specifies a line to go to, optional SEARCH a string to
search for. If LINE or SEARCH is given, but IN-EMACS is nil, it will
be assumed that org-open-file was called to open a file: link, and the
original link to match against org-file-apps will be reconstructed
original link to match against org-file-apps will be reconstructed
from PATH and whichever of LINE or SEARCH is given.
If the file does not exist, an error is thrown."
@ -10525,7 +10525,7 @@ This should be called with the cursor in a line with a statistics cookie."
(org-update-parent-todo-statistics))
(goto-char pos)
(beginning-of-line 1)
(while (re-search-forward
(while (re-search-forward
"\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)"
(point-at-eol) t)
(replace-match (if (match-end 2) "[100%]" "[0/0]") t t)))))
@ -14754,7 +14754,7 @@ the buffer and restores the previous window configuration."
(insert
(mapconcat
(lambda (f) ;; Keep un-expanded entries.
(if (setq u (assoc f fe))
(if (setq u (assoc f fe))
(cdr u)
f))
list "\n")