summaryrefslogtreecommitdiff
path: root/lisp/ses.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-09-14 08:43:18 +0200
committerStefan Kangas <stefan@marxist.se>2021-09-16 19:37:07 +0200
commit63f419f1339cbd0a7d1e64586854a4f01b3f80d1 (patch)
tree80bce487ec8c4f7d8258d13a49b21cb4eb3f289b /lisp/ses.el
parent36474a1e490a5eae266805a0e04615741d56692c (diff)
downloademacs-63f419f1339cbd0a7d1e64586854a4f01b3f80d1.tar.gz
emacs-63f419f1339cbd0a7d1e64586854a4f01b3f80d1.tar.bz2
emacs-63f419f1339cbd0a7d1e64586854a4f01b3f80d1.zip
; Minor stylistic fixes found by checkdoc
Diffstat (limited to 'lisp/ses.el')
-rw-r--r--lisp/ses.el37
1 files changed, 19 insertions, 18 deletions
diff --git a/lisp/ses.el b/lisp/ses.el
index cc8c35d6997..b831cbb5486 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -454,8 +454,8 @@ functions refer to its value."
`(ses-cell--references ,(if col `(ses-get-cell ,row ,col) row)))
(defmacro ses-sym-rowcol (sym)
- "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result
-is nil if SYM is not a symbol that names a cell."
+ "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0).
+Result is nil if SYM is not a symbol that names a cell."
(declare (debug t))
`(let ((rc (and (symbolp ,sym) (get ,sym 'ses-cell))))
(if (eq rc :ses-named)
@@ -623,7 +623,7 @@ This is a macro to prevent propagate-on-load viruses."
t)
(defmacro ses-column-printers (printers)
- "Load the vector of column printers from the spreadsheet file and checks
+ "Load the vector of column printers from the spreadsheet file and check
them for safety. This is a macro to prevent propagate-on-load viruses."
(or (and (vectorp printers) (= (length printers) ses--numcols))
(error "Bad column-printers vector"))
@@ -634,14 +634,14 @@ them for safety. This is a macro to prevent propagate-on-load viruses."
t)
(defmacro ses-default-printer (def)
- "Load the global default printer from the spreadsheet file and checks it
+ "Load the global default printer from the spreadsheet file and check it
for safety. This is a macro to prevent propagate-on-load viruses."
(setq ses--default-printer (ses-safe-printer def))
(ses-printer-record def)
t)
(defmacro ses-header-row (row)
- "Load the header row from the spreadsheet file and checks it
+ "Load the header row from the spreadsheet file and check it
for safety. This is a macro to prevent propagate-on-load viruses."
(or (and (wholenump row) (or (zerop ses--numrows) (< row ses--numrows)))
(error "Bad header-row"))
@@ -819,8 +819,8 @@ Return nil in case of failure."
buffer-undo-list))
(defun ses-reset-header-string ()
- "Flag the header string for update. Upon undo, the header string will be
-updated again."
+ "Flag the header string for update.
+Upon undo, the header string will be updated again."
(push '(apply ses-reset-header-string) buffer-undo-list)
(setq ses--header-hscroll -1))
@@ -1898,7 +1898,7 @@ Does not execute cell formulas or print functions."
(or (and (= (following-char) ?\n)
(eq (car-safe x) 'ses-local-printer)
(apply #'ses--local-printer (cdr x)))
- (error "local printer-def error"))
+ (error "Local printer-def error"))
(setq ses--numlocprn (1+ ses--numlocprn))))))
;; Load cell definitions.
(dotimes (row ses--numrows)
@@ -2594,8 +2594,7 @@ With prefix, deletes several cells."
(forward-char 1))))
(defun ses-clear-cell-backward (count)
- "Move to previous cell and then delete it. With prefix, delete several
-cells."
+ "Move to previous cell and then delete it. With prefix, delete several cells."
(interactive "*p")
(if (< count 0)
(1value (ses-clear-cell-forward (- count)))
@@ -3054,8 +3053,9 @@ hard to override how mouse-1 works."
(advice-add 'copy-region-as-kill :around #'ses--advice-copy-region-as-kill)
(defun ses-copy-region (beg end)
- "Treat the region as rectangular. Convert the intangible attributes to
-SES attributes recording the contents of the cell as of the time of copying."
+ "Treat the region as rectangular.
+Convert the intangible attributes to SES attributes recording the
+contents of the cell as of the time of copying."
(when (= end ses--data-marker)
;;Avoid overflow situation
(setq end (1- ses--data-marker)))
@@ -3070,7 +3070,7 @@ SES attributes recording the contents of the cell as of the time of copying."
x))
(defun ses-copy-region-helper (line)
- "Converts one line (of a rectangle being extracted from a spreadsheet) to
+ "Convert one line (of a rectangle being extracted from a spreadsheet) to
external form by attaching to each print cell a `ses' attribute that records
the corresponding data cell."
(or (> (length line) 1)
@@ -3172,8 +3172,8 @@ previous insertion."
(setq this-command 'yank))
(defun ses-yank-cells (text arg)
- "If the TEXT has a proper set of `ses' attributes, insert the text as
-cells, else return nil. The cells are reprinted--the supplied text is
+ "If TEXT has a proper set of `ses' attributes, insert it as cells.
+Otherwise, return nil. The cells are reprinted--the supplied text is
ignored because the column widths, default printer, etc. at yank time might
be different from those at kill-time. ARG is a list to indicate that
formulas are to be inserted without relocation."
@@ -3743,7 +3743,7 @@ Uses the value COMPILED-VALUE for this printer."
(defun ses-define-local-printer (name definition)
"Define a local printer with name NAME and definition DEFINITION.
-NAME shall be a symbol. Use TAB to complete over existing local
+NAME shall be a symbol. Use TAB to complete over existing local
printer names.
DEFINITION shall be either a string formatter, e.g.:
@@ -4012,8 +4012,9 @@ Use `math-format-value' as a printer for Calc objects."
(apply #'+ (apply #'ses-delete-blanks args)))
(defun ses-average (list)
- "Computes the sum of the numbers in LIST, divided by their length. Blanks
-are ignored. Result is always floating-point, even if all args are integers."
+ "Calculate the sum of the numbers in LIST, divided by their length.
+Blanks are ignored. Result is always floating-point, even if all
+args are integers."
(setq list (apply #'ses-delete-blanks list))
(/ (float (apply #'+ list)) (length list)))