summaryrefslogtreecommitdiff
path: root/lisp/forms.el
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2021-11-11 00:39:53 +0900
committerYuuki Harano <masm+github@masm11.me>2021-11-11 00:39:53 +0900
commit4dd1f56f29fc598a8339a345c2f8945250600602 (patch)
treeaf341efedffe027e533b1bcc0dbf270532e48285 /lisp/forms.el
parent4c49ec7f865bdad1629d2f125f71f4e506b258f2 (diff)
parent810fa21d26453f898de9747ece7205dfe6de9d08 (diff)
downloademacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.gz
emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.bz2
emacs-4dd1f56f29fc598a8339a345c2f8945250600602.zip
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'lisp/forms.el')
-rw-r--r--lisp/forms.el24
1 files changed, 11 insertions, 13 deletions
diff --git a/lisp/forms.el b/lisp/forms.el
index 8696aea98ee..551a1ba3c97 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -88,7 +88,7 @@
;; constructed. The current fields are available to the function
;; in the variable `forms-fields', they should *NOT* be modified.
;;
-;; - a lisp symbol, that must evaluate to one of the above.
+;; - a Lisp symbol, that must evaluate to one of the above.
;;
;; Optional variables which may be set in the control file:
;;
@@ -357,7 +357,7 @@ This variable is for use by the filter routines only.
The contents may NOT be modified.")
(defcustom forms-use-text-properties t
- "Non-nil means to use text properties. "
+ "Non-nil means to use text properties."
:type 'boolean)
(defcustom forms-insert-after nil
@@ -376,7 +376,7 @@ Also, initial position is at last record."
;;; Internal variables.
(defvar forms--file-buffer nil
- "Buffer which holds the file data")
+ "Buffer which holds the file data.")
(defvar forms--total-records 0
"Total number of records in the data file.")
@@ -410,7 +410,7 @@ Also, initial position is at last record."
"Forms parser routine.")
(defvar-local forms--mode-setup nil
- "To keep track of forms-mode being set-up.")
+ "To keep track of `forms-mode' being set-up.")
(defvar forms--dynamic-text nil
"Array that holds dynamic texts to insert between fields.")
@@ -453,8 +453,7 @@ Commands: Equivalent keys in read-only mode:
C-c C-p forms-prev-record p
C-c C-r forms-search-reverse r
C-c C-s forms-search-forward s
- C-c C-x forms-exit x
-"
+ C-c C-x forms-exit x"
(interactive)
;; This is not a simple major mode, as usual. Therefore, forms-mode
@@ -1392,8 +1391,7 @@ Commands: Equivalent keys in read-only mode:
(define-key map [prior] #'forms-prev-record)
(define-key map [begin] #'forms-first-record)
(define-key map [last] #'forms-last-record)
- (define-key map [backtab] #'forms-prev-field)
- )
+ (define-key map [backtab] #'forms-prev-field))
;;; Changed functions
@@ -1435,8 +1433,8 @@ Commands: Equivalent keys in read-only mode:
" \\[describe-mode]:help"))))
(defun forms--trans (subj arg rep)
- "Translate in SUBJ all chars ARG into char REP. ARG and REP should
- be single-char strings."
+ "Translate in SUBJ all chars ARG into char REP.
+ARG and REP should be single-char strings."
(let ((i 0)
(re (regexp-quote arg))
(k (string-to-char rep)))
@@ -1576,7 +1574,7 @@ As a side effect: sets `forms--the-record-list'."
(forms--trans the-record "\n" forms-multi-line))
;; A final sanity check before updating.
- (if (string-match-p "\n" the-record)
+ (if (string-search "\n" the-record)
(error "Multi-line fields in this record - update refused"))
(with-current-buffer forms--file-buffer
@@ -1707,7 +1705,7 @@ As a side effect: re-calculates the number of records in the data file."
;;; Other commands
(defun forms-toggle-read-only (arg)
- "Toggles read-only mode of a forms mode buffer.
+ "Toggle read-only mode of a forms mode buffer.
With an argument, enables read-only mode if the argument is positive.
Otherwise enables edit mode if the visited file is writable."
@@ -1880,7 +1878,7 @@ after the current record."
(setq forms--search-regexp regexp))
(defun forms-save-buffer (&optional args)
- "Forms mode replacement for save-buffer.
+ "Forms mode replacement for `save-buffer'.
It saves the data buffer instead of the forms buffer.
Calls `forms-write-file-filter' before, and `forms-read-file-filter'
after writing out the data."