[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/mhtml-mode 6c3ceb6 02/11: change calc to use deriv
From: |
Tom Tromey |
Subject: |
[Emacs-diffs] feature/mhtml-mode 6c3ceb6 02/11: change calc to use derived-mode-p |
Date: |
Thu, 23 Mar 2017 23:15:03 -0400 (EDT) |
branch: feature/mhtml-mode
commit 6c3ceb610709a83d1129a8cedcfbf7a3d23661aa
Author: Tom Tromey <address@hidden>
Commit: Tom Tromey <address@hidden>
change calc to use derived-mode-p
* lisp/calc/calc-embed.el (calc-embedded-find-modes)
(calc-embedded-make-info): Use derived-mode-p.
---
lisp/calc/calc-embed.el | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index bb37d7f..bd5601b 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -804,7 +804,7 @@ The command \\[yank] can retrieve it from there."
(backward-char 6))
(goto-char save-pt)
(unless (assq 'the-language modes)
- (let ((lang (assoc major-mode calc-language-alist)))
+ (let ((lang (cl-assoc-if #'derived-mode-p calc-language-alist)))
(if lang
(setq modes (cons (cons 'the-language (cdr lang))
modes)))))
@@ -829,13 +829,19 @@ The command \\[yank] can retrieve it from there."
(setq found (list (current-buffer))
calc-embedded-active (cons found calc-embedded-active)
calc-embedded-firsttime-buf t)
- (let ((newann (assoc major-mode calc-embedded-announce-formula-alist))
- (newform (assoc major-mode
calc-embedded-open-close-formula-alist))
- (newword (assoc major-mode calc-embedded-word-regexp-alist))
- (newplain (assoc major-mode
calc-embedded-open-close-plain-alist))
+ (let ((newann (cl-assoc-if #'derived-mode-p
+ calc-embedded-announce-formula-alist))
+ (newform (cl-assoc-if #'derived-mode-p
+ calc-embedded-open-close-formula-alist))
+ (newword (cl-assoc-if #'derived-mode-p
+ calc-embedded-word-regexp-alist))
+ (newplain (cl-assoc-if #'derived-mode-p
+ calc-embedded-open-close-plain-alist))
(newnewform
- (assoc major-mode calc-embedded-open-close-new-formula-alist))
- (newmode (assoc major-mode
calc-embedded-open-close-mode-alist)))
+ (cl-assoc-if #'derived-mode-p
+ calc-embedded-open-close-new-formula-alist))
+ (newmode (cl-assoc-if #'derived-mode-p
+ calc-embedded-open-close-mode-alist)))
(when newann
(make-local-variable 'calc-embedded-announce-formula)
(setq calc-embedded-announce-formula (cdr newann)))
- [Emacs-diffs] branch feature/mhtml-mode created (now 3499915), Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode 9604256 01/11: change auto-insert to use derived-mode-p, Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode bf7dd0c 03/11: change semantic to use derived-mode-p, Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode c366e52 07/11: make smie.el respect prog-first-column, Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode 3adbe84 08/11: make js.el respect prog-first-column, Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode 6c3ceb6 02/11: change calc to use derived-mode-p,
Tom Tromey <=
- [Emacs-diffs] feature/mhtml-mode 2d377d2 04/11: change org to use derived-mode-p, Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode fe83525 05/11: change align to use derived-mode-p, Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode 3499915 11/11: enable mhtml-mode by default, Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode 48f5cbb 09/11: change sgml-mode to help multi-html mode, Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode 60be4b7 06/11: change viper to use derived-mode-p, Tom Tromey, 2017/03/23
- [Emacs-diffs] feature/mhtml-mode 23e71eb 10/11: add mhtml-mode.el, Tom Tromey, 2017/03/23