Backport commit c92bae9a0 from Emacs

* lisp/org-list.el (org-list-insert-radio-list):
* lisp/org-table.el (orgtbl-setup, orgtbl-insert-radio-table): Use
derived-mode-p.

change org to use derived-mode-p
c92bae9a08cc7c2eb61bad32d9a9d6553b6d2c19
Tom Tromey
Wed Apr 5 15:53:38 2017 -0600
This commit is contained in:
Tom Tromey 2017-03-18 23:03:15 +01:00 committed by Kyle Meyer
parent 08674eae54
commit dd40193bfa
2 changed files with 3 additions and 3 deletions

View File

@ -3199,7 +3199,7 @@ Point is left at list's 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))

View File

@ -4474,7 +4474,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 ="]
@ -4723,7 +4723,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))