emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ftable ec019c2 06/14: Add customization


From: Stefan Monnier
Subject: [elpa] externals/ftable ec019c2 06/14: Add customization
Date: Mon, 2 Aug 2021 18:27:31 -0400 (EDT)

branch: externals/ftable
commit ec019c2d81e89d1dd7768df285f3d3b7fab7e3c6
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Add customization
    
    * README.org: Fix typo.
    * ftable.el (ftable): New custom group.
    (ftable-fill-column): Change to a custom option.
    (ftable-recognize-table): New custom option.
---
 README.org |  2 +-
 ftable.el  | 18 +++++++++++++++---
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index 5f68a96..c70c26e 100644
--- a/README.org
+++ b/README.org
@@ -16,7 +16,7 @@ Commands provided:
 
 - ftable-edit-cell :: Edit the cell at point
 
-There are some limitations. Currently ftable doesn’t support tables with 
compound cells (cells that span multiple rows/columns) because they are more 
complicated to handle. If the need arises in the future (unlikely), I might 
improve ftable to handle more complex tables. Also, after filling, any manual 
line breaks in a cell is discarded.
+There are some limitations. Currently ftable doesn’t support tables with 
compound cells (cells that span multiple rows/columns) because they are more 
complicated to handle. If the need arises in the future (unlikely), I might 
improve ftable to handle more complex tables. Also, after filling, any manual 
line-break in a cell is discarded.
 
 * Customization
 
diff --git a/ftable.el b/ftable.el
index 7812924..09db7d5 100644
--- a/ftable.el
+++ b/ftable.el
@@ -22,7 +22,7 @@
 ;; with compound cells (cells that span multiple rows/columns) because
 ;; they are more complicated to handle. If the need arises in the
 ;; future (unlikely), I might improve ftable to handle more complex
-;; tables. Also, after filling, any manual line breaks in a cell is
+;; tables. Also, after filling, any manual line-break in a cell is
 ;; discarded.
 ;;
 ;; Customization:
@@ -38,8 +38,20 @@
 
 ;;; Customization
 
-(defvar-local ftable-fill-column fill-column
-  "Basically `fill-column' for fill-table.")
+(defgroup ftable
+  '((ftable-fill-column custom-variable)
+    (ftable-recognize-table custom-variable))
+  "Fill (auto-layout) tables."
+  :group 'text)
+
+(defcustom ftable-fill-column fill-column
+  "Basically `fill-column' for fill-table."
+  :local t
+  :type 'number)
+
+(defcustom ftable-recognize-table nil
+  "When non-nil, ftable calls `table-recognize' on the table."
+  :type 'boolean)
 
 ;;; Table structure
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]