cedet-matlab.el, matlab-cgen.el, matlab-compat.el,

matlab-complete.el, matlab-maint.el, matlab-netshell.el,
matlab-publish.el, matlab-topic.el, semantic-matlab.el,
semanticdb-matlab.el, srecode-matlab.el:
Fix varous issues in doc strings and messages identified by `checkdoc'
command.
This commit is contained in:
Eric Ludlam 2019-12-12 22:36:55 -05:00
parent f23a926bb2
commit fb19b6bcc1
11 changed files with 55 additions and 43 deletions

View File

@ -54,7 +54,7 @@
(add-to-list 'srecode-map-load-path tmpdir)
(if (fboundp 'srecode-map-update-map)
(srecode-map-update-map t)
(error "srecode-map-update-map not found"))
(error "Function srecode-map-update-map not found"))
))

View File

@ -20,7 +20,7 @@
;;; Commentary:
;;
;; This library supports tempo templates, and other misc functions designed
;; to create code in an emacs buffer.
;; to create code in an Emacs buffer.
(require 'matlab)
(require 'tempo)
@ -34,7 +34,7 @@
;;
;;;###autoload (autoload 'matlab-insert-map-fcn "matlab-cgen" "Keymap for C-c C-c in matlab-mode" t 'keymap)
(defvar matlab-insert-map
(defvar matlab-insert-map
(let ((km (make-sparse-keymap)))
(define-key km "c" 'matlab-insert-next-case)
(define-key km "e" 'matlab-insert-end-block)
@ -52,7 +52,7 @@
"Keymap used for inserting simple texts based on context.")
(defvar matlab-insert-map-fcn nil
"Keymap for C-c C-c in matlab-mode")
"Keymap for C-c C-c in matlab-mode.")
(fset 'matlab-insert-map-fcn (setq matlab-insert-map-fcn matlab-insert-map))

View File

@ -150,7 +150,7 @@ REGEXP defaults to \"[ \\t\\n\\r]+\"."
;; Finding executables
(defun matlab-find-executable-directory (program)
"find the executable PROGRAM on the exec path, following any links.
"Find the executable PROGRAM on the exec path, following any links.
Return the base directory it is in."
(let ((dir nil))
@ -169,7 +169,8 @@ Return the base directory it is in."
;; Completion Tools
(defun matlab-display-completion-list (completions common-substring)
;; In emacs 24.4 the common-substring is no longer needed
"Method for displaying COMPLETIONS with a COMMON-SUBSTRING."
;; In emacs 24.4 the common-substring is no longer needed.
(let ((args (if (or (< emacs-major-version 24)
(and (= emacs-major-version 24) (< emacs-minor-version 4)))
(list completions common-substring)

View File

@ -27,7 +27,7 @@
;; * look for local files that might be functions.
;;
;; Moved to separate library, as some modern tools do a better job
;; and this can be loaded optionally.
;; and this can be loaded optionally.
;;; Code:
(require 'matlab)

View File

@ -29,7 +29,7 @@
;;; Minor Mode Definition
;;
(defvar matlab-maint-mode-map
(defvar matlab-maint-mode-map
(let ((km (make-sparse-keymap)))
(define-key km [f8] 'matlab-maint-run-tests)
(define-key km [f9] 'matlab-maint-compile-matlab-emacs)
@ -78,7 +78,7 @@
(defun matlab-maint-run-tests (arg)
"Run the tests for matlab mode.
With universal arg, ask for the code to be run with output tracking turned on."
With universal ARG, ask for the code to be run with output tracking turned on."
(interactive "P")
(save-excursion
(matlab-maint-set-buffer-to "tests/Makefile")

View File

@ -34,7 +34,7 @@
"Port used for the Emacs server listening for MATLAB connections.")
(defvar matlab-netshell-server-name "*MATLAB netshell*"
"Name used for the Netshell server")
"Name used for the Netshell server.")
(defvar matlab-netshell-clients nil
"List of clients created from the MATLAB netshell server.")
@ -79,7 +79,8 @@
(make-variable-buffer-local 'matlab-netshell-acc)
(defun matlab-netshell-filter (proc string)
"Filter used for MATLAB Netshell processes."
"Filter used for MATLAB Netshell processes.
PROC is the TCP connection that produced STRING."
;; Accumulate from the process
(setq matlab-netshell-acc (concat matlab-netshell-acc string))
;; Wait for a NULL command terminator.
@ -149,7 +150,8 @@ response from some Emacs based request."
(defun matlab-netshell-sentinel (proc msg)
"Sentinel used for MATLAB Netshell processes.
Identify when a connection is lost, and close down services."
Identify when a connection is lost, and close down services.
PROC is the TCP stream which generated MSG."
(cond ((string-match "^open from " msg)
;; New connection - set it up.
(setq matlab-netshell-clients (cons proc matlab-netshell-clients))
@ -165,27 +167,27 @@ Identify when a connection is lost, and close down services."
(message "Unhandled event."))))
(defun matlab-netshell-send(cmd data)
"Send a command to MATLAB shell connection with DATA."
"Send a command CMD to MATLAB shell connection with DATA."
(let ((C (car matlab-netshell-clients)))
(if C
(process-send-string C (concat cmd "\n" data "\0"))
(error "No MATLAB network connection to send to."))))
(error "No MATLAB network connection to send to"))))
(defun matlab-netshell-eval (mcode)
"Send MSG to the active MATLAB shell connection to eval."
"Send MCODE to the active MATLAB shell connection to eval."
(interactive "sMCode: ")
(let ((C (car matlab-netshell-clients)))
(if C
(process-send-string C (concat "eval\n" mcode "\0"))
(error "No MATLAB network connection to send to."))))
(error "No MATLAB network connection to send to"))))
(defun matlab-netshell-evalc (mcode)
"Send MSG to the active MATLAB shell connection to eval."
"Send MCODE to the active MATLAB shell connection to eval."
(interactive "sMCode: ")
(let ((C (car matlab-netshell-clients)))
(if C
(process-send-string C (concat "evalc\n" mcode "\0"))
(error "No MATLAB network connection to send to."))))
(error "No MATLAB network connection to send to"))))
(defun matlab-netshell-ack ()
"Send an ACK to MATLAB to see if it can respond."

View File

@ -42,8 +42,7 @@
;; Functions
(defun matlab-select-publish-form (ch)
"This function allows to publish the m file, either as in LaTeX or in
HTML format."
"This function allows to publish the m file, either as in LaTeX or in HTML format."
(interactive "c1: LaTeX, 2: HTML ")
(setq ch (downcase ch))
(call-interactively (cond ((eql ch ?1) #'matlab-publish-file-latex)
@ -53,7 +52,7 @@ HTML format."
(defun matlab-publish-file-latex ()
"Publish a matlab file in the LaTeX format."
(interactive)
(let ((pub (file-name-nondirectory (buffer-file-name))))
(let ((pub (file-name-nondirectory (buffer-file-name))))
(matlab-shell-run-command (format "publish('%s','latex')" pub)))
(if matlab-show-matlab-shell
(matlab-show-matlab-shell-buffer)))
@ -61,8 +60,8 @@ HTML format."
(defun matlab-publish-file-html ()
"Publish a matlab file in the html format."
(interactive)
"Publish a matlab file in the html format."
(let ((pub (file-name-nondirectory (buffer-file-name))))
(matlab-shell-run-command (format "publish('%s','html')" pub)))
(if matlab-show-matlab-shell
@ -71,8 +70,9 @@ HTML format."
(defun matlab-select-environment (ch)
"This functions inserts structured text, which results for example
in LaTeX mode in title, sections, description, boldified text, unnumbered equations and bullet list."
"Inserts structured text.
This results in LaTeX mode in title, sections, description, boldified text,
unnumbered equations and bullet list."
(interactive "c1: title, 2: section, 3:descrip, 4:boldify, 5:equation, 6:list ")
(setq ch (downcase ch))
(call-interactively (cond ((eql ch ?1) #'matlab-insert-title)
@ -108,8 +108,7 @@ in LaTeX mode in title, sections, description, boldified text, unnumbered equat
(defun matlab-boldify ()
"Insert either \%\%\\n \% \*BOLD TEXT\*\\n or, when mark is active,
surrounds region by * *."
"Insert either \%\%\\n \% \*BOLD TEXT\*\\n or, when mark is active, surrounds region by * *."
(interactive)
(if (or (and (boundp 'zmacs-region-active-p) zmacs-region-active-p)
(and (boundp 'transient-mark-mode) transient-mark-mode mark-active))
@ -141,7 +140,7 @@ surrounds region by * *."
(defun matlab-insert-preformated-text ()
(interactive)
(insert "%%\n")
(insert "%\n")
(insert "%\n")
(insert "% PREFORMATTED\n")
(insert "% TEXT\n")
(insert "% \n")
@ -292,3 +291,7 @@ surrounds region by * *."
;;
;;}}}
(provide 'matlab-publish)
;;; matlab-publish.el ends here

View File

@ -95,7 +95,7 @@
;; Need this to fix wierd problem in define-derived-mode
(defvar matlab-shell-help-mode-syntax-table (make-syntax-table)
"Syntax table used in matlab-shell-help-mode.")
"Syntax table used in `matlab-shell-help-mode'.")
;;;###autoload
(define-derived-mode matlab-shell-help-mode

View File

@ -52,8 +52,8 @@
;; that need them. Take care of users who don't have cedet/semantic enabled by default.
(defun matlab-semantic-get-local-functions-for-script (&optional buffer)
"Return the list of functions (as semantic tags) for BuFFER.
If semantic-mode is not enabled, do something hacky to make it work."
"Return the list of functions (as semantic tags) for BUFFER.
If `semantic-mode' is not enabled, do something hacky to make it work."
(save-excursion
(when buffer (set-buffer buffer))
@ -72,7 +72,7 @@ If semantic-mode is not enabled, do something hacky to make it work."
tags)))
(defun matlab-semantic-tag-text (tag buffer)
"Return the text string for TAG."
"Return the text string for TAG in BUFFER."
(with-current-buffer buffer
(buffer-substring-no-properties (semantic-tag-start tag)
(semantic-tag-end tag))))
@ -122,7 +122,7 @@ Looks @ first declaration to determine if it is a class or function."
;; CLASS Defintions
(defvar semantic-matlab-match-classdef-re
"^\\s-*classdef\\b\\s-*\\(?:([^\n)]+)\\)?\\s-*\\<\\(?2:\\w+\\)\\>"
"Expression to match a class definition start")
"Expression to match a class definition start.")
(defun semantic-matlab-class-tags (&optional buffer)
"Find the MATLAB class tag, and all methods (functions) in BUFFER.
@ -196,7 +196,7 @@ Return argument is:
"Regular expression for matching the start of a properties block.")
(defun semantic-matlab-methods-update-tags (rawtags start end)
"Create a tags list out of properties found between START and END."
"Create a tags list out of RAWTAGS and properties found between START and END."
(save-excursion
(goto-char start)
(let ((taglist nil)
@ -460,7 +460,7 @@ Each tag returned is a semantic FUNCTION tag. See
(define-mode-local-override semantic-tag-components-with-overlays
matlab-mode (tag)
"Return the list of subfunctions, or class members in TAG."
(or
(or
(semantic-tag-get-attribute tag :members)
(semantic-tag-get-attribute tag :subfunctions)))
@ -473,7 +473,7 @@ Each tag returned is a semantic FUNCTION tag. See
(car (semantic--tag-expand tag))))
(defun semantic-matlab-parse-class (&optional limit)
"Pase the class from the current MATLAB buffer."
"Parse the class from the current MATLAB buffer up to LIMIT."
(semantic-matlab-sort-raw-class-tags (semantic-matlab-class-tags)))
(defun semantic-matlab-sort-raw-class-tags (tag-list)
@ -502,7 +502,7 @@ Each tag returned is a semantic FUNCTION tag. See
newlist))
(defun semantic-matlab-parse-functions (&optional limit)
"Parse all functions from the current MATLAB buffer."
"Parse all functions from the current MATLAB buffer up to LIMIT."
(car
(semantic-matlab-sort-raw-function-tags (semantic-matlab-function-tags)
(or limit (point-max)))
@ -615,7 +615,7 @@ where NAME is unique."
(string= left (match-string 1 right)))
(setq right (match-string 1 right)))
;; otherwise reduce right-hand side to first symbol
(t
(t
(string-match "[[({ ]*\\([A-Za-z_0-9]*\\)" right)
(setq right (match-string 1 right))))
(cond
@ -735,7 +735,9 @@ cannot derive an argument list for them."
(semantic-format-tag-prototype-default tag parent color))))
(defun semantic-idle-summary-format-matlab-mode (tag &optional parent color)
"Describe TAG and display corresponding MATLAB 'lookfor' doc-string."
"Describe TAG and display corresponding MATLAB 'lookfor' doc-string.
Optional PARENT and COLOR specify additional details for the tag.
See `semantic-format-tag-prototype-matlab-mode' for details."
(let* ((proto (semantic-format-tag-prototype-matlab-mode tag nil color))
(doc (semantic-tag-docstring tag)))
(concat proto " (" doc ")")))

View File

@ -22,6 +22,10 @@
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;
;; Support for Semantic Databases for MATLAB buffers.
;; For generic function searching.
(require 'eieio)
(require 'eieio-opt)
@ -86,7 +90,7 @@ the omniscience database.")
;;; Filename based methods
;;
(cl-defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-matlab))
"For a MATLAB database, there are no explicit tables.
"For a MATLAB database OBJ, there are no explicit tables.
Create one of our special tables that can act as an intermediary."
;; NOTE: This method overrides an accessor for the `tables' slot in
;; a database. You can either construct your own (like tmp here
@ -149,7 +153,7 @@ database (if available.)"
)
(if (fboundp 'semanticdb-find-translate-path-default)
(semanticdb-find-translate-path-default path brutish)
(error "semanticdb-find-translate-path-default doesn't exist")
(error "Variable semanticdb-find-translate-path-default doesn't exist")
))))
;; Don't add anything if BRUTISH is on (it will be added in that fcn)
;; or if we aren't supposed to search the system.

View File

@ -1,6 +1,6 @@
;;; srecode-matlab.el --- Extra SRecode support for MATLAB
;;
;; Copyright (C) 2014 Eric Ludlam
;; Copyright (C) 2014, 2019 Eric Ludlam
;;
;; Author: Eric Ludlam <zappo@gnu.org>
;; X-RCS: $Id$
@ -46,8 +46,8 @@ PACKAGE - The package this file is in, or empty if none.
FILE_CLASS - Show section if filename should be a class.
FILE_FUNCTION - Show setion if filename is a function.
On class prediction - when filling in an empty file, if the filename and directory it is in
match, for example @foo/foo.m then foo should be a classdef."
On class prediction - when filling in an empty file, if the filename and
directory it is in match, for example @foo/foo.m then foo should be a classdef."
(when (not (eq major-mode 'matlab-mode))
(error "Wrong mode for :matlab argument"))
(let* ((fsym (file-name-sans-extension (file-name-nondirectory (buffer-file-name))))