summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ecay <aaronecay@gmail.com>2016-09-23 11:18:24 +0100
committerAaron Ecay <aaronecay@gmail.com>2016-09-23 11:20:55 +0100
commit48e7f17bc6df8bf7d6ed8d34c849beefb7262dfc (patch)
tree44e12edb042357b4e4756cd343e2a600d43c862e
parent407b0d41a2c9072cc23c20ae8d6f5f396120016b (diff)
downloadorg-mode-48e7f17bc6df8bf7d6ed8d34c849beefb7262dfc.tar.gz
Use assq instead of assoc with quoted symbols
* lisp/ob-core.el (org-babel-merge-params): * lisp/org-agenda.el (org-agenda-prepare-window): (org-agenda-to-appt): * lisp/org-capture.el (org-capture-finalize): * lisp/org.el (org-find-invisible-foreground): (org-open-file): (org-todo-trigger-tag-changes): (org-back-over-empty-lines): * lisp/ox-odt.el (org-odt-get-table-cell-styles): Use assq instead of assoc with quoted symbols.
-rw-r--r--lisp/ob-core.el4
-rw-r--r--lisp/org-agenda.el12
-rw-r--r--lisp/org-capture.el2
-rw-r--r--lisp/org.el10
-rw-r--r--lisp/ox-odt.el16
5 files changed, 22 insertions, 22 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index e95977e..135de9a 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2491,10 +2491,10 @@ This takes into account some special considerations for certain
parameters when merging lists."
(let* ((results-exclusive-groups
(mapcar (lambda (group) (mapcar #'symbol-name group))
- (cdr (assoc 'results org-babel-common-header-args-w-values))))
+ (cdr (assq 'results org-babel-common-header-args-w-values))))
(exports-exclusive-groups
(mapcar (lambda (group) (mapcar #'symbol-name group))
- (cdr (assoc 'exports org-babel-common-header-args-w-values))))
+ (cdr (assq 'exports org-babel-common-header-args-w-values))))
(merge
(lambda (exclusive-groups &rest result-params)
;; Maintain exclusivity of mutually exclusive parameters,
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 34bbbb4..8505a6d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3625,10 +3625,10 @@ FILTER-ALIST is an alist of filters we need to apply when
((equal org-agenda-window-setup 'reorganize-frame)
(delete-other-windows)
(org-switch-to-buffer-other-window abuf)))
- (setq org-agenda-tag-filter (cdr (assoc 'tag filter-alist)))
- (setq org-agenda-category-filter (cdr (assoc 'cat filter-alist)))
- (setq org-agenda-effort-filter (cdr (assoc 'effort filter-alist)))
- (setq org-agenda-regexp-filter (cdr (assoc 're filter-alist)))
+ (setq org-agenda-tag-filter (cdr (assq 'tag filter-alist)))
+ (setq org-agenda-category-filter (cdr (assq 'cat filter-alist)))
+ (setq org-agenda-effort-filter (cdr (assq 'effort filter-alist)))
+ (setq org-agenda-regexp-filter (cdr (assq 're filter-alist)))
;; Additional test in case agenda is invoked from within agenda
;; buffer via elisp link.
(unless (equal (current-buffer) abuf)
@@ -10123,8 +10123,8 @@ to override `appt-message-warning-time'."
(and (stringp filter) (string-match filter evt))
(and (functionp filter) (funcall filter x))
(and (listp filter)
- (let ((cat-filter (cadr (assoc 'category filter)))
- (evt-filter (cadr (assoc 'headline filter))))
+ (let ((cat-filter (cadr (assq 'category filter)))
+ (evt-filter (cadr (assq 'headline filter))))
(or (and (stringp cat-filter)
(string-match cat-filter cat))
(and (stringp evt-filter)
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index a89d171..5a2ad9b 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -711,7 +711,7 @@ captured item after finalizing."
(m2 (org-capture-get :end-marker 'local)))
(if (and m1 m2 (= m1 beg) (= m2 end))
(progn
- (setq m2 (if (cdr (assoc 'heading org-blank-before-new-entry))
+ (setq m2 (if (cdr (assq 'heading org-blank-before-new-entry))
m2 (1+ m2))
m2 (if (< (point-max) m2) (point-max) m2))
(setq abort-note 'clean)
diff --git a/lisp/org.el b/lisp/org.el
index d8bf99b..f8fbed0 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5665,7 +5665,7 @@ The following commands are available:
(mapcar
(lambda (alist)
(when (boundp alist)
- (cdr (assoc 'background-color (symbol-value alist)))))
+ (cdr (assq 'background-color (symbol-value alist)))))
'(default-frame-alist initial-frame-alist window-system-default-frame-alist))
(list (face-foreground 'org-hide))))))
(car (remove nil candidates))))
@@ -11434,7 +11434,7 @@ If the file does not exist, an error is thrown."
(cdr (assoc ext apps))
(cdr (assq t apps))))))
(when (eq cmd 'system)
- (setq cmd (cdr (assoc 'system apps))))
+ (setq cmd (cdr (assq 'system apps))))
(when (eq cmd 'default)
(setq cmd (cdr (assoc t apps))))
(when (eq cmd 'mailcap)
@@ -13060,9 +13060,9 @@ This hook runs even if there is no statistics cookie present, in which case
(when (and (stringp state) (> (length state) 0))
(setq changes (append changes (cdr (assoc state l)))))
(when (member state org-not-done-keywords)
- (setq changes (append changes (cdr (assoc 'todo l)))))
+ (setq changes (append changes (cdr (assq 'todo l)))))
(when (member state org-done-keywords)
- (setq changes (append changes (cdr (assoc 'done l)))))
+ (setq changes (append changes (cdr (assq 'done l)))))
(dolist (c changes)
(org-toggle-tag (car c) (if (cdr c) 'on 'off)))))
@@ -22535,7 +22535,7 @@ that may remove elements by altering the list structure."
"Move backwards over whitespace, to the beginning of the first empty line.
Returns the number of empty lines passed."
(let ((pos (point)))
- (if (cdr (assoc 'heading org-blank-before-new-entry))
+ (if (cdr (assq 'heading org-blank-before-new-entry))
(skip-chars-backward " \t\n\r")
(unless (eobp)
(forward-line -1)))
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 23a0129..5f93336 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -3256,23 +3256,23 @@ styles congruent with the ODF-1.2 specification."
(cell-style-selectors (nth 2 style-spec))
(cell-type
(cond
- ((and (cdr (assoc 'use-first-column-styles cell-style-selectors))
+ ((and (cdr (assq 'use-first-column-styles cell-style-selectors))
(= c 0)) "FirstColumn")
- ((and (cdr (assoc 'use-last-column-styles cell-style-selectors))
+ ((and (cdr (assq 'use-last-column-styles cell-style-selectors))
(= (1+ c) (cdr table-dimensions)))
"LastColumn")
- ((and (cdr (assoc 'use-first-row-styles cell-style-selectors))
+ ((and (cdr (assq 'use-first-row-styles cell-style-selectors))
(= r 0)) "FirstRow")
- ((and (cdr (assoc 'use-last-row-styles cell-style-selectors))
+ ((and (cdr (assq 'use-last-row-styles cell-style-selectors))
(= (1+ r) (car table-dimensions)))
"LastRow")
- ((and (cdr (assoc 'use-banding-rows-styles cell-style-selectors))
+ ((and (cdr (assq 'use-banding-rows-styles cell-style-selectors))
(= (% r 2) 1)) "EvenRow")
- ((and (cdr (assoc 'use-banding-rows-styles cell-style-selectors))
+ ((and (cdr (assq 'use-banding-rows-styles cell-style-selectors))
(= (% r 2) 0)) "OddRow")
- ((and (cdr (assoc 'use-banding-columns-styles cell-style-selectors))
+ ((and (cdr (assq 'use-banding-columns-styles cell-style-selectors))
(= (% c 2) 1)) "EvenColumn")
- ((and (cdr (assoc 'use-banding-columns-styles cell-style-selectors))
+ ((and (cdr (assq 'use-banding-columns-styles cell-style-selectors))
(= (% c 2) 0)) "OddColumn")
(t ""))))
(concat template-name cell-type)))))