diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-05-23 14:57:17 -0300 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-05-23 14:57:17 -0300 |
commit | 4f91a8160fe71295b7ad4d6e3f90f004caa3546c (patch) | |
tree | c0f3f767b785559ee0387e7cfb54a2a1aa06bcd5 /lisp/org | |
parent | 782fc81943849d699d74c3039be80d4068bb3422 (diff) | |
download | emacs-4f91a8160fe71295b7ad4d6e3f90f004caa3546c.tar.gz |
Don't quote lambda expressions with `quote'.
Diffstat (limited to 'lisp/org')
-rw-r--r-- | lisp/org/org-ascii.el | 96 | ||||
-rw-r--r-- | lisp/org/org-attach.el | 8 | ||||
-rw-r--r-- | lisp/org/org-exp.el | 2 | ||||
-rw-r--r-- | lisp/org/org-html.el | 134 | ||||
-rw-r--r-- | lisp/org/org-mouse.el | 16 | ||||
-rw-r--r-- | lisp/org/org-src.el | 2 | ||||
-rw-r--r-- | lisp/org/org.el | 8 |
7 files changed, 133 insertions, 133 deletions
diff --git a/lisp/org/org-ascii.el b/lisp/org/org-ascii.el index d5964538a9c..fbe0c0a30a3 100644 --- a/lisp/org/org-ascii.el +++ b/lisp/org/org-ascii.el @@ -369,55 +369,55 @@ publishing directory." (push (concat (nth 3 lang-words) "\n") thetoc) (push (concat (make-string (string-width (nth 3 lang-words)) ?=) "\n") thetoc) - (mapc '(lambda (line) - (if (string-match org-todo-line-regexp - line) - ;; This is a headline - (progn - (setq have-headings t) - (setq level (- (match-end 1) (match-beginning 1) - level-offset) - level (org-tr-level level) - txt (match-string 3 line) - todo - (or (and org-export-mark-todo-in-toc - (match-beginning 2) - (not (member (match-string 2 line) - org-done-keywords))) + (mapc (lambda (line) + (if (string-match org-todo-line-regexp + line) + ;; This is a headline + (progn + (setq have-headings t) + (setq level (- (match-end 1) (match-beginning 1) + level-offset) + level (org-tr-level level) + txt (match-string 3 line) + todo + (or (and org-export-mark-todo-in-toc + (match-beginning 2) + (not (member (match-string 2 line) + org-done-keywords))) ; TODO, not DONE - (and org-export-mark-todo-in-toc - (= level umax-toc) - (org-search-todo-below - line lines level)))) - (setq txt (org-html-expand-for-ascii txt)) - - (while (string-match org-bracket-link-regexp txt) - (setq txt - (replace-match - (match-string (if (match-end 2) 3 1) txt) - t t txt))) - - (if (and (memq org-export-with-tags '(not-in-toc nil)) - (string-match - (org-re "[ \t]+:[[:alnum:]_@#%:]+:[ \t]*$") - txt)) - (setq txt (replace-match "" t t txt))) - (if (string-match quote-re0 txt) - (setq txt (replace-match "" t t txt))) - - (if org-export-with-section-numbers - (setq txt (concat (org-section-number level) - " " txt))) - (if (<= level umax-toc) - (progn - (push - (concat - (make-string - (* (max 0 (- level org-min-level)) 4) ?\ ) - (format (if todo "%s (*)\n" "%s\n") txt)) - thetoc) - (setq org-last-level level)) - )))) + (and org-export-mark-todo-in-toc + (= level umax-toc) + (org-search-todo-below + line lines level)))) + (setq txt (org-html-expand-for-ascii txt)) + + (while (string-match org-bracket-link-regexp txt) + (setq txt + (replace-match + (match-string (if (match-end 2) 3 1) txt) + t t txt))) + + (if (and (memq org-export-with-tags '(not-in-toc nil)) + (string-match + (org-re "[ \t]+:[[:alnum:]_@#%:]+:[ \t]*$") + txt)) + (setq txt (replace-match "" t t txt))) + (if (string-match quote-re0 txt) + (setq txt (replace-match "" t t txt))) + + (if org-export-with-section-numbers + (setq txt (concat (org-section-number level) + " " txt))) + (if (<= level umax-toc) + (progn + (push + (concat + (make-string + (* (max 0 (- level org-min-level)) 4) ?\ ) + (format (if todo "%s (*)\n" "%s\n") txt)) + thetoc) + (setq org-last-level level)) + )))) lines) (setq thetoc (if have-headings (nreverse thetoc) nil)))) diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index c9679edc65a..ae97db20f70 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el @@ -246,10 +246,10 @@ This checks for the existence of a \".git\" directory in that directory." (cd dir) (shell-command "git add .") (shell-command "git ls-files --deleted" t) - (mapc '(lambda (file) - (unless (string= file "") - (shell-command - (concat "git rm \"" file "\"")))) + (mapc (lambda (file) + (unless (string= file "") + (shell-command + (concat "git rm \"" file "\"")))) (split-string (buffer-string) "\n")) (shell-command "git commit -m 'Synchronized attachments'"))))) diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index 002ad025fbe..3278d108b52 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el @@ -2136,7 +2136,7 @@ TYPE must be a string, any of: markup (org-symname-or-string (pop params)) lang (and (member markup '("src" "SRC")) (org-symname-or-string (pop params))) - switches (mapconcat '(lambda (x) (format "%s" x)) params " ") + switches (mapconcat (lambda (x) (format "%s" x)) params " ") start nil end nil) (delete-region (match-beginning 0) (match-end 0)) (if (or (not file) diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el index a6933978710..8ccca0ca987 100644 --- a/lisp/org/org-html.el +++ b/lisp/org/org-html.el @@ -1090,74 +1090,74 @@ lang=\"%s\" xml:lang=\"%s\"> (push "<div id=\"text-table-of-contents\">\n" thetoc) (push "<ul>\n<li>" thetoc) (setq lines - (mapcar '(lambda (line) - (if (and (string-match org-todo-line-regexp line) - (not (get-text-property 0 'org-protected line))) - ;; This is a headline - (progn - (setq have-headings t) - (setq level (- (match-end 1) (match-beginning 1) - level-offset) - level (org-tr-level level) - txt (save-match-data - (org-html-expand - (org-export-cleanup-toc-line - (match-string 3 line)))) - todo - (or (and org-export-mark-todo-in-toc - (match-beginning 2) - (not (member (match-string 2 line) - org-done-keywords))) + (mapcar (lambda (line) + (if (and (string-match org-todo-line-regexp line) + (not (get-text-property 0 'org-protected line))) + ;; This is a headline + (progn + (setq have-headings t) + (setq level (- (match-end 1) (match-beginning 1) + level-offset) + level (org-tr-level level) + txt (save-match-data + (org-html-expand + (org-export-cleanup-toc-line + (match-string 3 line)))) + todo + (or (and org-export-mark-todo-in-toc + (match-beginning 2) + (not (member (match-string 2 line) + org-done-keywords))) ; TODO, not DONE - (and org-export-mark-todo-in-toc - (= level umax-toc) - (org-search-todo-below - line lines level)))) - (if (string-match - (org-re "[ \t]+:\\([[:alnum:]_@:]+\\):[ \t]*$") txt) - (setq txt (replace-match " <span class=\"tag\"> \\1</span>" t nil txt))) - (if (string-match quote-re0 txt) - (setq txt (replace-match "" t t txt))) - (setq snumber (org-section-number level)) - (if org-export-with-section-numbers - (setq txt (concat snumber " " txt))) - (if (<= level (max umax umax-toc)) - (setq head-count (+ head-count 1))) - (if (<= level umax-toc) - (progn - (if (> level org-last-level) - (progn - (setq cnt (- level org-last-level)) - (while (>= (setq cnt (1- cnt)) 0) - (push "\n<ul>\n<li>" thetoc)) - (push "\n" thetoc))) - (if (< level org-last-level) - (progn - (setq cnt (- org-last-level level)) - (while (>= (setq cnt (1- cnt)) 0) - (push "</li>\n</ul>" thetoc)) - (push "\n" thetoc))) - ;; Check for targets - (while (string-match org-any-target-regexp line) - (setq line (replace-match - (concat "@<span class=\"target\">" (match-string 1 line) "@</span> ") - t t line))) - (while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt) - (setq txt (replace-match "" t t txt))) - (setq href - (replace-regexp-in-string - "\\." "_" (format "sec-%s" snumber))) - (setq href (or (cdr (assoc href org-export-preferred-target-alist)) href)) - (push - (format - (if todo - "</li>\n<li><a href=\"#%s\"><span class=\"todo\">%s</span></a>" - "</li>\n<li><a href=\"#%s\">%s</a>") - href txt) thetoc) - - (setq org-last-level level)) - ))) - line) + (and org-export-mark-todo-in-toc + (= level umax-toc) + (org-search-todo-below + line lines level)))) + (if (string-match + (org-re "[ \t]+:\\([[:alnum:]_@:]+\\):[ \t]*$") txt) + (setq txt (replace-match " <span class=\"tag\"> \\1</span>" t nil txt))) + (if (string-match quote-re0 txt) + (setq txt (replace-match "" t t txt))) + (setq snumber (org-section-number level)) + (if org-export-with-section-numbers + (setq txt (concat snumber " " txt))) + (if (<= level (max umax umax-toc)) + (setq head-count (+ head-count 1))) + (if (<= level umax-toc) + (progn + (if (> level org-last-level) + (progn + (setq cnt (- level org-last-level)) + (while (>= (setq cnt (1- cnt)) 0) + (push "\n<ul>\n<li>" thetoc)) + (push "\n" thetoc))) + (if (< level org-last-level) + (progn + (setq cnt (- org-last-level level)) + (while (>= (setq cnt (1- cnt)) 0) + (push "</li>\n</ul>" thetoc)) + (push "\n" thetoc))) + ;; Check for targets + (while (string-match org-any-target-regexp line) + (setq line (replace-match + (concat "@<span class=\"target\">" (match-string 1 line) "@</span> ") + t t line))) + (while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt) + (setq txt (replace-match "" t t txt))) + (setq href + (replace-regexp-in-string + "\\." "_" (format "sec-%s" snumber))) + (setq href (or (cdr (assoc href org-export-preferred-target-alist)) href)) + (push + (format + (if todo + "</li>\n<li><a href=\"#%s\"><span class=\"todo\">%s</span></a>" + "</li>\n<li><a href=\"#%s\">%s</a>") + href txt) thetoc) + + (setq org-last-level level)) + ))) + line) lines)) (while (> org-last-level (1- org-min-level)) (setq org-last-level (1- org-last-level)) diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index cec19d89de1..ddd476e98b2 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -526,7 +526,7 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" ("Check Tags" ,@(org-mouse-keyword-menu (sort (mapcar 'car (org-get-buffer-tags)) 'string-lessp) - '(lambda (tag) (org-tags-sparse-tree nil tag))) + (lambda (tag) (org-tags-sparse-tree nil tag))) "--" ["Custom Tag ..." org-tags-sparse-tree t]) ["Check Phrase ..." org-occur] @@ -537,18 +537,18 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" ("Display Tags" ,@(org-mouse-keyword-menu (sort (mapcar 'car (org-get-buffer-tags)) 'string-lessp) - '(lambda (tag) (org-tags-view nil tag))) + (lambda (tag) (org-tags-view nil tag))) "--" ["Custom Tag ..." org-tags-view t]) ["Display Calendar" org-goto-calendar t] "--" ,@(org-mouse-keyword-menu (mapcar 'car org-agenda-custom-commands) - '(lambda (key) + (lambda (key) (eval `(flet ((read-char-exclusive () (string-to-char ,key))) (org-agenda nil)))) nil - '(lambda (key) + (lambda (key) (let ((entry (assoc key org-agenda-custom-commands))) (org-mouse-clip-text (cond @@ -832,7 +832,7 @@ This means, between the beginning of line and the point." ("Tags and Priorities" ,@(org-mouse-keyword-menu (org-mouse-priority-list) - '(lambda (keyword) + (lambda (keyword) (org-mouse-set-priority (string-to-char keyword))) priority "Priority %s") "--" @@ -905,7 +905,7 @@ This means, between the beginning of line and the point." (mouse-drag-region event))) (add-hook 'org-mode-hook - '(lambda () + (lambda () (setq org-mouse-context-menu-function 'org-mouse-context-menu) (when (memq 'context-menu org-mouse-features) @@ -1129,14 +1129,14 @@ This means, between the beginning of line and the point." ; (setq org-agenda-mode-hook nil) (add-hook 'org-agenda-mode-hook - '(lambda () + (lambda () (setq org-mouse-context-menu-function 'org-mouse-agenda-context-menu) (org-defkey org-agenda-mode-map [mouse-3] 'org-mouse-show-context-menu) (org-defkey org-agenda-mode-map [down-mouse-3] 'org-mouse-move-tree-start) (org-defkey org-agenda-mode-map [C-mouse-4] 'org-agenda-earlier) (org-defkey org-agenda-mode-map [C-mouse-5] 'org-agenda-later) (org-defkey org-agenda-mode-map [drag-mouse-3] - '(lambda (event) (interactive "e") + (lambda (event) (interactive "e") (case (org-mouse-get-gesture event) (:left (org-agenda-earlier 1)) (:right (org-agenda-later 1))))))) diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index bd1c3802044..5a877963a40 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -674,7 +674,7 @@ the language, a switch telling if the content should be in a single line." (defun org-src-mode-configure-edit-buffer () (when (org-bound-and-true-p org-edit-src-from-org-mode) (org-add-hook 'kill-buffer-hook - '(lambda () (delete-overlay org-edit-src-overlay)) nil 'local) + (lambda () (delete-overlay org-edit-src-overlay)) nil 'local) (if (org-bound-and-true-p org-edit-src-allow-write-back-p) (progn (setq buffer-offer-save t) diff --git a/lisp/org/org.el b/lisp/org/org.el index 4b316ab60ab..a55111ec816 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -1576,7 +1576,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-function 'yes-or-no-p "Non-nil means ask for confirmation before executing Emacs Lisp links. @@ -1596,7 +1596,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)))) (defconst org-file-apps-defaults-gnu '((remote . emacs) @@ -2519,7 +2519,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))) @@ -3021,7 +3021,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. |