branch: externals/matlab-mode commit 5b8f9f4aebb0a88f8768ee5b0d62e3c3a85a97b2 Author: John Ciolfi <john.ciolfi...@gmail.com> Commit: John Ciolfi <john.ciolfi...@gmail.com>
Add defconst matlab-version, remove matlab-mode-version The matlab-mode-version function was needed prior to having the code source controlled, so I removed it. I also removed the matlab-mode-version defconst and added matlab-version defconst to matlab-mode.el. See https://github.com/mathworks/Emacs-MATLAB-Mode/issues/21 --- matlab-mode.el | 4 +++- matlab-shell.el | 6 ++---- matlab.el | 15 +++------------ tests/metest.el | 8 ++++---- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/matlab-mode.el b/matlab-mode.el index e8469f5d6e..04425a623c 100644 --- a/matlab-mode.el +++ b/matlab-mode.el @@ -8,7 +8,7 @@ ;; Author: Matt Wette <mwe...@alumni.caltech.edu>, ;; Eric M. Ludlam <elud...@mathworks.com> -;; Maintainer: Eric M. Ludlam <elud...@mathworks.com>, Uwe Brauer <o...@mat.ucm.es> +;; Maintainer: Eric M. Ludlam <elud...@mathworks.com>, Uwe Brauer <o...@mat.ucm.es>, John Ciolfi <john.ciolfi...@gmail.com> ;; Created: 04 Jan 91 ;; Keywords: MATLAB(R) ;; Package-Requires: ((emacs "27.2")) @@ -48,6 +48,8 @@ ;;; Code: +(defconst matlab-version "6.3" + "Version of Emacs MATLAB Mode.") (require 'matlab) diff --git a/matlab-shell.el b/matlab-shell.el index 6e9f89a81a..bae02afc4b 100644 --- a/matlab-shell.el +++ b/matlab-shell.el @@ -526,10 +526,8 @@ in a popup buffer. (set (make-local-variable 'company-idle-delay) nil) (company-mode)) - ;; Hooks, etc - (run-hooks 'matlab-shell-mode-hook) - (matlab-show-version) - ) + ;; Hooks + (run-hooks 'matlab-shell-mode-hook)) ;;; NETSHELL integration diff --git a/matlab.el b/matlab.el index 7935a4dfc6..e3f048780b 100644 --- a/matlab.el +++ b/matlab.el @@ -13,9 +13,6 @@ ;; Keywords: MATLAB(R) ;; Package-Requires: ((emacs "27.2")) -(defconst matlab-mode-version "6.3" - "Current version of MATLAB(R) mode.") - ;; This program is free software; you can redistribute it and/or modify @@ -572,12 +569,11 @@ point, but it will be restored for them." :active (matlab-any-shell-active-p) :visible (matlab-any-shell-active-p)] ["Save and go" matlab-shell-save-and-go - :active (matlab-any-shell-active-p) ] + :active (matlab-any-shell-active-p)] ["Run Region" matlab-shell-run-region - :active (matlab-any-shell-active-p) ] + :active (matlab-any-shell-active-p)] ["Run Code Section" matlab-shell-run-code-section - :active (matlab-any-shell-active-p) ] - ["Version" matlab-show-version t] + :active (matlab-any-shell-active-p)] "----" ["Locate MATLAB function" matlab-shell-locate-fcn :active (matlab-shell-active-p) @@ -1493,11 +1489,6 @@ Optional argument ARG specifies if the read-only mode should be set." ;;; Utilities ================================================================= -(defun matlab-show-version () - "Show the version number in the minibuffer." - (interactive) - (message "matlab-mode, version %s" matlab-mode-version)) - (defun matlab-find-code-line () "Walk forwards until we are on a line of code return t on success. If the current line is code, return immediately. diff --git a/tests/metest.el b/tests/metest.el index 5ce2e4a615..ae9f09564d 100644 --- a/tests/metest.el +++ b/tests/metest.el @@ -31,7 +31,7 @@ (defvar met-testfile-path) ; quiet compiler -(require 'matlab) +(require 'matlab-mode) (require 'mlint) (require 'matlab-complete) @@ -605,9 +605,9 @@ For example: (metest-fill-paragraph \"fill-paragraph/FILE.m\"))" "^;; Version: \\([0-9]+\\.[0-9]+\\)[ \t]*$" nil t)) (user-error "Failed to find version in ../matlab-mode.el")) (match-string 1)))) - (when (not (string= package-version matlab-mode-version)) - (user-error "Version from matlab-mode.el \";; Version: %s\" != matlab-mode-version %s" - package-version matlab-mode-version)))) + (when (not (string= package-version matlab-version)) + (user-error "Version from matlab-mode.el \";; Version: %s\" != matlab-version %s" + package-version matlab-version)))) ;;; UTILS