branch: externals/matlab-mode
commit 772b1408185ddaedb92a740130c7764016cf0d1a
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>

    matlab-ts-mode: finish abbrev-mode to do item
---
 doc/matlab-and-abbrev-mode.org | 32 ++++++++++++++++++++++++++++++++
 matlab-ts-mode.el              |  2 --
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/doc/matlab-and-abbrev-mode.org b/doc/matlab-and-abbrev-mode.org
new file mode 100644
index 0000000000..2bcc6ea117
--- /dev/null
+++ b/doc/matlab-and-abbrev-mode.org
@@ -0,0 +1,32 @@
+# File: doc/matlab-mode-on-windows.org
+
+# Copyright 2016-2025 Free Software Foundation, Inc.
+
+#+startup: showall
+#+options: toc:nil
+
+#+title: MATLAB and abbrev-mode
+
+When editing *.m (or any language file, e.g. *.tlc, *.org, etc., you can save 
typing by using abbrev mode to
+automatically expand text.  An example usage is auto-correcting typos. This is 
no replacement for a
+spell checker, but it can save some time. For example, it's not uncommon to 
mistype the spelling of
+matlab by toggling the 't' and 'l'.
+
+ | Key binding | Description                                        |
+ |-------------+----------------------------------------------------|
+ | C-x a g     | Define an abbrev globally                          |
+ | C-x a i g   | Define an inverted abbrev globally                 |
+ | C-x a l     | Define an abbrev locally for current mode          |
+ | C-x a i l   | Define an inverted abbrev locally for current mode |
+
+The "inverted" approach to defining an abbrev is to mistype the word and then 
with the point after
+the mistyped word, type =C-x a i g" or =C-x a i l= to define the correction.
+
+If you define local mode abbrev's, you need to explicitly save them using:
+
+ : M-x write-abbrev-file
+
+and they will be automatically loaded when you restart Emacs. The default 
save, M-x
+abbrev-edit-save-buffer, does not save the local mode abbrev's.
+ 
+# LocalWords:  showall abbrev's
diff --git a/matlab-ts-mode.el b/matlab-ts-mode.el
index ea0536d3f1..33ee638448 100644
--- a/matlab-ts-mode.el
+++ b/matlab-ts-mode.el
@@ -3480,8 +3480,6 @@ so configuration variables of that mode, do not affect 
this mode.
     ;;      - Rename menu item "Check MLint Setup" to "Check setup" and have it
     ;;        look at both LSP and MLint. Place menu item at bottom.
     ;;
-    ;; TODO check abbrev mode - think this is setup by prog-mode, also see 
matlab-mode
-    ;;
     ;; TODO double check t-utils.el help, extract the help and put in treesit 
how to
     ;;
     ;; TODO add matlab-sections-minor-mode indicator in mode line and make it 
clickable so it can

Reply via email to