From 15ec2d7cffe5f0eb4c073ef7b446a654fb8419e4 Mon Sep 17 00:00:00 2001 From: Ivan Andrus Date: Sat, 1 Nov 2014 12:33:02 -0600 Subject: [PATCH] Backport Use derived-mode-p in python.el instead of equality test with major-mode Fixes: debbugs:18854 * progmodes/python.el (python-ffap-module-path): Use `derived-mode-p' instead of equality test on `major-mode'. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/python.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce4221f7795..a6ab3b87e43 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-14 Ivan Andrus + + * progmodes/python.el (python-ffap-module-path): Use + `derived-mode-p' instead of equality test on `major-mode'. + 2014-11-13 Ulrich Müller * version.el (emacs-repository-get-version): Call `git log' diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index c828de10304..95fc52d4d54 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3281,7 +3281,7 @@ The skeleton will be bound to python-skeleton-NAME." (defun python-ffap-module-path (module) "Function for `ffap-alist' to return path for MODULE." (let ((process (or - (and (eq major-mode 'inferior-python-mode) + (and (derived-mode-p 'inferior-python-mode) (get-buffer-process (current-buffer))) (python-shell-get-process)))) (if (not process) -- 2.11.4.GIT