;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@42 The current version of mlint minor mode. (defvar mlint-version "1.3.2" (#$ . 87)) (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305!\203\306\307\305\"\210\202\306\307\310\"\210\300\207" [require matlab-compat matlab linemark fboundp eieio-object-name-string defalias mlint-object-name-string object-name-string] 3) #@61 Return the MATLABROOT for the 'matlab-shell-command'. (fn) (autoload 'matlab-mode-determine-matlabroot "matlab-shell" '(#$ . 422) nil nil) (defalias 'mlint-goto-line #[(n) "eb\210Sy\207" [n] 1]) #@35 Platform we are running mlint on. (defvar mlint-platform (byte-code "\304\267\202K\305\306 \"\203#\307\310!\211;\203 \n\311\230\203 \312\202!\313)\207\314\207\305\315 \"\203.\316\207\317\207\320\207\321\207\307\322!\211;\203H\305\323 \"\203H\324\202I\325)\207\326\207" [system-type system-configuration mt proc #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (darwin 6 gnu/linux 37 solaris 48 hpux 50 windows-nt 52)) string-match "i386" getenv "MACHTYPE" "x86_32" "maci" "maci64" "mac" "64\\|i686" "glnxa64" "glnx86" "sol2" "hpux" "PROCESSOR_IDENTIFIER" "64" "win64" "win32" "unknown"] 4) (#$ . 625)) #@53 *Non-nil means to collect cyclic complexity values. (custom-declare-variable 'mlint-calculate-cyclic-complexity-flag nil '(#$ . -1281) :group 'mlint :type 'boolean) #@277 Symbol Table collected from highlighting cross function variables. Each entry in the symtab is at an index indicating the line it occurs on. Each entry is of the form: ( "FUNCTION-NAME" PARENT-IDX ( LINENO . COLNO ) ...) and ... is a list of cross-function variable usages. (defvar mlint-symtab-info nil (#$ . 1453)) (make-variable-buffer-local 'mlint-symtab-info) #@101 The :set function for `matlab-programs'. SYMBOL is the variable being set. VALUE is the new value. (defalias 'mlint-programs-set-fcn #[(&optional symbol value) "\3021 \303 \"0\210\202\210 L\210\304 \207" [symbol value (error) custom-set-default mlint-reset-program] 3 (#$ . 1827)]) #@478 Function to specify the `mlint-program' for the current buffer. For example, (eval-after-load "mlint" '(setq mlint-program-selection-fcn 'my-function-to-select-mlint-program)) will setup `my-function-to-select-mlint-program' to pick the mlint for a buffer. After opening a *.m file, `my-function-to-select-mlint-program' is called and the appropriate mlint should be returned. If there's no mlint program available, nil should be returned and mlint will not be activated. (defvar mlint-program-selection-fcn nil (#$ . 2122)) #@84 Program to run for MLint. This value can be automatically set by `mlint-programs'. (defvar mlint-program nil (#$ . 2658)) #@24 Reset `mlint-program'. (defalias 'mlint-reset-program #[nil "\306 \307\310\"\n\311 \203L\f\204L @\203E\312 @!\203& @\202E\313 @!\2035\313 @!\202E\312\307 @ \"!\203E\307 @ \" A\211\204\f,\211\207" [root bin mlint-programs mlp ans mlint-program matlab-mode-determine-matlabroot expand-file-name "bin" nil file-executable-p executable-find] 5 (#$ . 2786)]) (byte-code "\300\301\302\303\304\305\306\307\310\311& \210\300\312\313\314\304\305\306\315&\207" [custom-declare-variable mlint-programs (list "mlint" (concat mlint-platform "/mlint")) "*List of possible locations of the mlint program." :group mlint :type (repeat (file :tag "MLint Program: ")) :set mlint-programs-set-fcn mlint-flags '("-all" "-id") "*List of flags passed to mlint." (repeat (string :tag "Option: "))] 10) #@49 Regular expression for collecting mlint output. (defconst mlint-output-regex "^L \\([0-9]+\\) (C \\([-0-9]+\\)): \\(\\w+\\): \\([^\n]+\\)" (#$ . 3591)) #@49 Regular expression for mlint symbol table line. (defconst mlint-symtab-line-regex "^ *\\([0-9]+\\) +\\([a-zA-Z0-9_]+\\) +\\([0-9]+\\) +\\(V +CH\\(Set\\|Used\\).*\\|F.* \\([0-9]+\\)/\\([0-9]+\\)\\)$" (#$ . 3749)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\307&\210\313\310!\207" [custom-declare-variable mlint-verbose nil "*Non nil if command `mlint-minor-mode' should display messages while running." :group mlint :type boolean mlint-scan-for-fixes-flag t "Non-nil means that we should scan mlint output for things to fix.\nScanning using `mlint-error-fix-alist' can slow things down, and may\nbe cause for being turned off in a buffer." make-variable-buffer-local] 8) #@150 List of warning IDs and auto-fix functions. If the CAR of an association matches an error id then the linemark entry created is of the class in CDR. (defvar mlint-error-id-fix-alist '((AND2 . mlint-lm-entry-logicals) (OR2 . mlint-lm-entry-logicals) (INUSD . mlint-lm-entry-unused-argument) (NOPRT . mlint-lm-quiet) (NOSEM . mlint-lm-delete-focus) (NOCOM . mlint-lm-delete-focus) (MSNU . mlint-lm-delete-focus) (ST2NM . mlint-lm-str2num) (FDEPR . mlint-lm-entry-deprecated) (ENDCT . mlint-lm-missing-end) (ENDCT2 . mlint-lm-missing-end) (FNDEF . mlint-lm-function-name) (MCFIL . mlint-lm-function-name) (MCSCC . mlint-lm-function-name)) (#$ . 4462)) #@113 Convert the mlint column output to a cons pair. (COLSTART . COLEND). Argument STRING is the text to interpret. (defalias 'mlint-column-output #[(string) "\302 \303\216\304\305 \"\203\306\307\310 \"!\306\307\311 \"!B\202!\306 !\211B*\207" [save-match-data-internal string match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] string-match "\\([0-9]+\\)-\\([0-9]+\\)" string-to-number match-string 1 2] 6 (#$ . 5118)]) #@92 Run mlint on BUFFER and return a list of issues. If BUFFER is nil, use the current buffer. (defalias 'mlint-run #[(&optional buffer) "\306\307 !\205\320\205\320\310!\204\311\312\"\210\313\314!\210\315\207\307p!  56\205.78 \20569:8\203D\316:B\202F::;\203T\317:B\202V:\211:)<\315\211=>\315?r\320\321!q\210\322 \210@\203w\311\323!\210\324\325\n\315p\315\326< C\"&\210@\203\217\311\327!\210eb\2108\203\330A\315\331#\204\243db\210\332\333\315\331#\203eb\210\334\335\336!!T>\337>\315\"?\330B\315\331#\203\335\314!\334\335\340!!\335\341!CDEC\203\377?\334\335\336!!ED\342U?\205\357D\334\335\343!!\334C!BEI\210\202?DHAA\211F\203FEFAB\241\210)+\202\2755\203D\330A\315\331#\203D\334\335\336!!\344\335\314!!\335\345!\346\335\340!\257=B=\202 )\347 \210?G8\203\314>\250\203\314\212>\342V\203\313>S>G>H\211H\203\307HAA@I\350I@!\210IASu\210\332\351!\210`I\3521\224\353 0\210\202\230\210db\210HA@\203\251\354\355I`\"\356\331#\210HAAA\203\306\354\355I`\"\357\360\361\362HAAA\363#\364Q#\210))\202X)=. \207" [mlint-program fn buffer-mlint-program default-directory dd matlab-show-mlint-warnings file-exists-p buffer-file-name file-executable-p message "Unable to mlint, %s doesn't exist" sit-for 2 nil "-edit" "-cyc" get-buffer-create "*M-Lint*" erase-buffer "Running mlint..." apply call-process append "Running mlint...done" re-search-forward t re-search-backward "^ *\\([0-9]+\\)" string-to-number match-string 1 make-vector 3 7 0 6 mlint-column-output 4 "" mlint-clear-nested-function-info-overlays mlint-goto-line "function\\b" (error) matlab-forward-sexp linemark-overlay-put linemark-make-overlay nested-function cross-function-variables "\\b\\(" mapconcat #[(x) "\207" [x] 1] "\\|" "\\)\\b" show-mlint-warnings matlab-functions-have-end matlab-highlight-cross-function-variables highlight-cross-function-variables mlint-flags tmp mlint-calculate-cyclic-complexity-flag flags errors n symtab mlint-verbose mlint-output-regex mlint-symtab-line-regex column parent-index name parent mlint-symtab-info entry where] 10 (#$ . 5582)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias mlint-lm-group-p eieio-make-class-predicate mlint-lm-group mlint-lm-group--eieio-childp eieio-make-child-predicate mlint-lm-group-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-group) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (linemark-group) nil (:documentation "Group of linemarks for mlint.")] 6) #@53 Create a new object of class type `mlint-lm-group'. (defalias 'mlint-lm-group #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-group] 4 (#$ . 8215)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-group compiler-macro mlint-lm-group--anon-cmacro] 4) (defalias 'mlint-lm-group--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias mlint-lm-entry-p eieio-make-class-predicate mlint-lm-entry mlint-lm-entry--eieio-childp eieio-make-child-predicate mlint-lm-entry-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-entry) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (linemark-entry) ((column :initarg :column :type integer :documentation "The column on which the warning occurs.") (column-end :initarg :column-end :type integer :documentation "The column on which the warning ends.") (coverlay :type linemark-overlay :documentation "Overlay used for the specific part of the line at issue.") (warning :initarg :warning :type string :documentation "The error message created by mlint on this line.") (warningid :initarg :warningid :type symbol :documentation "The error id provided by mlint.\nWarning ID's won't change between releases, unlike the warning messages.") (warningcode :initarg :warningcode :type symbol :initform 'minor :documentation "mlint return code for this type of warning.") (fixable-p :initform nil :allocation :class :type boolean :documentation "Can this class auto-fix the problem?") (fix-description :initform nil :allocation :class :type (or string null) :documentation "Description of how the fix will effect the buffer.")) (:documentation "A linemark entry.")] 6) #@53 Create a new object of class type `mlint-lm-entry'. (defalias 'mlint-lm-entry #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-entry] 4 (#$ . 10171)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-entry compiler-macro mlint-lm-entry--anon-cmacro] 4) (defalias 'mlint-lm-entry--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) #@104 Create a group object for tracking linemark entries. Do not permit multiple groups with the same name. (defalias 'mlint-linemark-create-group #[nil "\305\306\307\310#\311 \n\204&\f\203&\312\f@!\230\203 \f@\fA\202\f\n\2030\n\211\2025 B ,\207" [name newgroup foundgroup linemark-groups lmg "mlint" mlint-lm-group :face linemark-go-face nil mlint-object-name-string] 4 (#$ . 10682)]) #@34 Group of marked lines for mlint. (defvar mlint-mark-group (mlint-linemark-create-group) (#$ . 11086)) #@110 For a given WARNINGID, return a class for that warning. Different warnings are handled by different classes. (defalias 'mlint-warningid->class #[(warningid) "\203\" \211\203\n@@ =\204\nA\211\204\n\n@A\206 \304)\207\304\207" [mlint-scan-for-fixes-flag mlint-error-id-fix-alist al warningid mlint-lm-entry] 3 (#$ . 11195)]) (cl-generic-define-method 'linemark-new-entry nil '((g mlint-lm-group) &rest args) nil #[(g &rest args) "\305\306\"\305\307\"\305\310\"\311\305\312\"! ;\203\313 !\314\f\315\316 \n##,\207" [args f l wc c plist-get :filename :line :warningcode mlint-warningid->class :warningid file-name-nondirectory apply format "%s %d"] 6 "Add a `linemark-entry' to G.\nIt will be at location FILE and LINE, and use optional FACE.\nCall the new entry's activate method.\nOptional ARGS specifies details about the entry.\n\n(fn G &rest ARGS)"]) #@54 Move cursor to the end of whatever the cursor is on. (defalias 'mlint-end-of-something #[nil "\300\301!\203\n\302\303!\207\300\304!\203\305\306!\207\307\310!\207" [looking-at "\\w\\|\\s(" forward-sexp 1 "\\s." skip-syntax-forward "." error nil] 2 (#$ . 12073)]) (byte-code "\300\301\302\303\304\305%\210\300\306\302\307\302\310%\210\300\311\312\313\302\314%\210\300\311\302\315\302\316%\210\317\320\321\322!\"\210\317\323\324\322!\"\210\317\325\323\"\210\326\325\327\330#\210\331\322\332\323#\333\322\334\335\336$\207" [cl-generic-define-method linemark-display nil ((e mlint-lm-entry) active-p) t #[(#1=#:cl--cnm e active-p) "\306\307\"\310\311 \312\267\202\313\202\314\202\315#\210)\n \210 \203\310\316\317\"?\205\307\316\320\"\205\307\306\320\"\205\364\321!\203L\322\f\323\"\324\306\325\"Q\202P\322\f\323\"\326\322\f\320\"\327(#\210\326\322\f\320\"\330 #\210r\331\322\f\320\"!q\210\332\322\f\320\"!b\210\3331\204\322\f\334\"Su0\210\202\211\210\202\211\210\310\317\335`\336 \210\322\f\337\"u\210`p##\210)\326\322)\317\"\340\341#\210\326\322)\317\"\342#\210\326\322)\317\"\343\344#\210\326\322)\317\"\330 #,\207\316\317\"\205\364*\322*\317\"\205\363\3451\352\346\322*\317\"!0\210\202\357\210\202\357\210\347\317\")\207" [e wc #1# active-p #:object warntxt eieio-oref warningcode eieio-oset :face #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (major 14 medium 18)) linemark-stop-face linemark-caution-face linemark-go-face slot-boundp coverlay overlay mlint-is-fixable slot-value warning "\nC-c , f to " fix-description linemark-overlay-put local-map help-echo linemark-overlay-buffer linemark-overlay-start (error) column linemark-make-overlay beginning-of-line column-end face linemark-funny-face obj tag mlint (error) linemark-delete-overlay slot-makeunbound mlint-overlay-map #:object #:object] 8 "Set object E to be active.\nACTIVE-P if it should be made visible."] mlint-is-fixable ((e mlint-lm-entry)) #[(e) "\301\302\"\207" [e eieio-oref-default fixable-p] 3 "Return non-nil if entry E can be automatically fixed."] mlint-fix-entry (:after) ((e mlint-lm-entry)) #[(e) "\301\302\"\210\303!\207" [e linemark-display nil linemark-delete] 3 "Stuff to do after a warning is considered fixed.\nSubclasses fulfill the duty of actually fixing the code."] ((e mlint-lm-entry)) #[(e) "\300\301!\207" [error "Don't know how to fix warning"] 2 "This entry E cannot fix warnings, so throw an error.\nSubclasses fulfill the duty of actually fixing the code."] defalias mlint-lm-delete-focus-p eieio-make-class-predicate mlint-lm-delete-focus mlint-lm-delete-focus--eieio-childp eieio-make-child-predicate mlint-lm-delete-focus-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-delete-focus) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (mlint-lm-entry) ((fixable-p :initform t) (fix-description :initform "Delete the offending characters.")) (:documentation "Specialized entry for deleting the highlighted entry.")] 6) #@60 Create a new object of class type `mlint-lm-delete-focus'. (defalias 'mlint-lm-delete-focus #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-delete-focus] 4 (#$ . 15122)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-delete-focus compiler-macro mlint-lm-delete-focus--anon-cmacro] 4) (defalias 'mlint-lm-delete-focus--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303\302\304%\210\305\306\307\310!\"\210\305\311\312\310!\"\210\305\313\311\"\210\314\313\315\316#\210\317\310\320\311#\321\310\322\323\324$\207" [cl-generic-define-method mlint-fix-entry nil ((ent mlint-lm-delete-focus)) #[(ent) "\212\303\304\305\"!\210\306\304\307\"S!\210`\306\304\310\"!\210` b\210`\n|\210\311\312!\203+\313 \210`+\207" [ent s e mlint-goto-line eieio-oref line move-to-column column column-end looking-at "\\s-*$" delete-horizontal-space] 4 "Add semi-colon to end of this line ENT."] defalias mlint-lm-replace-focus-p eieio-make-class-predicate mlint-lm-replace-focus mlint-lm-replace-focus--eieio-childp eieio-make-child-predicate mlint-lm-replace-focus-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-replace-focus) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (mlint-lm-delete-focus) ((fix-description :initform "Replace the offending symbol with ") (new-text :initform "")) (:documentation "Class which can replace the focus area." :abstract t)] 6) #@66 You cannot create a new object of type `mlint-lm-replace-focus'. (defalias 'mlint-lm-replace-focus #[(&rest _) "\300\301!\207" [error "Class mlint-lm-replace-focus is abstract"] 2 (#$ . 16718)]) (byte-code "\300\301\302\303\304\305%\210\300\306\304\307\310\311%\210\312\313\314\315!\"\210\312\316\317\315!\"\210\312\320\316\"\210\321\320\322\323#\210\324\315\325\316#\326\315\327\330\331$\207" [cl-generic-define-method initialize-instance (:after) ((this mlint-lm-replace-focus) &rest fields) nil #[(this &rest fields) "\301\302\303\302\"\304\305\"P#\207" [this eieio-oset fix-description eieio-oref-default eieio-oref new-text] 7 "Calculate the new fix description for THIS.\nOptional argument FIELDS are the initialization arguments.\n\n(fn THIS &rest FIELDS)"] mlint-fix-entry ((ent mlint-lm-replace-focus)) t #[(#1=#:cl--cnm ent) " \212`b\210\303\n\304\"c*\207" [#1# pos ent eieio-oref new-text] 3 "Replace the focus area with :new-text."] defalias mlint-lm-str2num-p eieio-make-class-predicate mlint-lm-str2num mlint-lm-str2num--eieio-childp eieio-make-child-predicate mlint-lm-str2num-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-str2num) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (mlint-lm-replace-focus) ((new-text :initform "str2double")) (:documentation "Replace str2num with str2double")] 6) #@55 Create a new object of class type `mlint-lm-str2num'. (defalias 'mlint-lm-str2num #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-str2num] 4 (#$ . 18080)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-str2num compiler-macro mlint-lm-str2num--anon-cmacro] 4) (defalias 'mlint-lm-str2num--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias mlint-lm-entry-deprecated-p eieio-make-class-predicate mlint-lm-entry-deprecated mlint-lm-entry-deprecated--eieio-childp eieio-make-child-predicate mlint-lm-entry-deprecated-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-entry-deprecated) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (mlint-lm-replace-focus) nil (:documentation "Entry for anything that is deprecated.\nExtracts the replacement for the deprecated symbol from the warning message.")] 6) #@64 Create a new object of class type `mlint-lm-entry-deprecated'. (defalias 'mlint-lm-entry-deprecated #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-entry-deprecated] 4 (#$ . 19248)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-entry-deprecated compiler-macro mlint-lm-entry-deprecated--anon-cmacro] 4) (defalias 'mlint-lm-entry-deprecated--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303\304\305%\210\306\307\310\311!\"\210\306\312\313\311!\"\210\306\314\312\"\210\315\314\316\317#\210\320\311\321\312#\322\311\323\304\324$\207" [cl-generic-define-method initialize-instance (:after) ((this mlint-lm-entry-deprecated) &rest fields) nil #[(this &rest fields) "\304\305\"\306\307 \"\211\205 \310\224\310\225O\227\311\312 #\210\311\313\314\313\" P#+\207" [this warn junk newfcn eieio-oref warning string-match "Use \\(\\w+\\) instead" 1 eieio-oset new-text fix-description eieio-oref-default] 7 "Calculate the 'new text' for THIS instance.\nOptional argument FIELDS are the initialization arguments.\n\n(fn THIS &rest FIELDS)"] defalias mlint-lm-function-name-p eieio-make-class-predicate mlint-lm-function-name mlint-lm-function-name--eieio-childp eieio-make-child-predicate mlint-lm-function-name-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-function-name) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (mlint-lm-replace-focus) (:documentation "When function name is missmatched with the file name.")] 6) #@61 Create a new object of class type `mlint-lm-function-name'. (defalias 'mlint-lm-function-name #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-function-name] 4 (#$ . 20921)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-function-name compiler-macro mlint-lm-function-name--anon-cmacro] 4) (defalias 'mlint-lm-function-name--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303\304\305%\210\306\307\310\311!\"\210\306\312\313\311!\"\210\306\314\312\"\210\315\314\316\317#\210\320\311\321\312#\322\311\323\324\325$\207" [cl-generic-define-method initialize-instance (:after) ((this mlint-lm-function-name) &rest fields) nil #[(this &rest fields) "\304\305\"\306\307 \"\206\306\310 \"\206\306\311 \"\211\205 \312\313 \"\314\315 #\210\314\316\317\316\" P#+\207" [this warn junk newfcn eieio-oref warning string-match "file name: '\\([a-zA-z][a-zA-z0-9]+\\)'" "do not agree: '\\([a-zA-z][a-zA-z0-9]+\\)'" "of the subclass '\\([a-zA-z][a-zA-z0-9]+\\)'" match-string 1 eieio-oset new-text fix-description eieio-oref-default] 7 "Compute the 'new text' for THIS to be the file name from the message.\nOptional arguments FIELDS are the initialization arguments.\n\n(fn THIS &rest FIELDS)"] defalias mlint-lm-entry-logicals-p eieio-make-class-predicate mlint-lm-entry-logicals mlint-lm-entry-logicals--eieio-childp eieio-make-child-predicate mlint-lm-entry-logicals-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-entry-logicals) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (mlint-lm-entry) ((fixable-p :initform t) (fix-description :initform "perform a replacement.")) (:documentation "Specialized logical and/or class.")] 6) #@62 Create a new object of class type `mlint-lm-entry-logicals'. (defalias 'mlint-lm-entry-logicals #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-entry-logicals] 4 (#$ . 22801)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-entry-logicals compiler-macro mlint-lm-entry-logicals--anon-cmacro] 4) (defalias 'mlint-lm-entry-logicals--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303\302\304%\210\305\306\307\310!\"\210\305\311\312\310!\"\210\305\313\311\"\210\314\313\315\316#\210\317\310\320\311#\321\310\322\323\324$\207" [cl-generic-define-method mlint-fix-entry nil ((ent mlint-lm-entry-logicals)) #[(ent) "\212\304\305\306\"!\210\307\305\310\"S!\210`\307\305\311\"!\210`\312 \n\" b\210 c,\207" [ent s e txt mlint-goto-line eieio-oref line move-to-column column column-end buffer-substring-no-properties] 4 "Replace the single logical with double logical."] defalias mlint-lm-entry-unused-argument-p eieio-make-class-predicate mlint-lm-entry-unused-argument mlint-lm-entry-unused-argument--eieio-childp eieio-make-child-predicate mlint-lm-entry-unused-argument-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-entry-unused-argument) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (mlint-lm-entry) ((fixable-p :initform t) (fix-description :initform "remove this argument.")) (:documentation "Specialized logical and/or class.")] 6) #@69 Create a new object of class type `mlint-lm-entry-unused-argument'. (defalias 'mlint-lm-entry-unused-argument #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-entry-unused-argument] 4 (#$ . 24391)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-entry-unused-argument compiler-macro mlint-lm-entry-unused-argument--anon-cmacro] 4) (defalias 'mlint-lm-entry-unused-argument--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303\302\304%\210\305\306\307\310!\"\210\305\311\312\310!\"\210\305\313\311\"\210\314\313\315\316#\210\317\310\320\311#\321\310\322\323\324$\207" [cl-generic-define-method mlint-fix-entry nil ((ent mlint-lm-entry-unused-argument)) #[(ent) "\212\303\304\305\"!\210\306\304\307\"S!\210`\306\304\310\"!\210` b\210\311\312!\204'\313u\210`\n|+\207" [ent s e mlint-goto-line eieio-oref line move-to-column column column-end looking-at "(\\|," -1] 4 "Remove the arguments."] defalias mlint-lm-quiet-p eieio-make-class-predicate mlint-lm-quiet mlint-lm-quiet--eieio-childp eieio-make-child-predicate mlint-lm-quiet-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-quiet) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (mlint-lm-entry) ((fixable-p :initform t) (fix-description :initform "Make sure this line prints no values.")) (:documentation "Specialized logical and/or class.")] 6) #@53 Create a new object of class type `mlint-lm-quiet'. (defalias 'mlint-lm-quiet #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-quiet] 4 (#$ . 25943)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-quiet compiler-macro mlint-lm-quiet--anon-cmacro] 4) (defalias 'mlint-lm-quiet--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303\302\304%\210\305\306\307\310!\"\210\305\311\312\310!\"\210\305\313\311\"\210\314\313\315\316#\210\317\310\320\311#\321\310\322\323\324$\207" [cl-generic-define-method mlint-fix-entry nil ((ent mlint-lm-quiet)) #[(ent) "\212\300 \210\301c)\207" [matlab-end-of-command ";"] 1 "Add semi-colon to end of this line."] defalias mlint-lm-missing-end-p eieio-make-class-predicate mlint-lm-missing-end mlint-lm-missing-end--eieio-childp eieio-make-child-predicate mlint-lm-missing-end-child-p make-obsolete "use (cl-typep ... \\='mlint-lm-missing-end) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (mlint-lm-entry) ((fixable-p :initform t) (fix-description :initform "Add matching end for this line.")) (:documentation "Missing end with guess as to where it might go.")] 6) #@59 Create a new object of class type `mlint-lm-missing-end'. (defalias 'mlint-lm-missing-end #[(&rest slots) "\301\302\303#\207" [slots apply make-instance mlint-lm-missing-end] 4 (#$ . 27281)]) (byte-code "\300\301\302\303#\300\207" [function-put mlint-lm-missing-end compiler-macro mlint-lm-missing-end--anon-cmacro] 4) (defalias 'mlint-lm-missing-end--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (cl-generic-define-method 'mlint-fix-entry nil '((ent mlint-lm-missing-end)) nil #[(ent) "\212\304\305\"\306\211\307\310 \"\203\311\312 \"\307\313 \"\203\"\311\312 \"\n\2038\314\315\n!!\210\316`\212\317c\210`)\"\202v \205v \320\230\205v\212\314\304\302\"!\210\306\210\321\322\306\323#\203k\324 \210\325\326\327!!\210\312y\210\212\330c\210)\331 \202udb\210\212\332c\210)\331 ),\207" [ent msg line blockname eieio-oref warning nil string-match "(after line \\([0-9]+\\))" match-string 1 "possibly matching \\([A-Z]+\\)\\." mlint-goto-line string-to-number indent-region "end\n" "FUNCTION" re-search-forward "^function " t beginning-of-line matlab-previous-command-begin matlab-compute-line-context 2 "end\n\n" matlab-indent-line "\nend\n\n"] 5 "Add semi-colon to end of this line."]) #@43 Setup ERR, an mlint message to be marked. (defalias 'mlint-highlight #[(err) "\212\302\303 @\304 A@@\305 A@A\306\307 8\310\311\312 8!& )\207" [mlint-mark-group err linemark-add-entry :line :column :column-end :warning 2 :warningid intern 4] 14 (#$ . 28626)]) #@42 Unhighlight all existing mlint warnings. (defalias 'mlint-clear-warnings #[nil "\301\302\303\304\"\"\207" [mlint-mark-group mapc #[(e) "\301\302\"\303 \230\205 \304!\207" [e eieio-oref filename buffer-file-name linemark-delete] 3] eieio-oref marks] 5 (#$ . 28892) nil]) #@127 Clear out any previous overlays with nested function information. This includes nested-function and cross-function-variables. (defalias 'mlint-clear-nested-function-info-overlays #[nil "\302ed\"\211\205'@\303 \304\"\204\303 \305\"\203\306 !\210)A\211\204 \307)\207" [overlays overlay linemark-overlays-in linemark-overlay-get cross-function-variables nested-function linemark-delete-overlay nil] 4 (#$ . 29173)]) #@64 Remove cross-function-variable overlays and re-fontify buffer. (defalias 'mlint-clear-cross-function-variable-highlighting #[nil "\302 \210\303\300!\205\205\303\304!\205 ?\205\304ed\"\207" [global-font-lock-mode font-lock-mode mlint-clear-nested-function-info-overlays boundp font-lock-flush] 3 (#$ . 29603)]) #@86 Run mlint on the current buffer. Highlight problems and/or cross-function variables. (defalias 'mlint-buffer #[nil "\303 \2059\2059 \203!\304 \203!\305\306\307\310\303 !\"!\203!\311 \210\312 \313 \210\n\2058\314\n@!\210\nA\211\204+\315)\207" [mlint-program buffer-file-truename errs buffer-file-name buffer-modified-p y-or-n-p format "Save %s before linting? " file-name-nondirectory save-buffer mlint-run mlint-clear-warnings mlint-highlight nil] 6 (#$ . 29928) nil]) #@42 Move to the next warning in this buffer. (defalias 'mlint-next-buffer #[nil "\302\303\304#\211\203\305\306 \307\"!\210\310\306 \311\"!\202\312 )\207" [mlint-mark-group n linemark-next-in-buffer 1 t mlint-goto-line eieio-oref line message warning ding] 5 (#$ . 30413) nil]) #@42 Move to the prev warning in this buffer. (defalias 'mlint-prev-buffer #[nil "\302\303\304#\211\203\305\306 \307\"!\210\310\306 \311\"!\202\312 )\207" [mlint-mark-group n linemark-next-in-buffer -1 t mlint-goto-line eieio-oref line message warning ding] 5 (#$ . 30698) nil]) #@46 Move to the next new warning in this buffer. (defalias 'mlint-next-buffer-new #[nil "\303`\"\304\305\306#\212 \2037\n\2037 \n=\2047\307\n\310\"\307 \310\"\230\2037\311\307 \312\"!\210\304\305\306#\211\204) \203L\311\307 \312\"!\210\313\307 \310\"!\202N\314 *\207" [mlint-mark-group n p linemark-at-point linemark-next-in-buffer 1 t eieio-oref warning mlint-goto-line line message ding] 6 (#$ . 30984) nil]) #@46 Move to the prev new warning in this buffer. (defalias 'mlint-prev-buffer-new #[nil "\303`\"\304\305\306#\212 \2037\n\2037 \n=\2047\307\n\310\"\307 \310\"\230\2037\311\307 \312\"!\210\304\305\306#\211\204) \203L\311\307 \312\"!\210\313\307 \310\"!\202N\314 *\207" [mlint-mark-group n p linemark-at-point linemark-next-in-buffer -1 t eieio-oref warning mlint-goto-line line message ding] 6 (#$ . 31411) nil]) #@40 Show the warning for the current mark. (defalias 'mlint-show-warning #[nil "\302`\"\211\204\303\304!\202\303\305 \306\"!)\207" [mlint-mark-group n linemark-at-point message "No warning at point." eieio-oref warning] 5 (#$ . 31839) nil]) #@40 Show the warning for the current mark. (defalias 'mlint-fix-warning #[nil "\302`\"\211\204\303\304!\202\305 !\204\303\306!\202\307 !)\207" [mlint-mark-group n linemark-at-point message "No warning at point." mlint-is-fixable "No method for fixing this warning." mlint-fix-entry] 4 (#$ . 32088) nil]) #@30 Mark this line as M-Lint Ok. (defalias 'mlint-mark-ok #[nil "\303`\"\211\204\304\305!\202(\306 \211\203\"\nb\210\307\310w\210\311c\202'\310\210\312c))\207" [mlint-mark-group n col linemark-at-point message "No warning at point." matlab-comment-on-line "% " nil "#ok " " %#ok"] 4 (#$ . 32404) nil]) #@48 Minor mode keymap used when mlinting a buffer. (defvar mlint-minor-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210)\207" [map make-sparse-keymap define-key ",n" mlint-next-buffer ",p" mlint-prev-buffer ",N" mlint-next-buffer-new ",P" mlint-prev-buffer-new ",g" mlint-buffer ",c" mlint-clear-warnings ", " mlint-show-warning ",f" mlint-fix-warning ",o" mlint-mark-ok] 4) (#$ . 32717)) #@24 M-Lint Minor Mode Menu (defvar mlint-minor-menu nil (#$ . 33259)) (easy-menu-do-define 'mlint-minor-menu mlint-minor-mode-map "M-Lint Minor Mode Menu" '("M-Lint" ["Get M-Lint Warnings" mlint-buffer t] ["Clear M-Lint Warnings" mlint-clear-warnings t] ["Show Warning" mlint-show-warning (linemark-at-point (point) mlint-mark-group)] ["Auto Fix Warning" mlint-fix-warning (let ((w (linemark-at-point (point) mlint-mark-group))) (and mlint-scan-for-fixes-flag w (mlint-is-fixable w)))] ["Enable Auto-fix scanning" (setq mlint-scan-for-fixes-flag (not mlint-scan-for-fixes-flag)) :style toggle :selected mlint-scan-for-fixes-flag] ["This is Ok" mlint-mark-ok (linemark-at-point (point) mlint-mark-group)] "--" ["Next Warning" mlint-next-buffer t] ["Previous Warning" mlint-prev-buffer t] ["Next New Warning" mlint-next-buffer-new t] ["Previous New Warning" mlint-prev-buffer-new t])) #@46 Map used in overlays marking mlint warnings. (defvar mlint-overlay-map (byte-code "\302 \303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\316 \"\210)\207" [map matlab-mode-map make-sparse-keymap define-key [down-mouse-3] mlint-emacs-popup-kludge [(meta n)] mlint-next-buffer [(meta p)] mlint-prev-buffer [(control meta n)] mlint-next-buffer-new [(control meta p)] mlint-prev-buffer-new set-keymap-parent] 4) (#$ . 34144)) #@73 Pop up a menu related to the clicked on item. Must be bound to event E. (defalias 'mlint-emacs-popup-kludge #[(e) "\305\211`\212\306 !\210`\307\f!\210` U\204`)\n\205 \nb+\207" [startpos ipos repos e mlint-minor-menu nil mouse-set-point popup-menu] 3 (#$ . 34616) "e"]) #@101 Non-nil if mlint minor mode is enabled. Use the command `mlint-minor-mode' to change this variable. (defvar mlint-minor-mode nil (#$ . 34900)) (make-variable-buffer-local 'mlint-minor-mode) #@147 Toggle mlint minor mode, a mode for showing mlint errors. With prefix ARG, turn mlint minor mode on iff ARG is positive. \{mlint-minor-mode-map\} (defalias 'mlint-minor-mode #[(&optional arg) "\306  \307=\203\n?\202 \247\203 \310W\203\311\202\312\313\303!\2032\314\302 \"\n\2032\302 B\n\203D\f\315=\204D\302\316!\210\317\320!\210\n\204[\321 \210\322 \210\323\324\325\312#\210\326 !\210\202\240+\203u+ \211,\203q\327\330!\210,)\202\204\204\204\331\332!\203\204\333\334!\210\203\234\335\324\325\311\312$\210\336 -\"\210\325 \210\202\240\302\316!\210\337\340\n\203\252\341\202\253\342\"\210\343\344!\203\322\306 \203\277\306 \232\203\322\345.\346\347\n\203\314\350\202\315\351.#\210))\352 \210\n\207" [#1=#:last-message arg mlint-minor-mode local-minor-modes major-mode mlint-minor-menu current-message toggle 1 nil t boundp delq matlab-mode -1 error "M-Lint minor mode is only for MATLAB Major mode" mlint-clear-nested-function-info-overlays mlint-clear-warnings remove-hook after-save-hook mlint-buffer easy-menu-remove make-local-variable mlint-program y-or-n-p "No MLINT program available. Configure it? " customize-variable mlint-programs add-hook easy-menu-add run-hooks mlint-minor-mode-hook mlint-minor-mode-on-hook mlint-minor-mode-off-hook called-interactively-p any " in current buffer" message "mlint minor mode %sabled%s" "en" "dis" force-mode-line-update mlint-program-selection-fcn ans mlint-minor-mode-map local] 6 (#$ . 35097) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))]) (defvar mlint-minor-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\313\310\211%\207" [mlint-minor-mode-map mlint-minor-mode-hook variable-documentation put "Hook run after entering or leaving `mlint-minor-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode mlint-minor-mode " mlint"] 6) #@52 Non nil if mlint is off, and it was auto-disabled. (defvar mlint-minor-mode-was-enabled-before nil (#$ . 37167)) (make-variable-buffer-local 'mlint-minor-mode-was-enabled-before) #@84 Hook run when EDiff is about to do stuff to a buffer. That buffer will be current. (defalias 'mlint-ediff-metabuffer-setup-hook #[nil "\303=\205 \205 \301\304!\207" [major-mode mlint-minor-mode mlint-minor-mode-was-enabled-before matlab-mode -1] 2 (#$ . 37352)]) (add-hook 'ediff-prepare-buffer-hook 'mlint-ediff-metabuffer-setup-hook) #@122 Re-enable mlint for buffers being ediffed. The buffer that was originally "setup" is not current, so we need to find it. (defalias 'mlint-ediff-cleanup-hook #[nil "\300\301\302 \"\207" [mapcar #[(b) "rq\210 \303=\205 \n)\205rq\210\304\305!\210\306\211)\207" [b major-mode mlint-minor-mode-was-enabled-before matlab-mode mlint-minor-mode 1 nil] 2] buffer-list] 3 (#$ . 37701)]) (byte-code "\300\301\302\"\210\303\304!\207" [add-hook ediff-cleanup-hook mlint-ediff-cleanup-hook provide mlint] 3)