org.el: Don't quote lambdas and known functions. Fix indentation.

* org.el (org-confirm-shell-link-function)
(org-todo-keywords, org-time-stamp-rounding-minutes)
(org-file-contents, org-update-radio-target-regexp)
(org-hide-block-toggle-all, org-hide-block-all)
(org-open-at-point, org-sparse-tree, org-timestamp-change)
(org-create-formula-image, org-insert-comment)
(org-comment-or-uncomment-region, org-comment-dwim): Don't
quote lambdas and known functions.
This commit is contained in:
Bastien Guerry 2014-05-30 08:52:19 +02:00
parent f86d99a292
commit 63ce68af06
1 changed files with 261 additions and 261 deletions

View File

@ -2037,7 +2037,7 @@ single keystroke rather than having to type \"yes\"."
(const :tag "no confirmation (dangerous)" nil)))
(put 'org-confirm-shell-link-function
'safe-local-variable
#'(lambda (x) (member x '(yes-or-no-p y-or-n-p))))
(lambda (x) (member x '(yes-or-no-p y-or-n-p))))
(defcustom org-confirm-shell-link-not-regexp ""
"A regexp to skip confirmation for shell links."
@ -2063,7 +2063,7 @@ single keystroke rather than having to type \"yes\"."
(const :tag "no confirmation (dangerous)" nil)))
(put 'org-confirm-shell-link-function
'safe-local-variable
#'(lambda (x) (member x '(yes-or-no-p y-or-n-p))))
(lambda (x) (member x '(yes-or-no-p y-or-n-p))))
(defcustom org-confirm-elisp-link-not-regexp ""
"A regexp to skip confirmation for Elisp links."
@ -2502,7 +2502,7 @@ taken from the (otherwise obsolete) variable `org-todo-interpretation'."
(lambda (widget)
(widget-put widget
:args (mapcar
#'(lambda (x)
(lambda (x)
(widget-convert
(cons 'const x)))
org-todo-interpretation-widgets))
@ -3040,7 +3040,7 @@ a double prefix argument to a time stamp command like `C-c .' or `C-c !',
and by using a prefix arg to `S-up/down' to specify the exact number
of minutes to shift."
:group 'org-time
:get #'(lambda (var) ; Make sure both elements are there
:get (lambda (var) ; Make sure both elements are there
(if (integerp (default-value var))
(list (default-value var) 5)
(default-value var)))
@ -3746,7 +3746,7 @@ or contain a special line
If the file does not specify a category, then file's base name
is used instead.")
(make-variable-buffer-local 'org-category)
(put 'org-category 'safe-local-variable #'(lambda (x) (or (symbolp x) (stringp x))))
(put 'org-category 'safe-local-variable (lambda (x) (or (symbolp x) (stringp x))))
(defcustom org-agenda-files nil
"The files to be used for agenda display.
@ -5268,7 +5268,7 @@ Support for group tags is controlled by the option
(with-temp-buffer
(insert-file-contents file)
(buffer-string))
(funcall (if noerror #'message #'error)
(funcall (if noerror 'message 'error)
"Cannot read file \"%s\"%s"
file
(let ((from (buffer-file-name (buffer-base-buffer))))
@ -6000,7 +6000,7 @@ by a #."
(org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
t))
(defun org-fontify-macros (limit)
(defun org-fontify-macros (limit)
"Fontify macros."
(when (re-search-forward "\\({{{\\).+?\\(}}}\\)" limit t)
(add-text-properties
@ -6153,7 +6153,7 @@ Also refresh fontification if needed."
(and targets
(concat before-re
(mapconcat
#'(lambda (x)
(lambda (x)
(replace-regexp-in-string
" +" "\\s-+" (regexp-quote x) t t))
targets
@ -6166,7 +6166,7 @@ Also refresh fontification if needed."
(t
(concat before-re
(mapconcat
#'(lambda (re)
(lambda (re)
(substring re (length before-re)
(- (length after-re))))
(list old-regexp org-target-link-regexp)
@ -7310,13 +7310,13 @@ Optional arguments START and END can be used to limit the range."
(defun org-hide-block-toggle-all ()
"Toggle the visibility of all blocks in the current buffer."
(org-block-map #'org-hide-block-toggle))
(org-block-map 'org-hide-block-toggle))
(defun org-hide-block-all ()
"Fold all blocks in the current buffer."
(interactive)
(org-show-block-all)
(org-block-map #'org-hide-block-toggle-maybe))
(org-block-map 'org-hide-block-toggle-maybe))
(defun org-show-block-all ()
"Unfold all blocks in the current buffer."
@ -10615,7 +10615,7 @@ the link at point in comments and the first link in a property
drawer line."
(interactive "P")
;; On a code block, open block's results.
(unless (call-interactively #'org-babel-open-src-block-result)
(unless (call-interactively 'org-babel-open-src-block-result)
(org-load-modules-maybe)
(move-marker org-open-link-marker (point))
(setq org-window-config-before-follow-link (current-window-configuration))
@ -10716,7 +10716,7 @@ drawer line."
(funcall dedicated-function
(concat path
(and option (concat "::" option))))
(apply #'org-open-file
(apply 'org-open-file
path
(cond (arg)
((equal app "emacs") 'emacs)
@ -13757,22 +13757,22 @@ D Show deadlines and scheduled items between a date range."
arg
(cadr (memq type '(scheduled-or-deadline all scheduled deadline active
inactive closed)))))
(?d (call-interactively #'org-check-deadlines))
(?b (call-interactively #'org-check-before-date))
(?a (call-interactively #'org-check-after-date))
(?D (call-interactively #'org-check-dates-range))
(?t (call-interactively #'org-show-todo-tree))
(?d (call-interactively 'org-check-deadlines))
(?b (call-interactively 'org-check-before-date))
(?a (call-interactively 'org-check-after-date))
(?D (call-interactively 'org-check-dates-range))
(?t (call-interactively 'org-show-todo-tree))
(?T (org-show-todo-tree '(4)))
(?m (call-interactively #'org-match-sparse-tree))
(?m (call-interactively 'org-match-sparse-tree))
((?p ?P)
(let* ((kwd (org-icompleting-read
"Property: " (mapcar #'list (org-buffer-property-keys))))
"Property: " (mapcar 'list (org-buffer-property-keys))))
(value (org-icompleting-read
"Value: " (mapcar #'list (org-property-values kwd)))))
"Value: " (mapcar 'list (org-property-values kwd)))))
(unless (string-match "\\`{.*}\\'" value)
(setq value (concat "\"" value "\"")))
(org-match-sparse-tree arg (concat kwd "=" value))))
((?r ?R ?/) (call-interactively #'org-occur))
((?r ?R ?/) (call-interactively 'org-occur))
(otherwise (user-error "No such sparse tree command \"%c\"" answer)))))
(defvar org-occur-highlights nil
@ -17693,7 +17693,7 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like \"--2d\"."
(let* ((p (save-excursion (org-back-to-heading t)))
(cl (mapcar (lambda(c) (abs (- (marker-position c) p))) org-clock-history))
(clfixnth
(+ fixnext (- (length cl) (or (length (member (apply #'min cl) cl)) 100))))
(+ fixnext (- (length cl) (or (length (member (apply 'min cl) cl)) 100))))
(clfixpos (if (> 0 clfixnth) nil (nth clfixnth org-clock-history))))
(if (not clfixpos)
(message "No clock to adjust")
@ -18811,11 +18811,11 @@ share a good deal of logic."
('dvipng
(org-check-external-command
"dvipng" "needed to convert LaTeX fragments to images")
#'org-create-formula-image-with-dvipng)
'org-create-formula-image-with-dvipng)
('imagemagick
(org-check-external-command
"convert" "you need to install imagemagick")
#'org-create-formula-image-with-imagemagick)
'org-create-formula-image-with-imagemagick)
(t (error
"Invalid value of `org-latex-create-formula-image-program'")))
string tofile options buffer))
@ -23109,7 +23109,7 @@ major mode."
(skip-chars-backward " \r\t\n")
(line-beginning-position))
(point))))
(org-babel-do-in-edit-buffer (call-interactively #'comment-dwim))
(org-babel-do-in-edit-buffer (call-interactively 'comment-dwim))
(beginning-of-line)
(if (looking-at "\\s-*$") (delete-region (point) (point-at-eol))
(open-line 1))
@ -23133,7 +23133,7 @@ strictly within a source block, use appropriate comment syntax."
(skip-chars-backward " \r\t\n")
(line-beginning-position))
end)))
(org-babel-do-in-edit-buffer (call-interactively #'comment-dwim))
(org-babel-do-in-edit-buffer (call-interactively 'comment-dwim))
(save-restriction
;; Restrict region
(narrow-to-region (save-excursion (goto-char beg)
@ -23187,8 +23187,8 @@ strictly within a source block, use appropriate comment syntax."
(interactive "*P")
"Call `comment-dwim' within a source edit buffer if needed."
(if (org-in-src-block-p)
(org-babel-do-in-edit-buffer (call-interactively #'comment-dwim))
(call-interactively #'comment-dwim)))
(org-babel-do-in-edit-buffer (call-interactively 'comment-dwim))
(call-interactively 'comment-dwim)))
;;; Planning