aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/erlang.el
diff options
context:
space:
mode:
authorBozhidar Batsov <[email protected]>2016-12-15 09:47:29 +0200
committerDan Gudmundsson <[email protected]>2017-02-08 12:49:04 +0100
commit4a32cffdc296a9bcdd412e231bddfb5ca28e34e9 (patch)
tree18e540520659e02ef3fffc38bdb304b8dbe22d8d /lib/tools/emacs/erlang.el
parentce0e5bd0f6f43eaf8851d9f36f42efd19e2dd5f0 (diff)
downloadotp-4a32cffdc296a9bcdd412e231bddfb5ca28e34e9.tar.gz
otp-4a32cffdc296a9bcdd412e231bddfb5ca28e34e9.tar.bz2
otp-4a32cffdc296a9bcdd412e231bddfb5ca28e34e9.zip
Remove redundant erlang-interactive-p
Diffstat (limited to 'lib/tools/emacs/erlang.el')
-rw-r--r--lib/tools/emacs/erlang.el11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index 2a534ab75f..10b3031f0b 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -1362,16 +1362,11 @@ replaced by `erlang-etags-tags-completion-table'.")
(defun erlang-version ()
"Return the current version of Erlang mode."
(interactive)
- (if (erlang-interactive-p)
+ (if (called-interactively-p 'interactive)
(message "Erlang mode version %s, written by Anders Lindgren"
erlang-version))
erlang-version)
-(defun erlang-interactive-p ()
- (if (fboundp 'called-interactively-p)
- (called-interactively-p 'interactive)
- (funcall (symbol-function 'interactive-p))))
-
;;;###autoload
(define-derived-mode erlang-mode prog-mode "Erlang"
"Major mode for editing Erlang source files in Emacs.
@@ -5549,7 +5544,7 @@ Return the position after the newly inserted command."
(boundp 'comint-last-output-start))
(save-excursion
(goto-char
- (if (erlang-interactive-p)
+ (if (called-interactively-p 'interactive)
(symbol-value 'comint-last-input-end)
(symbol-value 'comint-last-output-start)))
(while (progn (skip-chars-forward "^\C-h")
@@ -5568,7 +5563,7 @@ Return the position after the newly inserted command."
(let ((pmark (process-mark (get-buffer-process (current-buffer)))))
(save-excursion
(goto-char
- (if (erlang-interactive-p)
+ (if (called-interactively-p 'interactive)
(symbol-value 'comint-last-input-end)
(symbol-value 'comint-last-output-start)))
(while (re-search-forward "\r+$" pmark t)