summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-03-18 23:03:15 +0100
committerTom Tromey <tom@tromey.com>2017-04-05 15:53:38 -0600
commitc92bae9a08cc7c2eb61bad32d9a9d6553b6d2c19 (patch)
treeec9b0ac2190b765a255a5f583057478195657432
parentd056b1faea69ccd61be4c00259e34de741b9a39e (diff)
downloademacs-c92bae9a08cc7c2eb61bad32d9a9d6553b6d2c19.tar.gz
change org to use derived-mode-p
* lisp/org/org-list.el (org-list-insert-radio-list): Use derived-mode-p. * lisp/org/org-table.el (orgtbl-setup, orgtbl-toggle-comment): Use derived-mode-p.
-rw-r--r--lisp/org/org-list.el2
-rw-r--r--lisp/org/org-table.el4
2 files changed, 3 insertions, 3 deletions
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el
index 4a45fd9817a..a24c496d726 100644
--- a/lisp/org/org-list.el
+++ b/lisp/org/org-list.el
@@ -3035,7 +3035,7 @@ Point is left at list end."
(defun org-list-insert-radio-list ()
"Insert a radio list template appropriate for this major mode."
(interactive)
- (let* ((e (assq major-mode org-list-radio-list-templates))
+ (let* ((e (cl-assoc-if #'derived-mode-p org-list-radio-list-templates))
(txt (nth 1 e))
name pos)
(unless e (error "No radio list setup defined for %s" major-mode))
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index 08bbf3277ba..0c813d03a17 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -4269,7 +4269,7 @@ to execute outside of tables."
"--"
("Radio tables"
["Insert table template" orgtbl-insert-radio-table
- (assq major-mode orgtbl-radio-table-templates)]
+ (cl-assoc-if #'derived-mode-p orgtbl-radio-table-templates)]
["Comment/uncomment table" orgtbl-toggle-comment t])
"--"
["Set Column Formula" org-table-eval-formula :active (org-at-table-p) :keys "C-c ="]
@@ -4549,7 +4549,7 @@ First element has index 0, or I0 if given."
(defun orgtbl-insert-radio-table ()
"Insert a radio table template appropriate for this major mode."
(interactive)
- (let* ((e (assq major-mode orgtbl-radio-table-templates))
+ (let* ((e (cl-assoc-if #'derived-mode-p orgtbl-radio-table-templates))
(txt (nth 1 e))
name pos)
(unless e (user-error "No radio table setup defined for %s" major-mode))