From a602d548dfaa1dcd44c3af017ccbbcd3586ca023 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 18 Sep 2021 23:39:01 +0200 Subject: ; Stylistic docfixes in emulation/*.el found by checkdoc --- lisp/emulation/viper-init.el | 63 ++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 32 deletions(-) (limited to 'lisp/emulation/viper-init.el') diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 8188971c0d0..730ca0b5a2e 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -246,19 +246,19 @@ that deletes a file.") ;; Some common error messages -(defconst viper-SpuriousText "Spurious text after command" "") -(defconst viper-BadExCommand "Not an editor command" "") -(defconst viper-InvalidCommandArgument "Invalid command argument" "") -(defconst viper-NoPrevSearch "No previous search string" "") -(defconst viper-EmptyRegister "`%c': Nothing in this register" "") -(defconst viper-InvalidRegister "`%c': Invalid register" "") -(defconst viper-EmptyTextmarker "`%c': Text marker doesn't point anywhere" "") -(defconst viper-InvalidTextmarker "`%c': Invalid text marker" "") -(defconst viper-InvalidViCommand "Invalid command" "") -(defconst viper-BadAddress "Ill-formed address" "") -(defconst viper-FirstAddrExceedsSecond "First address exceeds second" "") -(defconst viper-NoFileSpecified "No file specified" "") -(defconst viper-ViperBell "Viper bell" "") +(defconst viper-SpuriousText "Spurious text after command") +(defconst viper-BadExCommand "Not an editor command") +(defconst viper-InvalidCommandArgument "Invalid command argument") +(defconst viper-NoPrevSearch "No previous search string") +(defconst viper-EmptyRegister "`%c': Nothing in this register") +(defconst viper-InvalidRegister "`%c': Invalid register") +(defconst viper-EmptyTextmarker "`%c': Text marker doesn't point anywhere") +(defconst viper-InvalidTextmarker "`%c': Invalid text marker") +(defconst viper-InvalidViCommand "Invalid command") +(defconst viper-BadAddress "Ill-formed address") +(defconst viper-FirstAddrExceedsSecond "First address exceeds second") +(defconst viper-NoFileSpecified "No file specified") +(defconst viper-ViperBell "Viper bell") ;; Is t until viper-mode executes for the very first time. ;; Prevents recursive descend into startup messages. @@ -282,7 +282,7 @@ Use `\\[viper-set-expert-level]' to change this.") ;; If non-nil, ISO accents will be turned on in insert/replace emacs states and ;; turned off in vi-state. For some users, this behavior may be too ;; primitive. In this case, use insert/emacs/vi state hooks. -(defvar-local viper-automatic-iso-accents nil "") +(defvar-local viper-automatic-iso-accents nil) ;; Set iso-accents-mode to ARG. Check if it is bound first (defsubst viper-set-iso-accents-mode (arg) (if (boundp 'iso-accents-mode) @@ -292,7 +292,7 @@ Use `\\[viper-set-expert-level]' to change this.") ;; Don't change this! (defvar viper-mule-hook-flag t) ;; If non-nil, the default intl. input method is turned on. -(defvar-local viper-special-input-method nil "") +(defvar-local viper-special-input-method nil) ;; viper hook to run on input-method activation (defun viper-activate-input-method-action () @@ -355,7 +355,7 @@ it better fits your working style." ;; Replace mode and changing text ;; Hack used to pass global states around for short period of time -(defvar-local viper-intermediate-command nil "") +(defvar-local viper-intermediate-command nil) ;; This is used to pass the right Vi command key sequence to ;; viper-set-destructive-command whenever (this-command-keys) doesn't give the @@ -365,7 +365,7 @@ it better fits your working style." (defconst viper-this-command-keys nil) ;; Indicates that the current destructive command has started in replace mode. -(defvar-local viper-began-as-replace nil "") +(defvar-local viper-began-as-replace nil) (defcustom viper-allow-multiline-replace-regions t "If non-nil, Viper will allow multi-line replace regions. @@ -396,7 +396,7 @@ delete the text being replaced, as in standard Vi." ;; internal var, used to remember the default cursor color of emacs frames (defvar viper-vi-state-cursor-color nil) -(defvar-local viper-replace-overlay nil "") +(defvar-local viper-replace-overlay nil) (put 'viper-replace-overlay 'permanent-local t) (defcustom viper-replace-region-end-delimiter "$" @@ -434,18 +434,18 @@ color displays. By default, the delimiters are used only on TTYs." (put 'viper-last-posn-in-replace-region 'permanent-local t) (put 'viper-last-posn-while-in-insert-state 'permanent-local t) -(defvar-local viper-sitting-in-replace nil "") +(defvar-local viper-sitting-in-replace nil) (put 'viper-sitting-in-replace 'permanent-local t) ;; Remember the number of characters that have to be deleted in replace ;; mode to compensate for the inserted characters. -(defvar-local viper-replace-chars-to-delete 0 "") +(defvar-local viper-replace-chars-to-delete 0) ;; This variable is used internally by the before/after changed functions to ;; determine how many chars were deleted by the change. This can't be ;; determined inside after-change-functions because those get the length of the ;; deleted region, not the number of chars deleted (which are two different ;; things under MULE). -(defvar-local viper-replace-region-chars-deleted 0 "") +(defvar-local viper-replace-region-chars-deleted 0) ;; Insertion ring and command ring (defcustom viper-insertion-ring-size 14 @@ -494,7 +494,7 @@ will make it hard to use Vi-style timeout macros." ;; Autoindent in insert ;; Variable that keeps track of whether C-t has been pressed. -(defvar-local viper-cted nil "") +(defvar-local viper-cted nil) ;; Preserve the indent value, used by C-d in insert mode. (defvar-local viper-current-indent 0) @@ -502,14 +502,14 @@ will make it hard to use Vi-style timeout macros." ;; Whether to preserve the indent, used by C-d in insert mode. (defvar-local viper-preserve-indent nil) -(defvar-local viper-auto-indent nil "") +(defvar-local viper-auto-indent nil) (defcustom viper-auto-indent nil "Enable autoindent, if t. This is a buffer-local variable." :type 'boolean :group 'viper) -(defvar-local viper-electric-mode t "") +(defvar-local viper-electric-mode t) (defcustom viper-electric-mode t "If t, electrify Viper. Currently, this only electrifies auto-indentation, making it appropriate to the @@ -595,7 +595,7 @@ to a new place after repeating previous Vi command." ;;; Variables for Moves and Searches (defgroup viper-search nil - "Variables that define the search and query-replace behavior of Viper." + "Variables that define the search and `query-replace' behavior of Viper." :prefix "viper-" :group 'viper) @@ -658,14 +658,14 @@ negative number." :type 'boolean :group 'viper) -(defvar-local viper-ex-style-motion t "") +(defvar-local viper-ex-style-motion t) (defcustom viper-ex-style-motion t "If t, the commands l,h do not cross lines, etc (Ex-style). If nil, these commands cross line boundaries." :type 'boolean :group 'viper) -(defvar-local viper-ex-style-editing t "") +(defvar-local viper-ex-style-editing t) (defcustom viper-ex-style-editing t "If t, Ex-style behavior while editing in Vi command and insert states. `Backspace' and `Delete' don't cross line boundaries in insert. @@ -677,14 +677,14 @@ If nil, the above commands can work across lines." :type 'boolean :group 'viper) -(defvar-local viper-ESC-moves-cursor-back viper-ex-style-editing "") +(defvar-local viper-ESC-moves-cursor-back viper-ex-style-editing) (defcustom viper-ESC-moves-cursor-back nil "If t, ESC moves cursor back when changing from insert to vi state. If nil, the cursor stays where it was when ESC was hit." :type 'boolean :group 'viper) -(defvar-local viper-delete-backwards-in-replace nil "") +(defvar-local viper-delete-backwards-in-replace nil) (defcustom viper-delete-backwards-in-replace nil "If t, DEL key will delete characters while moving the cursor backwards. If nil, the cursor will move backwards without deleting anything." @@ -702,7 +702,7 @@ If nil, the cursor will move backwards without deleting anything." :tag "Search Wraps Around" :group 'viper-search) -(defvar-local viper-related-files-and-buffers-ring nil "") +(defvar-local viper-related-files-and-buffers-ring nil) (defcustom viper-related-files-and-buffers-ring nil "List of file and buffer names to consider related to the current buffer. Related buffers can be cycled through via :R and :P commands." @@ -839,8 +839,7 @@ to customize the actual face object `viper-minibuffer-vi' this variable represents.") ;; the current face to be used in the minibuffer -(defvar-local - viper-minibuffer-current-face viper-minibuffer-emacs-face "") +(defvar-local viper-minibuffer-current-face viper-minibuffer-emacs-face) ;;; Miscellaneous -- cgit v1.2.3 From c78e16962e63895d340f80cf245fad568a7da770 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 24 Sep 2021 14:46:56 +0200 Subject: ; Adjust overly long docstrings to fit 80 characters --- lisp/array.el | 5 +++-- lisp/cedet/data-debug.el | 3 ++- lisp/cedet/semantic/analyze/complete.el | 3 ++- lisp/cedet/semantic/db-find.el | 2 +- lisp/cedet/semantic/tag-ls.el | 19 ++++++++++++++----- lisp/emacs-lisp/eieio-core.el | 2 +- lisp/emacs-lisp/seq.el | 4 ++-- lisp/emulation/viper-cmd.el | 3 ++- lisp/emulation/viper-init.el | 3 ++- lisp/erc/erc-backend.el | 3 ++- lisp/erc/erc-dcc.el | 5 ++--- lisp/frameset.el | 3 ++- lisp/gnus/gnus-agent.el | 4 ++-- lisp/gnus/gnus-bookmark.el | 4 +++- lisp/gnus/gnus-fun.el | 3 ++- lisp/gnus/gnus-group.el | 6 ++++-- lisp/gnus/gnus-score.el | 4 +++- lisp/gnus/gnus-sum.el | 9 +++++---- lisp/gnus/nnvirtual.el | 8 +++++--- lisp/net/dbus.el | 3 ++- lisp/net/dictionary.el | 2 +- lisp/net/eudc.el | 5 +++-- lisp/net/ntlm.el | 4 ++-- lisp/net/tramp-gvfs.el | 11 +++++++---- lisp/net/tramp-sh.el | 2 +- lisp/org/ob-table.el | 3 ++- lisp/org/org-agenda.el | 3 ++- lisp/org/org-protocol.el | 15 ++++++++------- lisp/play/doctor.el | 4 ++-- lisp/progmodes/cc-cmds.el | 2 +- lisp/progmodes/flymake-proc.el | 7 ++++--- lisp/progmodes/idlwave.el | 3 ++- lisp/progmodes/prolog.el | 3 ++- lisp/progmodes/verilog-mode.el | 14 ++++++++++---- lisp/tab-bar.el | 7 ++++--- lisp/textmodes/texinfo.el | 3 ++- lisp/vc/ediff-merg.el | 3 ++- lisp/vc/ediff.el | 10 ++++++---- lisp/vc/vc-annotate.el | 3 ++- lisp/vc/vc-dir.el | 3 ++- lisp/vc/vc-dispatcher.el | 2 +- lisp/vc/vc.el | 4 ++-- lisp/whitespace.el | 4 ++-- test/lisp/auth-source-pass-tests.el | 6 ++++-- test/lisp/international/ucs-normalize-tests.el | 6 +++--- 45 files changed, 138 insertions(+), 87 deletions(-) (limited to 'lisp/emulation/viper-init.el') diff --git a/lisp/array.el b/lisp/array.el index 6632da55dd4..2c9a6815d25 100644 --- a/lisp/array.el +++ b/lisp/array.el @@ -805,8 +805,9 @@ NOT recognized as integers or real numbers. The array MUST reside at the top of the buffer. TABs are not respected, and may be converted into spaces at any time. -Setting the variable `array-respect-tabs' to non-nil will prevent TAB conversion, -but will cause many functions to give errors if they encounter one. +Setting the variable `array-respect-tabs' to non-nil will prevent +TAB conversion, but will cause many functions to give errors if +they encounter one. Upon entering array mode, you will be prompted for the values of several variables. Others will be calculated based on the values you diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index 428848be04d..8f40a4db79d 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el @@ -413,7 +413,8 @@ PREBUTTONTEXT is some text between prefix and the stuff list button." ) (defun data-debug-insert-hash-table-button (hash-table prefix prebuttontext) - "Insert HASH-TABLE as expandable button with recursive prefix PREFIX and PREBUTTONTEXT in front of the button text." + "Insert HASH-TABLE as expandable button with recursive prefix PREFIX and +PREBUTTONTEXT in front of the button text." (let ((string (propertize (format "%s" hash-table) 'face 'font-lock-keyword-face))) (insert (propertize diff --git a/lisp/cedet/semantic/analyze/complete.el b/lisp/cedet/semantic/analyze/complete.el index 1e8cd9af088..5c3228ae166 100644 --- a/lisp/cedet/semantic/analyze/complete.el +++ b/lisp/cedet/semantic/analyze/complete.el @@ -70,7 +70,8 @@ context. Passing in a context is useful if the caller also needs to access parts of the analysis. The remaining FLAGS arguments are passed to the mode specific completion engine. Bad flags should be ignored by modes that don't use them. -See `semantic-analyze-possible-completions-default' for details on the default FLAGS. +See `semantic-analyze-possible-completions-default' for details +on the default FLAGS. Completions run through the following filters: * Elements currently in scope diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index 61baaa020f8..e6a7879775e 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el @@ -914,7 +914,7 @@ but should be good enough for debugging assertions." (null (car (cdr (car resultp))))))) (defun semanticdb-find-result-prin1-to-string (result) - "Presuming RESULT satisfies `semanticdb-find-results-p', provide a short PRIN1 output." + "If RESULT satisfies `semanticdb-find-results-p', provide a short PRIN1 output." (if (< (length result) 2) (concat "# (gnus-thread-highest-number h1) (gnus-thread-highest-number h2))) (defun gnus-thread-highest-number (thread) @@ -5187,7 +5188,7 @@ Unscored articles will be counted as having a score of zero." (gnus-article-sort-by-date h1 h2)) (defun gnus-thread-sort-by-most-recent-date (h1 h2) - "Sort threads such that the thread with the most recently dated article comes first." + "Sort threads such that the thread with most recently dated article is first." (> (gnus-thread-latest-date h1) (gnus-thread-latest-date h2))) (defsubst gnus-article-sort-by-newsgroups (h1 h2) @@ -5651,7 +5652,7 @@ or a straight list of headers." gnus-list-identifiers))) (defun gnus-summary-remove-list-identifiers () - "Remove list identifiers in `gnus-list-identifiers' from articles in the current group." + "Remove identifiers in `gnus-list-identifiers' from articles in current group." (let ((regexp (gnus-group-get-list-identifiers gnus-newsgroup-name)) changed subject) (when regexp diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index 03a0ff296f2..4136392c825 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el @@ -382,7 +382,8 @@ It is computed from the marks of individual component groups.") (defun nnvirtual-update-xref-header (group article prefix sysname) - "Edit current NOV header in current buffer to have an xref to the component group, and also server prefix any existing xref lines." + "Edit current NOV header in current buffer to have an xref to the component +group, and also server prefix any existing xref lines." ;; Move to beginning of Xref field, creating a slot if needed. (beginning-of-line) (looking-at @@ -569,7 +570,8 @@ If UPDATE-P is not nil, call gnus-group-update-group on the components." ;; unique reverse mapping. (defun nnvirtual-map-article (article) - "Return a cons of the component group and article corresponding to the given virtual ARTICLE." + "Return a cons of the component group and article corresponding to the given +virtual ARTICLE." (let ((table nnvirtual-mapping-table) entry group-pos) (while (and table @@ -590,7 +592,7 @@ If UPDATE-P is not nil, call gnus-group-update-group on the components." (defun nnvirtual-reverse-map-article (group article) - "Return the virtual article number corresponding to the given component GROUP and ARTICLE." + "Return virtual article number corresponding to component GROUP and ARTICLE." (when (numberp article) (let ((table nnvirtual-mapping-table) (group-pos 0) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 4116d293e1b..560ece67517 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -2073,7 +2073,8 @@ either a method name, a signal name, or an error name." (goto-char point))) (defun dbus-monitor-handler (&rest _args) - "Default handler for the \"org.freedesktop.DBus.Monitoring.BecomeMonitor\" interface. + "Default handler for the \"Monitoring.BecomeMonitor\" interface. +Its full name is \"org.freedesktop.DBus.Monitoring.BecomeMonitor\". It will be applied for all objects created by `dbus-register-monitor' which don't declare an own handler. The printed timestamps do not reflect the time the D-Bus message has passed the D-Bus diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index 85467cd7828..09d250fd7bf 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -1049,7 +1049,7 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." 'dictionary-display-match-result))) (defun dictionary-do-matching (word dictionary strategy function) - "Find matches for WORD with STRATEGY in DICTIONARY and display them with FUNCTION." + "Search for WORD with STRATEGY in DICTIONARY and display them with FUNCTION." (message "Lookup matching words for %s in %s using %s" word dictionary strategy) (dictionary-send-command diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 5c451c6556d..14e5c28b2dc 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -798,8 +798,9 @@ see `eudc-inline-expansion-servers'." "Query the directory server, and return the matching responses. The variable `eudc-inline-query-format' controls how to associate the individual QUERY-WORDS with directory attribute names. -After querying the server for the given string, the expansion specified by -`eudc-inline-expansion-format' is applied to the matches before returning them.inserted in the buffer at point. +After querying the server for the given string, the expansion +specified by `eudc-inline-expansion-format' is applied to the +matches before returning them.inserted in the buffer at point. Multiple servers can be tried with the same query until one finds a match, see `eudc-inline-expansion-servers'." (cond diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el index 747a69fb5d4..0e0146df969 100644 --- a/lisp/net/ntlm.el +++ b/lisp/net/ntlm.el @@ -436,7 +436,7 @@ PASSWD is truncated to 14 bytes if longer." (make-string (- 15 len) 0))))) (defun ntlm-smb-owf-encrypt (passwd c8) - "Return response string of 24 bytes long for password string PASSWD based on DES encryption. + "Return response string of 24 bytes long for PASSWD based on DES encryption. PASSWD is of at most 14 bytes long and the challenge string C8 of 8 bytes long." (let* ((len (min (length passwd) 16)) @@ -459,7 +459,7 @@ PASSWD is of at most 14 bytes long and the challenge string C8 of (substring p15 7) t))) (defun ntlm-smb-hash (in key forw) - "Return hash string of length 8 for a string IN of length 8 and a string KEY of length 8. + "Return hash string of length 8 for IN of length 8 and KEY of length 8. FORW is t or nil." (let ((out (make-string 8 0)) (inb (make-string 64 0)) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 5f0e7bcd98c..115d005c0ca 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -1833,8 +1833,9 @@ a downcased host name only." result)))) (defun tramp-gvfs-handler-mounted-unmounted (mount-info) - "Signal handler for the \"org.gtk.vfs.MountTracker.mounted\" and \ -\"org.gtk.vfs.MountTracker.unmounted\" signals." + "Signal handler for the gvfs \"mounted\" and \"unmounted\" signals. +Their full names are \"org.gtk.vfs.MountTracker.mounted\" and +\"org.gtk.vfs.MountTracker.unmounted\"." (ignore-errors (let ((signal-name (dbus-event-member-name last-input-event)) (elt mount-info)) @@ -2090,8 +2091,10 @@ It was \"a(say)\", but has changed to \"a{sv})\"." `(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec))) (defun tramp-gvfs-handler-volumeadded-volumeremoved (_dbus-name _id volume) - "Signal handler for the \"org.gtk.Private.RemoteVolumeMonitor.VolumeAdded\" \ -and \"org.gtk.Private.RemoteVolumeMonitor.VolumeRemoved\" signals." + "Signal handler for the gvfs \"VolumeAdded\" and \"VolumeRemoved\" signals. +Their full names are +\"org.gtk.Private.RemoteVolumeMonitor.VolumeAdded\" and +\"org.gtk.Private.RemoteVolumeMonitor.VolumeRemoved\"." (ignore-errors (let* ((signal-name (dbus-event-member-name last-input-event)) (uri (url-generic-parse-url (nth 5 volume))) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 0fe106684c5..dd92f226897 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1699,7 +1699,7 @@ ID-FORMAT valid values are `string' and `integer'." ;; FIXME: Fix function to work with count parameter. (defun tramp-do-directory-files-and-attributes-with-stat (vec localname &optional id-format) - "Implement `directory-files-and-attributes' for Tramp files using stat(1) command." + "Implement `directory-files-and-attributes' for Tramp files with stat(1) command." (tramp-message vec 5 "directory-files-and-attributes with stat: %s" localname) (tramp-send-command-and-read vec diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el index 39a14a25d6c..e081708701d 100644 --- a/lisp/org/ob-table.el +++ b/lisp/org/ob-table.el @@ -78,7 +78,8 @@ So this `org-sbe' construct is the equivalent of the following source code block: - #+begin_src emacs-lisp :var results=source-block(n=val_at_col_2, m=3) :results silent + #+begin_src emacs-lisp :var results=source-block(n=val_at_col_2, m=3) \\ + :results silent results #+end_src diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 23c62809a2b..271eac1c30d 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -1230,7 +1230,8 @@ For example, 9:30am would become 09:30 rather than 9:30." ":" minute ampm))) (defun org-agenda-time-of-day-to-ampm-maybe (time) - "Conditionally convert TIME to AM/PM format based on `org-agenda-timegrid-use-ampm'." + "Conditionally convert TIME to AM/PM format. +This is based on `org-agenda-timegrid-use-ampm'." (if org-agenda-timegrid-use-ampm (org-agenda-time-of-day-to-ampm time) time)) diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 726c1ca2bae..ff8c08d5c5f 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -178,11 +178,11 @@ Possible properties are: :working-suffix - the replacement for online-suffix :base-url - the base URL, e.g. http://www.example.com/project/ Last slash required. - :working-directory - the local working directory. This is, what base-url will - be replaced with. - :redirects - A list of cons cells, each of which maps a regular - expression to match to a path relative to - :working-directory. + :working-directory - the local working directory. This is what + base-url will be replaced with. + :redirects - A list of cons cells, each of which maps a + regular expression to match to a path relative + to `:working-directory'. Example: @@ -216,8 +216,9 @@ Example: does not include any suffix properties, allowing local source file to be opened as found by OpenGrok. -Consider using the interactive functions `org-protocol-create' and -`org-protocol-create-for-org' to help you filling this variable with valid contents." +Consider using the interactive functions `org-protocol-create' +and `org-protocol-create-for-org' to help you filling this +variable with valid contents." :group 'org-protocol :type 'alist) diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index b855f7e35a1..33fecaa188a 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -1011,8 +1011,8 @@ Put dialogue in buffer." (defun doctor-subjsearch (sent key type) "Search for the subject of a sentence SENT, looking for the noun closest -to and preceding KEY by at least TYPE words. Set global variable `doctor-subj' to -the subject noun, and return the portion of the sentence following it." +to and preceding KEY by at least TYPE words. Set global variable `doctor-subj' +to the subject noun, and return the portion of the sentence following it." (let ((i (- (length sent) (length (memq key sent)) type))) (while (and (> i -1) (not (doctor-nounp (nth i sent)))) (setq i (1- i))) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 6c3da667bfc..d40433a9b0d 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -480,7 +480,7 @@ function to control that." ;; This function is only used in XEmacs. (defun c-hungry-delete () - "Delete a non-whitespace char, or all whitespace up to the next non-whitespace char. + "Delete non-whitespace char, or all whitespace up to next non-whitespace char. The direction of deletion depends on the configuration: If the function `delete-forward-p' is defined and returns non-nil, it deletes forward using `c-hungry-delete-forward'. Otherwise it deletes diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el index 27b46a45c50..7f2aa0f469f 100644 --- a/lisp/progmodes/flymake-proc.el +++ b/lisp/progmodes/flymake-proc.el @@ -902,7 +902,7 @@ can also be executed interactively independently of temp-dir)))) (defun flymake-proc--delete-temp-directory (dir-name) - "Attempt to delete temp dir created by `flymake-proc-create-temp-with-folder-structure', do not fail on error." + "Attempt to delete temp dir DIR-NAME, do not fail on error." (let* ((temp-dir temporary-file-directory) (suffix (substring dir-name (1+ (length (directory-file-name temp-dir)))))) @@ -919,7 +919,8 @@ can also be executed interactively independently of (defvar-local flymake-proc--base-dir nil) (defun flymake-proc-init-create-temp-buffer-copy (create-temp-f) - "Make a temporary copy of the current buffer, save its name in buffer data and return the name." + "Make a temporary copy of the current buffer, save its name in buffer data. +Return the name." (let* ((source-file-name buffer-file-name) (temp-source-file-name (funcall create-temp-f source-file-name "flymake"))) @@ -1007,7 +1008,7 @@ Return full-name. Names are real, not patched." buildfile-name source-file-name))))) (defun flymake-proc--init-create-temp-source-and-master-buffer-copy (get-incl-dirs-f create-temp-f master-file-masks include-regexp) - "Find master file (or buffer), create its copy along with a copy of the source file." + "Find master file (or buffer), create its copy and a copy of the source file." (let* ((source-file-name buffer-file-name) (temp-source-file-name (flymake-proc-init-create-temp-buffer-copy create-temp-f)) (master-and-temp-master (flymake-proc--create-master-file diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index d6828eeffbb..4224e47d16d 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -1522,7 +1522,8 @@ No spaces before and 1 after a comma A minimum of 1 space before and after `=' (see `idlwave-expand-equal'). (idlwave-action-and-binding \"=\" (lambda (_) (idlwave-expand-equal -1 -1))) Capitalize system variables - action only - (idlwave-action-and-binding idlwave-sysvar (lambda (_) (capitalize-word 1) t))" + (idlwave-action-and-binding idlwave-sysvar + (lambda (_) (capitalize-word 1) t))" (if (not (equal select 'noaction)) ;; Add action (let* ((table (if select 'idlwave-indent-action-table diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 33ca01cc754..74a023775f8 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -2136,7 +2136,8 @@ A return value of N means N more left parentheses than right ones." (line-end-position))))) (defun prolog-electric--if-then-else () - "Insert spaces after the opening parenthesis, \"then\" (->) and \"else\" (;) branches. + "Insert spaces after the opening parenthesis. +\"then\" (->) and \"else\" (;) branches. Spaces are inserted if all preceding objects on the line are whitespace characters, parentheses, or then/else branches." (when prolog-electric-if-then-else-flag diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index ac6a8fbbcb1..d98230d9a0e 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -4038,9 +4038,12 @@ Some other functions are: \\[verilog-sk-repeat] Insert a repeat (..) begin .. end block. \\[verilog-sk-specify] Insert a specify .. endspecify block. \\[verilog-sk-task] Insert a task .. begin .. end endtask block. - \\[verilog-sk-while] Insert a while (...) begin .. end block, prompting for details. - \\[verilog-sk-casex] Insert a casex (...) item: begin.. end endcase block, prompting for details. - \\[verilog-sk-casez] Insert a casez (...) item: begin.. end endcase block, prompting for details. + \\[verilog-sk-while] Insert a while (...) begin .. end block, + prompting for details. + \\[verilog-sk-casex] Insert a casex (...) item: begin.. end endcase block, + prompting for details. + \\[verilog-sk-casez] Insert a casez (...) item: begin.. end endcase block, + prompting for details. \\[verilog-sk-if] Insert an if (..) begin .. end block. \\[verilog-sk-else-if] Insert an else if (..) begin .. end block. \\[verilog-sk-comment] Insert a comment block. @@ -6580,7 +6583,8 @@ Return >0 for nested struct." nil)))) (defun verilog-at-constraint-p () - "If at the { of a constraint or coverpoint definition, return true, moving point to constraint." + "If at the { of a constraint or coverpoint definition, return true. +Also move point to constraint." (if (save-excursion (let ((p (point))) (and @@ -14985,7 +14989,9 @@ but instead, [[Fill in here]] happens!. (provide 'verilog-mode) +;;TODO: Could `byte-compile-docstring-max-column' be decreased? ;; Local Variables: +;; byte-compile-docstring-max-column: 90 ;; checkdoc-permit-comma-termination-flag:t ;; checkdoc-force-docstrings-flag:nil ;; indent-tabs-mode:nil diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index ceacd85971d..abf0e814c41 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1007,7 +1007,8 @@ on the tab bar instead." When this command is bound to a numeric key (with a prefix or modifier key using `tab-bar-select-tab-modifiers'), calling it without an argument will translate its bound numeric key to the numeric argument. -TAB-NUMBER counts from 1. Negative TAB-NUMBER counts tabs from the end of the tab bar." +TAB-NUMBER counts from 1. Negative TAB-NUMBER counts tabs from the end of +the tab bar." (interactive "P") (unless (integerp tab-number) (let ((key (event-basic-type last-command-event))) @@ -1908,7 +1909,7 @@ Letters do not insert themselves; instead, they are commands. (move-to-column tab-switcher-column)) (defun tab-switcher-unmark (&optional backup) - "Cancel all requested operations on window configuration on this line and move down. + "Cancel requested operations on window configuration on this line and move down. Optional prefix arg means move up." (interactive "P") (beginning-of-line) @@ -1920,7 +1921,7 @@ Optional prefix arg means move up." (move-to-column tab-switcher-column)) (defun tab-switcher-backup-unmark () - "Move up and cancel all requested operations on window configuration on line above." + "Move up one line and cancel requested operations on window configuration there." (interactive) (forward-line -1) (tab-switcher-unmark) diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 135a4047318..7876a87a281 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -806,7 +806,8 @@ temporary file before the region itself. The buffer's header is all lines between the strings defined by `tex-start-of-header' and `tex-end-of-header' inclusive. The header must start in the first 100 lines. -The value of `texinfo-tex-trailer' is appended to the temporary file after the region." +The value of `texinfo-tex-trailer' is appended to the temporary +file after the region." (interactive "r") (require 'tex-mode) (let ((tex-command texinfo-tex-command) diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index 2bdce9e33c7..d0ce9d326d8 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el @@ -257,7 +257,8 @@ Buffer B." (defun ediff-re-merge () - "Remerge unmodified diff regions using a new default. Start with the current region." + "Remerge unmodified diff regions using a new default. +Start with the current region." (interactive) (let* ((default-variant-alist (list '("default-A") '("default-B") '("combined"))) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 74ed1bd0ef2..e406275cd1a 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -680,7 +680,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files." (defun ediff-merge-directories-with-ancestor (dir1 dir2 ancestor-dir regexp &optional merge-autostore-dir) - "Merge files in directories DIR1 and DIR2 using files in ANCESTOR-DIR as ancestors. + "Merge files in DIR1 and DIR2 using files in ANCESTOR-DIR as ancestors. Ediff merges files that have identical names in DIR1, DIR2. If a pair of files in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge without ancestor. The fourth argument, REGEXP, is nil or a regular expression; @@ -746,7 +746,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files." (defun ediff-merge-directory-revisions-with-ancestor (dir1 regexp &optional merge-autostore-dir) - "Run Ediff on a directory, DIR1, merging its files with their revisions and ancestors. + "Run Ediff on DIR1 and merge its files with their revisions and ancestors. The second argument, REGEXP, is a regular expression that filters the file names. Only the files that are under revision control are taken into account. MERGE-AUTOSTORE-DIR is the directory in which to store merged files." @@ -1600,7 +1600,8 @@ With optional NODE, goes to that node." ;;;###autoload (defun ediff-merge-with-ancestor-command () - "Call `ediff-merge-files-with-ancestor' with the next three command line arguments." + "Call `ediff-merge-files-with-ancestor' with the next three command line +arguments." (let ((file-a (nth 0 command-line-args-left)) (file-b (nth 1 command-line-args-left)) (ancestor (nth 2 command-line-args-left))) @@ -1637,7 +1638,8 @@ With optional NODE, goes to that node." ;;;###autoload (defun ediff-merge-directories-with-ancestor-command () - "Call `ediff-merge-directories-with-ancestor' with the next four command line arguments." + "Call `ediff-merge-directories-with-ancestor' with the next four command line +arguments." (let ((file-a (nth 0 command-line-args-left)) (file-b (nth 1 command-line-args-left)) (ancestor (nth 2 command-line-args-left)) diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 45bb17749bc..5a4ac1aca84 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -610,7 +610,8 @@ the file in question, search for the log entry required and move point." (vc-annotate-show-diff-revision-at-line-internal t)) (defun vc-annotate-show-changeset-diff-revision-at-line () - "Visit the diff of the revision at line from its previous revision for all files in the changeset." + "Visit diff of revision at line from previous revision. +This is done for all files in changeset." (interactive) (when (eq 'file (vc-call-backend vc-annotate-backend 'revision-granularity)) (error "The %s backend does not support changeset diffs" vc-annotate-backend)) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index f8b87170af5..d079b891e4d 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1015,7 +1015,8 @@ child files." (nreverse result))) (defun vc-dir-child-files-and-states () - "Return the list of conses (FILE . STATE) for child files of the current entry if it's a directory. + "Return list of conses for child files of the current entry if it's a directory. +The conses have the format (FILE . STATE). If it is a file, return the corresponding cons for the file itself." (let* ((crt (ewoc-locate vc-ewoc)) (crt-data (ewoc-data crt)) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index cd23bcce941..346974bdba8 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -404,7 +404,7 @@ Display the buffer in some window, but don't select it." (defvar compilation-error-regexp-alist) (defun vc-compilation-mode (backend) - "Setup `compilation-mode' after with the appropriate `compilation-error-regexp-alist'." + "Setup `compilation-mode' with the appropriate `compilation-error-regexp-alist'." (require 'compile) (let* ((error-regexp-alist (vc-make-backend-sym backend 'error-regexp-alist)) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 7d3b0f56f60..5b259fcdb33 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2624,7 +2624,7 @@ with its diffs (if the underlying VCS supports that)." ;;;###autoload (defun vc-log-incoming (&optional remote-location) - "Show a log of changes that will be received with a pull operation from REMOTE-LOCATION. + "Show log of changes that will be received with pull from REMOTE-LOCATION. When called interactively with a prefix argument, prompt for REMOTE-LOCATION." (interactive (when current-prefix-arg @@ -2637,7 +2637,7 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION." ;;;###autoload (defun vc-log-outgoing (&optional remote-location) - "Show a log of changes that will be sent with a push operation to REMOTE-LOCATION. + "Show log of changes that will be sent with a push operation to REMOTE-LOCATION. When called interactively with a prefix argument, prompt for REMOTE-LOCATION." (interactive (when current-prefix-arg diff --git a/lisp/whitespace.el b/lisp/whitespace.el index d4f2b2890a8..6e132de536d 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -2193,8 +2193,8 @@ resultant list will be returned." limit t)) (defun whitespace-empty-at-bob-regexp (limit) - "Match spaces at beginning of buffer which do not contain the point at \ -beginning of buffer." + "Match spaces at beginning of buffer which do not contain +the point at beginning of buffer." (let ((b (point)) r) (cond diff --git a/test/lisp/auth-source-pass-tests.el b/test/lisp/auth-source-pass-tests.el index a0a97eca5eb..3da6f3e9b7b 100644 --- a/test/lisp/auth-source-pass-tests.el +++ b/test/lisp/auth-source-pass-tests.el @@ -97,7 +97,8 @@ This function is intended to be set to `auth-source-debug'." (defun auth-source-pass--explain-match-entry-p (entry hostname &optional user port) "Explainer function for `auth-source-pass-match-entry-p'. -ENTRY, HOSTNAME, USER and PORT are the same as in `auth-source-pass-match-entry-p'." +ENTRY, HOSTNAME, USER and PORT are the same as in +`auth-source-pass-match-entry-p'." `(entry ,entry store @@ -122,7 +123,8 @@ HOSTNAME, USER and PORT are passed unchanged to (defun auth-source-pass--explain-includes-sorted-entries (entries hostname &optional user port) "Explainer function for `auth-source-pass--includes-sorted-entries'. -ENTRIES, HOSTNAME, USER and PORT are the same as in `auth-source-pass--includes-sorted-entries'." +ENTRIES, HOSTNAME, USER and PORT are the same as in +`auth-source-pass--includes-sorted-entries'." `(store ,(auth-source-pass-entries) matching-entries diff --git a/test/lisp/international/ucs-normalize-tests.el b/test/lisp/international/ucs-normalize-tests.el index 52c3d3704eb..eb577b97dc4 100644 --- a/test/lisp/international/ucs-normalize-tests.el +++ b/test/lisp/international/ucs-normalize-tests.el @@ -123,9 +123,9 @@ The following invariants must be true for all conformant implementations..." (defsubst ucs-normalize-tests--rule2-holds-p (X) "Check 2nd conformance rule. -For every code point X assigned in this version of Unicode that is not specifically -listed in Part 1, the following invariants must be true for all conformant -implementations: +For every code point X assigned in this version of Unicode that +is not specifically listed in Part 1, the following invariants +must be true for all conformant implementations: X == toNFC(X) == toNFD(X) == toNFKC(X) == toNFKD(X)" (and (ucs-normalize-tests--normalization-chareq-p NFC X X) -- cgit v1.2.3 From 5b44e0511a881593eb62ff1648be37ac1c728ecc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 26 Sep 2021 16:50:11 +0300 Subject: ; Fix some recent fixes to doc strings * lisp/whitespace.el (whitespace-empty-at-bob-regexp): * lisp/vc/vc-dir.el (vc-dir-child-files-and-states): * lisp/vc/vc-annotate.el (vc-annotate-show-changeset-diff-revision-at-line): * lisp/vc/ediff.el (ediff-merge-with-ancestor-command): * lisp/gnus/nnvirtual.el (nnvirtual-update-xref-header) (nnvirtual-map-article): * lisp/emulation/viper-init.el (viper-ESC-keyseq-timeout): * lisp/emulation/viper-cmd.el (viper-set-parsing-style-toggling-macro): * lisp/cedet/data-debug.el (data-debug-insert-hash-table-button): "The first line of a doc string must be a complete sentence." Also, fix some awkward wording in doc strings while at that. --- lisp/cedet/data-debug.el | 5 +++-- lisp/emulation/viper-cmd.el | 8 ++++---- lisp/emulation/viper-init.el | 5 +++-- lisp/gnus/nnvirtual.el | 9 ++++++--- lisp/vc/ediff.el | 3 +-- lisp/vc/vc-annotate.el | 2 +- lisp/vc/vc-dir.el | 8 +++++--- lisp/whitespace.el | 3 +-- 8 files changed, 24 insertions(+), 19 deletions(-) (limited to 'lisp/emulation/viper-init.el') diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index 8f40a4db79d..d8d1364491f 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el @@ -413,8 +413,9 @@ PREBUTTONTEXT is some text between prefix and the stuff list button." ) (defun data-debug-insert-hash-table-button (hash-table prefix prebuttontext) - "Insert HASH-TABLE as expandable button with recursive prefix PREFIX and -PREBUTTONTEXT in front of the button text." + "Insert HASH-TABLE as expandable button, using PREFIX and PREBUTTONTEXT. +PREFIX is a recursive prefix and PREBUTTONTEXT is text to be inserted +in front of the button text." (let ((string (propertize (format "%s" hash-table) 'face 'font-lock-keyword-face))) (insert (propertize diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index b132d786eb1..3fcc14c99d7 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -3546,11 +3546,11 @@ If MODE is set, set the macros only in that major mode." (defun viper-set-parsing-style-toggling-macro (unset) - "Set `%%%' to be a macro that toggles whether comment fields should be parsed -for matching parentheses. + "Set or unset `%%%' as a macro that toggles comment parsing for parentheses. This is used in conjunction with the `%' command. - -With a prefix argument, unsets the macro." +By default, sets the macro which will toggle whether comment fields should +be parsed for matching parentheses. With a prefix argument, unsets the +macro instead." (interactive "P") (or noninteractive (if (not unset) diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index ffcb4602e73..fe3704841ac 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -932,8 +932,9 @@ Should be set in `viper-custom-file-name'." (setq cursor-type '(bar . 2))) (defun viper-ESC-keyseq-timeout () - "Key sequence beginning with ESC and separated by no more than this many -milliseconds is considered to be generated by a keyboard function key. + "Return the timeout for considering an ESC sequence to be a function key. +Sequences of keys beginning with ESC and separated by no more than this many +milliseconds are considered to be generated by a keyboard function key. Setting this too high may slow down switching from insert to vi state. Setting this value too low will make it impossible to use function keys in insert mode on a dumb terminal." diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index 4136392c825..41a2da958a0 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el @@ -382,8 +382,10 @@ It is computed from the marks of individual component groups.") (defun nnvirtual-update-xref-header (group article prefix sysname) - "Edit current NOV header in current buffer to have an xref to the component -group, and also server prefix any existing xref lines." + "Edit current NOV header to have xref to component group and correct prefix. +This function edits the current NOV header in current buffer so that it +has an xref to the component group, and also ensures any existing xref +lines have the correct component server prefix." ;; Move to beginning of Xref field, creating a slot if needed. (beginning-of-line) (looking-at @@ -570,7 +572,8 @@ If UPDATE-P is not nil, call gnus-group-update-group on the components." ;; unique reverse mapping. (defun nnvirtual-map-article (article) - "Return a cons of the component group and article corresponding to the given + "Return the component group and article corresponding to virtual ARTICLE. +Value is a cons of the component group and article corresponding to the given virtual ARTICLE." (let ((table nnvirtual-mapping-table) entry group-pos) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index e406275cd1a..49fc60431f6 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -1600,8 +1600,7 @@ With optional NODE, goes to that node." ;;;###autoload (defun ediff-merge-with-ancestor-command () - "Call `ediff-merge-files-with-ancestor' with the next three command line -arguments." + "Call `ediff-merge-files-with-ancestor' with next three command line arguments." (let ((file-a (nth 0 command-line-args-left)) (file-b (nth 1 command-line-args-left)) (ancestor (nth 2 command-line-args-left))) diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 5a4ac1aca84..def87db8712 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -610,7 +610,7 @@ the file in question, search for the log entry required and move point." (vc-annotate-show-diff-revision-at-line-internal t)) (defun vc-annotate-show-changeset-diff-revision-at-line () - "Visit diff of revision at line from previous revision. + "Show the diffs of revision at current line relative to previous revision. This is done for all files in changeset." (interactive) (when (eq 'file (vc-call-backend vc-annotate-backend 'revision-granularity)) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index d079b891e4d..8165d5e09f1 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1015,9 +1015,11 @@ child files." (nreverse result))) (defun vc-dir-child-files-and-states () - "Return list of conses for child files of the current entry if it's a directory. -The conses have the format (FILE . STATE). -If it is a file, return the corresponding cons for the file itself." + "Return the state of one or more files for the current entry. +If the entry is a directory, return the list of states of its child +files, where each file is described by a cons of the form (FILE . STATE). +If the entry is a file, return a single cons cell (FILE . STATE) for +that file." (let* ((crt (ewoc-locate vc-ewoc)) (crt-data (ewoc-data crt)) result) diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 6e132de536d..017409d6a42 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -2193,8 +2193,7 @@ resultant list will be returned." limit t)) (defun whitespace-empty-at-bob-regexp (limit) - "Match spaces at beginning of buffer which do not contain -the point at beginning of buffer." + "Match spaces at beginning of buffer (BOB) which do not contain point at BOB." (let ((b (point)) r) (cond -- cgit v1.2.3 From 519f9e144f1c1719156d98b67d5e5d78eb932f72 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 8 Oct 2021 20:41:50 +0200 Subject: Remove some additional XEmacs compat code from viper * lisp/emulation/viper-util.el (viper-memq-char): Make into obsolete function alias for 'memq'. Update callers. (viper-char-equal): Make into obsolete function alias for 'eq'. Update callers. (viper-color-display-p): Make into obsolete function alias for 'x-display-color-p'. Update callers. --- lisp/emulation/viper-cmd.el | 47 +++++++++++++++++++++----------------------- lisp/emulation/viper-ex.el | 1 - lisp/emulation/viper-init.el | 8 ++------ lisp/emulation/viper-mous.el | 5 ++--- lisp/emulation/viper-util.el | 47 ++++++++++++-------------------------------- lisp/emulation/viper.el | 1 - 6 files changed, 39 insertions(+), 70 deletions(-) (limited to 'lisp/emulation/viper-init.el') diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 9f3d515bc6d..59be3f48462 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -35,9 +35,7 @@ (defvar viper--key-maps) (defvar viper--intercept-key-maps) (defvar iso-accents-mode) -(defvar quail-mode) (defvar quail-current-str) -(defvar mark-even-if-inactive) (defvar viper--init-message) (defvar viper-initial) (defvar undo-beg-posn) @@ -69,8 +67,7 @@ (nm-p (intern (concat snm "-p"))) (nms (intern (concat snm "s")))) `(defun ,nm-p (com) - (consp (viper-memq-char com ,nms) - )))) + (consp (memq com ,nms))))) ;; Variables for defining VI commands @@ -1035,23 +1032,23 @@ as a Meta key and any number of multiple escapes are allowed." cmd-info cmd-to-exec-at-end) (while (and cont - (viper-memq-char char - (list ?c ?d ?y ?! ?< ?> ?= ?# ?r ?R ?\" - viper-buffer-search-char))) + (memq char + (list ?c ?d ?y ?! ?< ?> ?= ?# ?r ?R ?\" + viper-buffer-search-char))) (if com ;; this means that we already have a command character, so we ;; construct a com list and exit while. however, if char is " ;; it is an error. (progn ;; new com is (CHAR . OLDCOM) - (if (viper-memq-char char '(?# ?\")) (user-error viper-ViperBell)) + (if (memq char '(?# ?\")) (user-error viper-ViperBell)) (setq com (cons char com)) (setq cont nil)) ;; If com is nil we set com as char, and read more. Again, if char is ;; ", we read the name of register and store it in viper-use-register. ;; if char is !, =, or #, a complete com is formed so we exit the while ;; loop. - (cond ((viper-memq-char char '(?! ?=)) + (cond ((memq char '(?! ?=)) (setq com char) (setq char (read-char)) (setq cont nil)) @@ -1091,7 +1088,7 @@ as a Meta key and any number of multiple escapes are allowed." `(key-binding (char-to-string ,char))))) ;; as com is non-nil, this means that we have a command to execute - (if (viper-memq-char (car com) '(?r ?R)) + (if (memq (car com) '(?r ?R)) ;; execute appropriate region command. (let ((char (car com)) (com (cdr com))) (setq prefix-arg (cons value com)) @@ -2603,12 +2600,12 @@ On reaching beginning of line, stop and signal error." (let ((prev-char (viper-char-at-pos 'backward)) (saved-point (point))) ;; skip non-newline separators backward - (while (and (not (viper-memq-char prev-char '(nil \n))) + (while (and (not (memq prev-char '(nil \n))) (< lim (point)) ;; must be non-newline separator (if (eq viper-syntax-preference 'strict-vi) - (viper-memq-char prev-char '(?\ ?\t)) - (viper-memq-char (char-syntax prev-char) '(?\ ?-)))) + (memq prev-char '(?\ ?\t)) + (memq (char-syntax prev-char) '(?\ ?-)))) (viper-backward-char-carefully) (setq prev-char (viper-char-at-pos 'backward))) @@ -2622,12 +2619,12 @@ On reaching beginning of line, stop and signal error." ;; skip again, but make sure we don't overshoot the limit (if twice - (while (and (not (viper-memq-char prev-char '(nil \n))) + (while (and (not (memq prev-char '(nil \n))) (< lim (point)) ;; must be non-newline separator (if (eq viper-syntax-preference 'strict-vi) - (viper-memq-char prev-char '(?\ ?\t)) - (viper-memq-char (char-syntax prev-char) '(?\ ?-)))) + (memq prev-char '(?\ ?\t)) + (memq (char-syntax prev-char) '(?\ ?-)))) (viper-backward-char-carefully) (setq prev-char (viper-char-at-pos 'backward)))) @@ -2645,10 +2642,10 @@ On reaching beginning of line, stop and signal error." (viper-forward-word-kernel val) (if com (progn - (cond ((viper-char-equal com ?c) + (cond ((eq com ?c) (viper-separator-skipback-special 'twice viper-com-point)) ;; Yank words including the whitespace, but not newline - ((viper-char-equal com ?y) + ((eq com ?y) (viper-separator-skipback-special nil viper-com-point)) ((viper-dotable-command-p com) (viper-separator-skipback-special nil viper-com-point))) @@ -2666,10 +2663,10 @@ On reaching beginning of line, stop and signal error." (viper-skip-nonseparators 'forward) (viper-skip-separators t)) (if com (progn - (cond ((viper-char-equal com ?c) + (cond ((eq com ?c) (viper-separator-skipback-special 'twice viper-com-point)) ;; Yank words including the whitespace, but not newline - ((viper-char-equal com ?y) + ((eq com ?y) (viper-separator-skipback-special nil viper-com-point)) ((viper-dotable-command-p com) (viper-separator-skipback-special nil viper-com-point))) @@ -4714,15 +4711,15 @@ Please, specify your level now: ")) (defun viper-submit-report () "Submit bug report on Viper." (interactive) - (defvar viper-color-display-p) + (defvar x-display-color-p) (defvar viper-frame-parameters) (defvar viper-minibuffer-emacs-face) (defvar viper-minibuffer-vi-face) (defvar viper-minibuffer-insert-face) (let ((reporter-prompt-for-summary-p t) - (viper-color-display-p (if (viper-window-display-p) - (viper-color-display-p) - 'non-x)) + (x-display-color-p (if (viper-window-display-p) + (x-display-color-p) + 'non-x)) (viper-frame-parameters (frame-parameters (selected-frame))) (viper-minibuffer-emacs-face (if (viper-has-face-support-p) (facep @@ -4780,7 +4777,7 @@ Please, specify your level now: ")) 'viper-expert-level 'major-mode 'window-system - 'viper-color-display-p + 'x-display-color-p 'viper-frame-parameters 'viper-minibuffer-vi-face 'viper-minibuffer-insert-face diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index ef15779e1bf..85c8b87b9a1 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -25,7 +25,6 @@ ;;; Code: ;; Compiler pacifier -(defvar read-file-name-map) (defvar viper-use-register) (defvar viper-s-string) (defvar viper-shift-width) diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index fe3704841ac..a170d677d2c 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -25,16 +25,12 @@ ;;; Code: ;; compiler pacifier -(defvar mark-even-if-inactive) -(defvar quail-mode) (defvar iso-accents-mode) (defvar viper-current-state) (defvar viper-version) (defvar viper-expert-level) (defvar current-input-method) (defvar default-input-method) -(defvar describe-current-input-method-function) -(defvar bar-cursor) (defvar cursor-type) ;; end pacifier @@ -48,7 +44,7 @@ (define-obsolete-function-alias 'viper-device-type #'window-system "27.1") -(defun viper-color-display-p () +(defun x-display-color-p () (condition-case nil (display-color-p) (error nil))) @@ -81,7 +77,7 @@ In all likelihood, you don't need to bother with this setting." (defun viper-has-face-support-p () (cond ((viper-window-display-p)) (viper-force-faces) - ((viper-color-display-p)) + ((x-display-color-p)) (t (memq window-system '(pc))))) diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el index 02db39f1cb0..3d55690bd6f 100644 --- a/lisp/emulation/viper-mous.el +++ b/lisp/emulation/viper-mous.el @@ -26,7 +26,6 @@ ;; compiler pacifier (defvar double-click-time) -(defvar mouse-track-multi-click-time) (defvar viper-search-start-marker) (defvar viper-local-search-start-marker) (defvar viper-search-history) @@ -76,8 +75,8 @@ or a triple-click." ;; remembers prefix argument to pass along to commands invoked by second ;; click. -;; This is needed because in Emacs (not XEmacs), assigning to prefix-arg -;; causes Emacs to count the second click as if it was a single click +;; This is needed because assigning to prefix-arg causes Emacs to +;; count the second click as if it was a single click (defvar viper-global-prefix-argument nil) diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index 0f6dceb13cf..71043b189db 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el @@ -29,9 +29,6 @@ ;; Compiler pacifier (defvar viper-minibuffer-current-face) -(defvar viper-minibuffer-insert-face) -(defvar viper-minibuffer-vi-face) -(defvar viper-minibuffer-emacs-face) (defvar viper-replace-overlay-face) (defvar viper-fast-keyseq-timeout) (defvar ex-unix-type-shell) @@ -64,22 +61,8 @@ (define-obsolete-function-alias 'viper-iconify #'iconify-or-deiconify-frame "27.1") - -;; CHAR is supposed to be a char or an integer (positive or negative) -;; LIST is a list of chars, nil, and negative numbers -;; Check if CHAR is a member by trying to convert in characters, if necessary. -;; Introduced for compatibility with XEmacs, where integers are not the same as -;; chars. -(defun viper-memq-char (char list) - (cond ((and (integerp char) (>= char 0)) - (memq char list)) - ((memq char list)))) - -;; Check if char-or-int and char are the same as characters -(defun viper-char-equal (char-or-int char) - (cond ((and (integerp char-or-int) (>= char-or-int 0)) - (= char-or-int char)) - ((eq char-or-int char)))) +(define-obsolete-function-alias 'viper-memq-char #'memq "29.1") +(define-obsolete-function-alias 'viper-char-equal #'eq "29.1") ;; Like =, but accommodates null and also is t for eq-objects (defun viper= (char char1) @@ -88,8 +71,7 @@ (= char char1)) (t nil))) -(defsubst viper-color-display-p () - (x-display-color-p)) +(define-obsolete-function-alias 'viper-color-display-p #'x-display-color-p "29.1") (defun viper-get-cursor-color (&optional _frame) (cdr (assoc 'cursor-color (frame-parameters)))) @@ -110,7 +92,7 @@ Otherwise return the normal value." ;; cursor colors (defun viper-change-cursor-color (new-color &optional frame) - (if (and (viper-window-display-p) (viper-color-display-p) + (if (and (viper-window-display-p) (x-display-color-p) (stringp new-color) (x-color-defined-p new-color) (not (string= new-color (viper-get-cursor-color)))) (modify-frame-parameters @@ -142,7 +124,7 @@ Otherwise return the normal value." ;; By default, saves current frame cursor color before changing viper state (defun viper-save-cursor-color (before-which-mode) - (if (and (viper-window-display-p) (viper-color-display-p)) + (if (and (viper-window-display-p) (x-display-color-p)) (let ((color (viper-get-cursor-color))) (if (and (stringp color) (x-color-defined-p color) ;; there is something fishy in that the color is not saved if @@ -1183,25 +1165,23 @@ This option is appropriate if you like Emacs-style words." (looking-at (concat "[" viper-strict-ALPHA-chars addl-chars "]")) (or ;; or one of the additional chars being asked to include - (viper-memq-char char (viper-string-to-list addl-chars)) + (memq char (viper-string-to-list addl-chars)) (and ;; not one of the excluded word chars (note: ;; viper-non-word-characters is a list) - (not (viper-memq-char char viper-non-word-characters)) + (not (memq char viper-non-word-characters)) ;; char of the Viper-word syntax class - (viper-memq-char (char-syntax char) - (viper-string-to-list viper-ALPHA-char-class)))))) - )) + (memq (char-syntax char) + (viper-string-to-list viper-ALPHA-char-class)))))))) (defun viper-looking-at-separator () (let ((char (char-after (point)))) (if char (if (eq viper-syntax-preference 'strict-vi) - (viper-memq-char char (viper-string-to-list viper-strict-SEP-chars)) + (memq char (viper-string-to-list viper-strict-SEP-chars)) (or (eq char ?\n) ; RET is always a separator in Vi - (viper-memq-char (char-syntax char) - (viper-string-to-list viper-SEP-char-class))))) - )) + (memq (char-syntax char) + (viper-string-to-list viper-SEP-char-class))))))) (defsubst viper-looking-at-alphasep (&optional addl-chars) (or (viper-looking-at-separator) (viper-looking-at-alpha addl-chars))) @@ -1327,8 +1307,7 @@ This option is appropriate if you like Emacs-style words." ;; of the excluded characters (if (and (eq syntax-of-char-looked-at ?w) (not negated-syntax)) - (not (viper-memq-char - char-looked-at viper-non-word-characters)) + (not (memq char-looked-at viper-non-word-characters)) t)) (funcall skip-syntax-func 1) 0) diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index e9c0fb5e24b..1ee53651264 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -304,7 +304,6 @@ ;; compiler pacifier (defvar mark-even-if-inactive) -(defvar quail-mode) (defvar viper-expert-level) (defvar viper-mode-string) (defvar viper-major-mode-modifier-list) -- cgit v1.2.3 From f35246db1934fa06c96ed8533641a55c899b7a01 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 9 Oct 2021 08:48:34 +0200 Subject: Remove duplicate definition of x-display-color-p * lisp/emulation/viper-init.el (x-display-color-p): Remove duplicate definition. This would just overwrite the alias defined in faces.el. --- lisp/emulation/viper-init.el | 5 ----- 1 file changed, 5 deletions(-) (limited to 'lisp/emulation/viper-init.el') diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index a170d677d2c..e3790b74534 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -44,11 +44,6 @@ (define-obsolete-function-alias 'viper-device-type #'window-system "27.1") -(defun x-display-color-p () - (condition-case nil - (display-color-p) - (error nil))) - ;; in XEmacs: device-type is tty on tty and stream in batch. (defun viper-window-display-p () (and window-system (not (memq window-system '(tty stream pc))))) -- cgit v1.2.3