* msdos/sed1v2.inp: Adapt to Emacs 25.
* src/process.c (remove_slash_colon): Move out of "#ifdef
- subprocesses" block, as it its called unconditionally. Move
+ subprocesses" block, as it is called unconditionally. Move
ADD_SUBFEATURE calls into "#ifdef subprocesses" block, as they
reference variables only defined in that block.
* src/msdos.h: Provide prototypes for IT_set_frame_parameters,
2015-11-08 Dmitry Gutov <dgutov@yandex.ru>
- Remove dirs in vc project roots from the the vc project library roots
+ Remove dirs in vc project roots from the vc project library roots
* lisp/progmodes/project.el (project-library-roots):
Remove directories inside the project roots from the result.
If there are directory entries in the list then they are sorted in
order of name length. The list of modes for that dir is then
recursively sorted with the same mechanism. That way variables tied
- to a particular subdirectory override those in in a parent directory.
+ to a particular subdirectory override those in a parent directory.
Previously the behaviour didn’t seem to be well defined anyway and was
dependent on the order they appeared in the file. However this order
If grow_specpdl fails due to outgrowing max_specpdl_size, it will
signal an error *before* growing the specpdl array. Therefore, when
handling the signal, specpdl_ptr points past the end of the specpdl
- array and any further use of of specpdl before unwinding (e.g., if
+ array and any further use of specpdl before unwinding (e.g., if
edebug binds signal-hook-function) will cause memory corruption.
* src/eval.c (signal_or_quit): Don't call `signal-hook-function' if
the specpdl_ptr is already past the end of the specpdl array.
Improve edit-kbd-macro prompting in case of remapped keys (Bug#29399)
* lisp/edmacro.el (edit-kbd-macro): Use substitute-command-keys to
- present the current bindings in the prompt. Check the the
+ present the current bindings in the prompt. Check the
non-remapped binding of the entered key sequence as well.
2017-12-02 Lele Gaifax <lele@metapensiero.it>
Optimize UCS normalization tests
- Brings the the time for `ucs-normalize-part1' from 200s down to 130s.
+ Brings the time for `ucs-normalize-part1' from 200s down to 130s.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--parse-column): Use character instead of string
of length 1 for terminator. Convert return value into string since
2016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
- Compilation for for systems with getaddrinfo_a
+ Compilation for systems with getaddrinfo_a
* src/process.c (Fmake_network_process): Make stuff work again on
systems with getaddrinfo_a.
2016-01-29 Lars Ingebrigtsen <larsi@gnus.org>
- Compilation for for non-GNU systems
+ Compilation for non-GNU systems
* src/process.c (Fmake_network_process): Make compilation work
again on hosts that don't have getaddrinfo_a.
The decoding functions ignore newline characters in the encoded text.
-If optional argument @var{base64url} is is non-@code{nil}, then padding
+If optional argument @var{base64url} is non-@code{nil}, then padding
is optional, and the URL variant of base 64 encoding is used.
@end defun
**** org-ctags.el (Paul Sexton)
Targets like =<<my target>>= can now be found by Emacs' etag
- functionality, and Org-mode links can be used to to link to
+ functionality, and Org-mode links can be used to link to
etags, also in non-Org-mode files. For details, see the file
/org-ctags.el/.
* vc.el: All backends: API simplification: Remove 4th
'default-state' argument from vc-dir-status files and its backend
methods - no backend method ever set it. It was used only in the
- fallback method to to set a default of 'up-to-date, though a
+ fallback method to set a default of 'up-to-date, though a
convoluted call chain obscured this.
* vc-hooks.el: Bind vc-delete-file to Ctrl-x v delete.
(add-hook 'auth-source-backend-parser-functions #'auth-source-backends-parser-secrets)
(defun auth-source-backend-parse-parameters (entry backend)
- "Fills in the extra auth-source-backend parameters of ENTRY.
+ "Fill in the extra auth-source-backend parameters of ENTRY.
Using the plist ENTRY, get the :host, :port, and :user search
parameters."
(let ((entry (if (stringp entry)
(apply #'auth-source-search (plist-put spec :delete t)))
(defun auth-source-search-collection (collection value)
- "Returns t is VALUE is t or COLLECTION is t or COLLECTION contains VALUE."
+ "Return t if VALUE is t or COLLECTION is t or COLLECTION contains VALUE."
(when (and (atom collection) (not (eq t collection)))
(setq collection (list collection)))
;;; Backend specific parsing: Secrets API backend
(defun auth-source-secrets-listify-pattern (pattern)
- "Convert a pattern with lists to a list of string patterns.
+ "Convert a PATTERN with lists to a list of string patterns.
auth-source patterns can have values of the form :foo (\"bar\"
\"qux\"), which means to match any secret with :foo equal to
\"bar\" or :foo equal to \"qux\". The secrets backend supports
only string values for patterns, so this routine returns a list
-of patterns that is equivalent to the single original pattern
+of patterns that is equivalent to the single original PATTERN
when interpreted such that if a secret matches any pattern in the
-list, it matches the original pattern."
+list, it matches the original PATTERN."
(if (null pattern)
'(nil)
(let* ((key (pop pattern))
(defun auth-source--decode-octal-string (string)
- "Convert octal string to utf-8 string. E.g: 'a\134b' to 'a\b'"
+ "Convert octal string to utf-8 string. E.g: 'a\134b' to 'a\b'"
(let ((list (string-to-list string))
(size (length string)))
(decode-coding-string
(cl-defun auth-source-plstore-search (&rest spec
&key backend create delete max
&allow-other-keys)
- "Search the PLSTORE; spec is like `auth-source'."
+ "Search the PLSTORE; SPEC is like `auth-source'."
(let* ((store (oref backend data))
(max (or max 5000)) ; sanity check: default to stop at 5K
(ignored-keys '(:create :delete :max :backend :label :require :type))
(semantic-analyze-tag-references-default): When doing a lookup,
specify noerror.
(semantic--analyze-refs-full-lookup): Add optional noerror input
- argument. Pass to to full-lookup-simple.
+ argument. Pass to full-lookup-simple.
(semantic-analyze-refs-impl, semantic-analyze-refs-proto):
Ignore :typemodifiers during compare.
(defun ede-linux--get-archs (dir)
- "Returns a list of architecture names found in DIR."
+ "Return a list of architecture names found in DIR."
(let ((archs-dir (expand-file-name "arch" dir))
archs)
(when (file-directory-p archs-dir)
(defun ede-linux--include-path (dir bdir arch)
- "Returns a list with include directories.
+ "Return a list with include directories.
Returned directories might not exist, since they are not created
until Linux is built for the first time."
(cl-map 'list
;;;###autoload
(defun ede-linux-load (dir &optional _rootproj)
- "Return an Linux Project object if there is a match.
+ "Return a Linux Project object if there is a match.
Return nil if there isn't one.
Argument DIR is the directory it is created for.
ROOTPROJ is nil, since there is only one project."
;; -> (any "@" "%" digit "A-Z" space word)
;; -> "[A-Z@%[:digit:][:space:][:word:]]"
;;
- ;; Problem: If a subpattern is carefully written to to be
+ ;; Problem: If a subpattern is carefully written to be
;; optimisable by regexp-opt, how do we prevent the transforms
;; above from destroying that property?
;; Example: (or "a" (or "abc" "abd" "abe"))
(declare-function viper-forward-char-carefully "viper-cmd" (&optional arg))
(defun viper-surrounding-word (count click-count)
- "Returns word surrounding point according to a heuristic.
+ "Return word surrounding point according to a heuristic.
COUNT indicates how many regions to return.
If CLICK-COUNT is 1, `word' is a word in Vi sense.
If CLICK-COUNT is 2,then `word' is a Word in Vi sense.
(defun viper-mouse-click-get-word (click count click-count)
- "Returns word surrounding the position of a mouse click.
+ "Return word surrounding the position of a mouse click.
Click may be in another window. Current window and buffer isn't changed.
On single or double click, returns the word as determined by
`viper-surrounding-word-function'."
(declare-function viper-adjust-window "viper-cmd" ())
(defun viper-mouse-click-search-word (click arg)
- "Find the word clicked or double-clicked on. Word may be in another window.
+ "Find the word clicked or double-clicked on. Word may be in another window.
With prefix argument, N, search for N-th occurrence.
This command must be bound to a mouse click. The double-click action of the
same button must not be bound \(or it must be bound to the same function).
See `viper-surrounding-word' for the details on what constitutes a word for
-this command."
+this command.
+\n(fn CLICK N)"
(interactive "e\nP")
(if viper-frame-of-focus ;; to handle clicks in another frame
(select-frame viper-frame-of-focus))
(split-string (buffer-string) "\n"))))
(defun erc-forward-word ()
- "Moves forward one word, ignoring any subword settings. If no
-subword-mode is active, then this is (forward-word)."
+ "Move forward one word, ignoring any subword settings.
+If no subword-mode is active, then this is (forward-word)."
(skip-syntax-forward "^w")
(> (skip-syntax-forward "w") 0))
(defun erc-word-at-arg-p (pos)
- "Reports whether the char after a given POS has word syntax.
+ "Report whether the char after a given POS has word syntax.
If POS is out of range, the value is nil."
(let ((c (char-after pos)))
(if c
nil)))
(defun erc-bounds-of-word-at-point ()
- "Returns the bounds of a word at point, or nil if we're not at
-a word. If no subword-mode is active, then this
-is (bounds-of-thing-at-point 'word)."
+ "Return the bounds of word at point, or nil if we're not at a word.
+If no subword-mode is active, then this is
+\(bounds-of-thing-at-point 'word)."
(if (or (erc-word-at-arg-p (point))
(erc-word-at-arg-p (1- (point))))
(save-excursion
(erc-login)) ))
(defun erc-server-reconnect ()
-"Reestablish the current IRC connection.
+ "Reestablish the current IRC connection.
Make sure you are in an ERC buffer when running this."
(let ((buffer (erc-server-buffer)))
(unless (buffer-live-p buffer)
(defun erc-decode-string-from-target (str target)
"Decode STR as appropriate for TARGET.
-This is indicated by `erc-encoding-coding-alist', defaulting to the value of
-`erc-server-coding-system'."
+This is indicated by `erc-encoding-coding-alist', defaulting to the
+value of `erc-server-coding-system'."
(unless (stringp str)
(setq str ""))
(let ((coding (erc-coding-system-for-target target)))
meanings).
This creates:
- - a hook variable `erc-server-NAME-functions' initialized to `erc-server-NAME'.
+ - a hook variable `erc-server-NAME-functions' initialized to
+ `erc-server-NAME'.
- a function `erc-server-NAME' with body FN-BODY.
If ALIASES is non-nil, each alias in ALIASES is `defalias'ed to
:type '(choice (const ask) (const auto) (const ignore)))
(defun erc-dcc-get-host (proc)
- "Returns the local IP address used for an open PROCess."
+ "Return the local IP address used for an open process PROC."
(format-network-address (process-contact proc :local) t))
(defun erc-dcc-host ()
;;;###autoload
(defun pcomplete/erc-mode/DCC ()
- "Provides completion for the /DCC command."
+ "Provide completion for the /DCC command."
(pcomplete-here (append '("chat" "close" "get" "list")
(when (fboundp 'make-network-process) '("send"))))
(pcomplete-here
?n nick ?u login ?h host ?q query)))))
(defun erc-dcc-auto-mask-p (spec)
- "Takes a full SPEC of a user in the form \"nick!login@host\" and
-matches against all the regexp's in `erc-dcc-auto-masks'. If any
-match, returns that regexp and nil otherwise."
+ "Match SPEC against `erc-dcc-auto-masks'.
+SPEC is a full spec of a user in the form \"nick!login@host\", which
+is matched against all the regexps in `erc-dcc-auto-masks'. Return
+the matching regexp, or nil if none found."
(let ((lst erc-dcc-auto-masks))
(while (and lst
(not (string-match (car lst) spec)))
(make-variable-buffer-local 'erc-dcc-file-name)
(defun erc-dcc-get-file (entry file parent-proc)
- "This function does the work of setting up a transfer from the remote client
-to the local one over a tcp connection. This involves setting up a process
-filter and a process sentinel, and making the connection."
+ "Set up a transfer from the remote client to the local over a TCP connection.
+This involves setting up a process filter and a process sentinel,
+and making the connection."
(let* ((buffer (generate-new-buffer (file-name-nondirectory file)))
proc)
(with-current-buffer buffer
erc-enable-logging nil))))
(defun erc-log-all-but-server-buffers (buffer)
- "Returns t if logging should be enabled in BUFFER.
+ "Return t if logging should be enabled in BUFFER.
Returns nil if `erc-server-buffer-p' returns t."
(save-excursion
(save-window-excursion
;;;###autoload
(defun erc-determine-network ()
- "Return the name of the network or \"Unknown\" as a symbol. Use the
-server parameter NETWORK if provided, otherwise parse the server name and
-search for a match in `erc-networks-alist'."
+ "Return the name of the network or \"Unknown\" as a symbol.
+Use the server parameter NETWORK if provided, otherwise parse the
+server name and search for a match in `erc-networks-alist'."
;; The server made it easy for us and told us the name of the NETWORK
(let ((network-name (cdr (assoc "NETWORK" erc-server-parameters))))
(if network-name
"Obsolete since erc-networks 1.5")
(defun erc-network-name ()
- "Returns the name of the current network as a string."
+ "Return the name of the current network as a string."
(erc-with-server-buffer (symbol-name erc-network)))
(defun erc-set-network-name (proc parsed)
;;; Functions that provide possible completions.
(defun pcomplete-erc-commands ()
- "Returns a list of strings of the defined user commands."
+ "Return a list of strings of the defined user commands."
(let ((case-fold-search nil))
(mapcar (lambda (x)
(concat "/" (downcase (substring (symbol-name x) 8))))
(apropos-internal "erc-cmd-[A-Z]+"))))
(defun pcomplete-erc-ops ()
- "Returns a list of nicks with ops."
+ "Return a list of nicks with ops."
(let (ops)
(maphash (lambda (nick cdata)
(if (and (cdr cdata)
ops))
(defun pcomplete-erc-not-ops ()
- "Returns a list of nicks without ops."
+ "Return a list of nicks without ops."
(let (not-ops)
(maphash (lambda (nick cdata)
(if (and (cdr cdata)
(defun pcomplete-erc-nicks (&optional postfix ignore-self)
- "Returns a list of nicks in the current channel.
+ "Return a list of nicks in the current channel.
Optional argument POSTFIX is something to append to the nickname.
If optional argument IGNORE-SELF is non-nil, don't return the current nick."
(let ((users (if erc-pcomplete-order-nickname-completions
(nreverse nicks)))
(defun pcomplete-erc-all-nicks (&optional postfix)
- "Returns a list of all nicks on the current server."
+ "Return a list of all nicks on the current server."
(let (nicks)
(erc-with-server-buffer
(maphash (lambda (_nick user)
nicks))
(defun pcomplete-erc-channels ()
- "Returns a list of channels associated with the current server."
+ "Return a list of channels associated with the current server."
(mapcar (lambda (buf) (with-current-buffer buf (erc-default-target)))
(erc-channel-list erc-server-process)))
;;; Functions for parsing
(defun pcomplete-erc-command-name ()
- "Returns the command name of the first argument."
+ "Return the command name of the first argument."
(if (eq (elt (pcomplete-arg 'first) 0) ?/)
(upcase (substring (pcomplete-arg 'first) 1))
"SAY"))
(defun pcomplete-erc-parse-arguments ()
- "Returns a list of parsed whitespace-separated arguments.
+ "Return a list of parsed whitespace-separated arguments.
These are the words from the beginning of the line after the prompt
up to where point is right now."
(let* ((start erc-input-marker)
eshell-interpreter-alist)))
(defun eshell-visual-command-p (command args)
- "Returns non-nil when given a visual command.
+ "Return non-nil when given a visual command.
If either COMMAND or a subcommand in ARGS (e.g. git log) is a
visual command, returns non-nil."
(let ((command (file-name-nondirectory command)))
(rename-file gnus-cache-directory dir))
(defun gnus-cache-fully-p (&optional group)
- "Returns non-nil if the cache should be fully used.
+ "Return non-nil if the cache should be fully used.
If GROUP is non-nil, also cater to `gnus-cacheable-groups' and
`gnus-uncacheable-groups'."
(and gnus-use-cache
(or file "")))
(defun nnmail-get-active ()
- "Returns an assoc of group names and active ranges.
+ "Return an assoc of group names and active ranges.
nn*-request-list should have been called before calling this function."
;; Go through all groups from the active list.
(with-current-buffer nntp-server-buffer
(gnus-group-mark-article-read target (cdr group-art))))))))
(defun nnmail-fancy-expiry-target (group)
- "Returns a target expiry group determined by `nnmail-fancy-expiry-targets'."
+ "Return a target expiry group determined by `nnmail-fancy-expiry-targets'."
(let* (header
(case-fold-search nil)
(from (or (message-fetch-field "from") ""))
(looking-at "BABYL OPTIONS:"))))
(defun mail-string-delete (string start end)
- "Returns a string containing all of STRING except the part
+ "Return a string containing all of STRING except the part
from START (inclusive) to END (exclusive)."
(if (null end) (substring string 0 start)
(concat (substring string 0 start)
;; building headers
(defun sc-hdr (prefix field &optional sep return-nil-p)
- "Returns a concatenation of PREFIX and FIELD.
+ "Return a concatenation of PREFIX and FIELD.
If FIELD is not a string or is the empty string, the empty string will
be returned. Optional third argument SEP is concatenated on the end if
it is a string. Returns empty string, unless optional RETURN-NIL-P is
"Current electric reference style.")
(defun sc-valid-index-p (index)
- "Returns INDEX if it is a valid index into `sc-rewrite-header-list'.
+ "Return INDEX if it is a valid index into `sc-rewrite-header-list'.
Otherwise returns nil."
;; a number, and greater than or equal to zero
;; less than or equal to the last index
(not (string-match-p ange-ftp-local-host-regexp host))))
(defun ange-ftp-use-smart-gateway-p (host)
- "Returns whether to access this HOST via a smart gateway."
+ "Return whether to access this HOST via a smart gateway."
(and ange-ftp-smart-gateway
(not (string-match-p ange-ftp-local-host-regexp host))))
;;; Hash table of registered functions.
(defun dbus-list-hash-table ()
- "Returns all registered member registrations to D-Bus.
+ "Return all registered member registrations to D-Bus.
The return value is a list, with elements of kind (KEY . VALUE).
See `dbus-registered-objects-table' for a description of the
hash table."
;;; D-Bus type conversion.
(defun dbus-string-to-byte-array (string)
- "Transforms STRING to list (:array :byte c1 :byte c2 ...).
+ "Transform STRING to list (:array :byte c1 :byte c2 ...).
STRING shall be UTF8 coded."
(if (zerop (length string))
'(:array :signature "y")
(setq result (append result (list :byte elt)))))))
(defun dbus-byte-array-to-string (byte-array &optional multibyte)
- "Transforms BYTE-ARRAY into UTF8 coded string.
+ "Transform BYTE-ARRAY into UTF8 coded string.
BYTE-ARRAY must be a list of structure (c1 c2 ...), or a byte
array as produced by `dbus-string-to-byte-array'. The resulting
string is unibyte encoded, unless MULTIBYTE is non-nil."
;;; D-Bus events.
(defun dbus-check-event (event)
- "Checks whether EVENT is a well formed D-Bus event.
+ "Check whether EVENT is a well formed D-Bus event.
EVENT is a list which starts with symbol `dbus-event':
(dbus-event BUS TYPE SERIAL SERVICE PATH INTERFACE MEMBER HANDLER &rest ARGS)
(push (dbus-introspect-get-attribute elt "name") result))))
(defun dbus-introspect-get-property (bus service path interface property)
- "This function returns PROPERTY of INTERFACE as XML object.
+ "Return PROPERTY of INTERFACE as XML object.
It must be located at SERVICE in D-Bus BUS at object path PATH.
PROPERTY must be a string, element of the list returned by
`dbus-introspect-get-property-names'. The resulting PROPERTY
(const :tag "High" high)))))
(defun nsm-save-fingerprint-maybe (host port status &rest _)
- "Saves the certificate's fingerprint.
+ "Save the certificate's fingerprint.
In order to detect man-in-the-middle attacks, when
`network-security-level' is `high', this function will save the
values the results of the checks.")
(defun nsm-network-same-subnet (local-ip mask ip)
- "Returns t if IP is in the same subnet as LOCAL-IP/MASK.
+ "Return t if IP is in the same subnet as LOCAL-IP/MASK.
LOCAL-IP, MASK, and IP are specified as vectors of integers, and
are expected to have the same length. Works for both IPv4 and
IPv6 addresses."
matches))
(defun nsm-should-check (host)
- "Determines whether NSM should check for TLS problems for HOST.
+ "Determine whether NSM should check for TLS problems for HOST.
If `nsm-trust-local-network' is or returns non-nil, and if the
host address is a localhost address, or in the same subnet as one
;; When using M-x flyspell-mode, only check words after the prompt
(put 'rcirc-mode 'flyspell-mode-predicate 'rcirc-looking-at-input)
(defun rcirc-looking-at-input ()
- "Returns true if point is past the input marker."
+ "Return true if point is past the input marker."
(>= (point) rcirc-prompt-end-marker))
\f
tramp-adb-method)))
;;;###tramp-autoload
-(defun tramp-adb-file-name-handler (operation &rest args)
+(defun tramp-adb-file-name-handler (operation &rest arguments)
"Invoke the ADB handler for OPERATION.
-First arg specifies the OPERATION, second arg is a list of arguments to
-pass to the OPERATION."
+First arg specifies the OPERATION, second arg is a list of
+ARGUMENTS to pass to the OPERATION."
(let ((fn (assoc operation tramp-adb-file-name-handler-alist)))
(if fn
- (save-match-data (apply (cdr fn) args))
- (tramp-run-real-handler operation args))))
+ (save-match-data (apply (cdr fn) arguments))
+ (tramp-run-real-handler operation arguments))))
;;;###tramp-autoload
(tramp--with-startup
(defun tramp-adb-sh-fix-ls-output (&optional sort-by-time)
"Insert dummy 0 in empty size columns.
-Androids \"ls\" command doesn't insert size column for directories:
+Android's \"ls\" command doesn't insert size column for directories:
Emacs dired can't find files."
(save-excursion
;; Insert missing size.
vec 'file-error "Could not find device %s" host)))))))
(defun tramp-adb-execute-adb-command (vec &rest args)
- "Returns nil on success error-output on failure."
+ "Return nil on success error-output on failure."
(when (and (> (length (tramp-file-name-host vec)) 0)
;; The -s switch is only available for ADB device commands.
(not (member (car args) '("connect" "disconnect"))))
(tramp-message vec 6 "%s" (buffer-string)))))
(defun tramp-adb-find-test-command (vec)
- "Checks, whether the ash has a builtin \"test\" command.
+ "Check whether the ash has a builtin \"test\" command.
This happens for Android >= 4.0."
(with-tramp-connection-property vec "test"
(tramp-adb-send-command-and-check vec "type test")))
"Whether persistent cache data have been changed.")
(defun tramp-get-hash-table (key)
- "Returns the hash table for KEY.
+ "Return the hash table for KEY.
If it doesn't exist yet, it is created and initialized with
matching entries of `tramp-connection-properties'."
(or (gethash key tramp-cache-data)
#'tramp-handle-temporary-file-directory))
(defun tramp-compat-process-running-p (process-name)
- "Returns t if system process PROCESS-NAME is running for `user-login-name'."
+ "Return t if system process PROCESS-NAME is running for `user-login-name'."
(when (stringp process-name)
(cond
;; GNU Emacs 22 on w32.
;; Internal file name functions.
(defun tramp-smb-get-share (vec)
- "Returns the share name of LOCALNAME."
+ "Return the share name of LOCALNAME."
(save-match-data
(let ((localname (tramp-file-name-unquote-localname vec)))
(when (string-match "^/?\\([^/]+\\)/" localname)
(match-string 1 localname)))))
(defun tramp-smb-get-localname (vec)
- "Returns the file name of LOCALNAME.
+ "Return the file name of LOCALNAME.
If VEC has no cifs capabilities, exchange \"/\" by \"\\\\\"."
(save-match-data
(let ((localname (tramp-file-name-unquote-localname vec)))
;; So we try to analyze backwards.
(defun tramp-smb-read-file-entry (share)
"Parse entry in SMB output buffer.
-If SHARE is result, entries are of type dir. Otherwise, shares are listed.
-Result is the list (LOCALNAME MODE SIZE MTIME)."
+If SHARE is result, entries are of type dir. Otherwise, shares
+are listed. Result is the list (LOCALNAME MODE SIZE MTIME)."
;; We are called from `tramp-smb-get-file-entries', which sets the
;; current buffer.
(let ((line (buffer-substring (point) (point-at-eol)))
(list localname mode size mtime))))
(defun tramp-smb-get-cifs-capabilities (vec)
- "Check, whether the SMB server supports POSIX commands."
+ "Check whether the SMB server supports POSIX commands."
;; When we are not logged in yet, we return nil. The
;; connection-local property "posix" is not set explicitly; it is
;; just checked in order to let a user configure it to nil on hosts
(buffer-substring (point) (point-at-eol)) nil 'omit)))))))))
(defun tramp-smb-get-stat-capability (vec)
- "Check, whether the SMB server supports the STAT command."
+ "Check whether the SMB server supports the STAT command."
;; When we are not logged in yet, we return nil.
(if (and (tramp-smb-get-share vec)
(process-live-p (tramp-get-connection-process vec)))
;;; Config Manipulation Functions:
(defun tramp-set-completion-function (method function-list)
- "Sets the list of completion functions for METHOD.
+ "Set the list of completion functions for METHOD.
FUNCTION-LIST is a list of entries of the form (FUNCTION FILE).
The FUNCTION is intended to parse FILE according its syntax.
It might be a predefined FUNCTION, or a user defined FUNCTION.
(cons method r)))))
(defun tramp-get-completion-function (method)
- "Returns a list of completion functions for METHOD.
+ "Return a list of completion functions for METHOD.
For definition of that list see `tramp-set-completion-function'."
(append
`(;; Default settings are taken into account.
;; "/x:y@""/[x/y@" "/x:y@z" "/[x/y@z" "/x:y@z:" "/[x/y@z]"
;;["x" "y" nil nil] ["x" "y" "z" nil] ["x" "y" "z" ""]
(defun tramp-completion-dissect-file-name (name)
- "Returns a list of `tramp-file-name' structures.
+ "Return a list of `tramp-file-name' structures.
They are collected by `tramp-completion-dissect-file-name1'."
(let* ((x-nil "\\|\\(\\)")
(tramp-completion-ipv6-regexp
tramp-completion-file-name-structure6)))))
(defun tramp-completion-dissect-file-name1 (structure name)
- "Returns a `tramp-file-name' structure matching STRUCTURE.
+ "Return a `tramp-file-name' structure matching STRUCTURE.
The structure consists of remote method, remote user,
remote host and localname (filename on remote host)."
(save-match-data
;; This function returns all possible method completions, adding the
;; trailing method delimiter.
(defun tramp-get-completion-methods (partial-method)
- "Returns all method completions for PARTIAL-METHOD."
+ "Return all method completions for PARTIAL-METHOD."
(mapcar
(lambda (method)
(and method
;; Compares partial user and host names with possible completions.
(defun tramp-get-completion-user-host
(method partial-user partial-host user host)
- "Returns the most expanded string for user and host name completion.
+ "Return the most expanded string for user and host name completion.
PARTIAL-USER must match USER, PARTIAL-HOST must match HOST."
(cond
(delete-region (point) (point-max)))))))
(defun tramp-get-inode (vec)
- "Returns the virtual inode number.
+ "Return the virtual inode number.
If it doesn't exist, generate a new one."
(with-tramp-file-property vec (tramp-file-name-localname vec) "inode"
(setq tramp-inodes (1+ tramp-inodes))))
(defun tramp-get-device (vec)
- "Returns the virtual device number.
+ "Return the virtual device number.
If it doesn't exist, generate a new one."
(with-tramp-connection-property (tramp-get-connection-process vec) "device"
(cons -1 (setq tramp-devices (1+ tramp-devices)))))
(string-equal (file-remote-p file1) (file-remote-p file2)))))
(defun tramp-mode-string-to-int (mode-string)
- "Converts a ten-letter `drwxrwxrwx'-style mode string into mode bits."
+ "Convert a ten-letter `drwxrwxrwx'-style mode string into mode bits."
(let* (case-fold-search
(mode-chars (string-to-vector mode-string))
(owner-read (aref mode-chars 1))
(defun tramp-call-process
(vec program &optional infile destination display &rest args)
- "Calls `call-process' on the local host.
+ "Call `call-process' on the local host.
It always returns a return code. The Lisp error raised when
PROGRAM is nil is trapped also, returning 1. Furthermore, traces
are written with verbosity of 6."
(defun tramp-call-process-region
(vec start end program &optional delete buffer display &rest args)
- "Calls `call-process-region' on the local host.
+ "Call `call-process-region' on the local host.
It always returns a return code. The Lisp error raised when
PROGRAM is nil is trapped also, returning 1. Furthermore, traces
are written with verbosity of 6."
(defun tramp-process-lines
(vec program &rest args)
- "Calls `process-lines' on the local host.
+ "Call `process-lines' on the local host.
If an error occurs, it returns nil. Traces are written with
verbosity of 6."
(let ((default-directory (tramp-compat-temporary-file-directory))
;;; the process property `remote-pid'.
(defun tramp-interrupt-process (&optional process _current-group)
- "Interrupt remote process PROC."
+ "Interrupt remote PROCESS.
+PROCESS can be a process, a buffer with an associated process, the
+name of a process or buffer, or nil to default to the current buffer."
;; CURRENT-GROUP is not implemented yet.
(let ((proc (cond
((processp process) process)
supported keys depend on the service type.")
(defun zeroconf-list-service-names ()
- "Returns all discovered Avahi service names as list."
+ "Return all discovered Avahi service names as list."
(let (result)
(maphash
(lambda (_key value) (add-to-list 'result (zeroconf-service-name value)))
result))
(defun zeroconf-list-service-types ()
- "Returns all discovered Avahi service types as list."
+ "Return all discovered Avahi service types as list."
(let (result)
(maphash
(lambda (_key value) (add-to-list 'result (zeroconf-service-type value)))
result))
(defun zeroconf-list-services (type)
- "Returns all discovered Avahi services for a given service type TYPE.
+ "Return all discovered Avahi services for a given service type TYPE.
The service type is one of the returned values of
`zeroconf-list-service-types'. The return value is a list
\(SERVICE1 SERVICE2 ...). See `zeroconf-services-hash' for the
(remhash type table))))
(defun zeroconf-get-host ()
- "Returns the local host name as string."
+ "Return the local host name as string."
(dbus-call-method
:system zeroconf-service-avahi zeroconf-path-avahi
zeroconf-interface-avahi-server "GetHostName"))
(defun zeroconf-get-domain ()
- "Returns the domain name as string."
+ "Return the domain name as string."
(dbus-call-method
:system zeroconf-service-avahi zeroconf-path-avahi
zeroconf-interface-avahi-server "GetDomainName"))
(defun zeroconf-get-host-domain ()
- "Returns the local host name FQDN as string."
+ "Return the local host name FQDN as string."
(dbus-call-method
:system zeroconf-service-avahi zeroconf-path-avahi
zeroconf-interface-avahi-server "GetHostNameFqdn"))
;;;###autoload
(defun rng-xsd-compile (name params)
- "Provides W3C XML Schema as a RELAX NG datatypes library.
+ "Provide W3C XML Schema as a RELAX NG datatypes library.
NAME is a symbol giving the local name of the datatype. PARAMS is a
list of pairs (PARAM-NAME . PARAM-VALUE) where PARAM-NAME is a symbol
giving the name of the parameter and PARAM-VALUE is a string giving
string))
(defun rng-xsd-make-date-time-regexp (template)
- "Returns a regular expression matching a ISO 8601 date/time.
+ "Return a regular expression matching a ISO 8601 date/time.
The template is a string with Y standing for years field, M standing
for months, D standing for day of month, T standing for a literal T, t
standing for time and - standing for a literal hyphen. A time zone is
v))
(defun rng-xsd-convert-date-time (string regexp)
- "Converts an XML Schema date/time to a list.
+ "Convert an XML Schema date/time to a list.
Returns nil if invalid. REGEXP is a regexp for parsing the date time
as returned by `rng-xsd-make-date-time-regexp'. The list has 4 members
\(HAS-TIME-ZONE DAY SECOND SECOND-FRACTION), where HAS-TIME-ZONE is t
(hippie-expand nil)))
(defgroup erc-hecomplete nil
- "Nick completion. It is recommended to use erc-pcomplete instead."
+ "Nick completion. It is recommended to use `erc-pcomplete' instead."
:group 'erc)
(defcustom erc-nick-completion 'all
:type 'string)
(defun erc-command-list ()
- "Returns a list of strings of the defined user commands."
+ "Return a list of strings of the defined user commands."
(let ((case-fold-search nil))
(mapcar (lambda (x)
(concat "/" (downcase (substring (symbol-name x) 8))))
(equal point (point))))
(defun erc-complete-at-prompt ()
- "Returns t if point is directly after `erc-prompt' when doing completion."
+ "Return t if point is directly after `erc-prompt' when doing completion."
(erc-at-beginning-of-line-p (he-dabbrev-beg)))
(provide 'erc-hecomplete)
2012-04-01 Jambunathan K <kjambunathan@gmail.com>
* org-footnote.el (org-footnote-normalize): Force a paragraph
- break after the last footnote definition. This is an an implicit
+ break after the last footnote definition. This is an implicit
assumption made by the org-lparse.el library. With this change,
footnote definitions can reliably be exported with ODT backend.
See https://lists.gnu.org/r/emacs-orgmode/2012-02/msg01013.html.
* org-footnote.el (org-footnote-normalize): Ensure footnote
definition will be inserted at the end of the section
- corresponding to to its first reference.
+ corresponding to its first reference.
2012-04-01 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-list-struct, org-in-item-p): Don't assume end of
- blocks or drawers necessarily start somewhere. It it isn't the
+ blocks or drawers necessarily start somewhere. If it isn't the
case, treat them as normal text.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
"Hook for functions to be called after `org-babel-execute-src-block'")
(defun org-babel-named-src-block-regexp-for-name (&optional name)
- "This generates a regexp used to match a src block named NAME.
+ "Generate a regexp used to match a src block named NAME.
If NAME is nil, match any name. Matched name is then put in
match group 9. Other match groups are defined in
`org-babel-src-block-regexp'."
(substring org-babel-src-block-regexp 1)))
(defun org-babel-named-data-regexp-for-name (name)
- "This generates a regexp used to match data named NAME."
+ "Generate a regexp used to match data named NAME."
(concat org-babel-name-regexp (regexp-quote name) "[ \t]*$"))
(defun org-babel--normalize-body (datum)
(ignore-errors (org-next-block 1 nil regexp))))))
(defun org-babel-src-block-names (&optional file)
- "Returns the names of source blocks in FILE or the current buffer."
+ "Return the names of source blocks in FILE or the current buffer."
(with-current-buffer (if file (find-file-noselect file) (current-buffer))
(org-with-point-at 1
(let ((regexp "^[ \t]*#\\+begin_src ")
(throw :found (line-beginning-position)))))))))
(defun org-babel-result-names (&optional file)
- "Returns the names of results in FILE or the current buffer."
+ "Return the names of results in FILE or the current buffer."
(save-excursion
(when file (find-file file)) (goto-char (point-min))
(let ((case-fold-search t) names)
(puthash session-name buffer org-babel-scheme-repl-map))
(defun org-babel-scheme-get-buffer-impl (buffer)
- "Returns the scheme implementation geiser associates with the buffer."
+ "Return the scheme implementation geiser associates with the buffer."
(with-current-buffer (set-buffer buffer)
geiser-impl--implementation))
;;; Helper functions
(defun org-babel--variable-assignments:sh-generic
(varname values &optional sep hline)
- "Returns a list of statements declaring the values as a generic variable."
+ "Return a list of statements declaring the values as a generic variable."
(format "%s=%s" varname (org-babel-sh-var-to-sh values sep hline)))
(defun org-babel--variable-assignments:bash_array
(varname values &optional sep hline)
- "Returns a list of statements declaring the values as a bash array."
+ "Return a list of statements declaring the values as a bash array."
(format "unset %s\ndeclare -a %s=( %s )"
varname varname
(mapconcat
(defun org-babel--variable-assignments:bash_assoc
(varname values &optional sep hline)
- "Returns a list of statements declaring the values as bash associative array."
+ "Return a list of statements declaring the values as bash associative array."
(format "unset %s\ndeclare -A %s\n%s"
varname varname
(mapconcat
"\n")))
(defun org-babel--variable-assignments:bash (varname values &optional sep hline)
- "Represents the parameters as useful Bash shell variables."
+ "Represent the parameters as useful Bash shell variables."
(pcase values
(`((,_ ,_ . ,_) . ,_) ;two-dimensional array
(org-babel--variable-assignments:bash_assoc varname values sep hline))
(org-update-dblock))
(defun org-day-of-week (day month year)
- "Returns the day of the week as an integer."
+ "Return the day of the week as an integer."
(nth 6
(decode-time
(date-to-time
;;;; For Tables
;;
-;; `org-export-table-has-special-column-p' and and
+;; `org-export-table-has-special-column-p' and
;; `org-export-table-row-is-special-p' are predicates used to look for
;; meta-information about the table structure.
;;
(defvar cperl-sub-regexp (regexp-opt cperl-sub-keywords))
(defun cperl-char-ends-sub-keyword-p (char)
- "Return T if CHAR is the last character of a perl sub keyword."
+ "Return t if CHAR is the last character of a perl sub keyword."
(cl-loop for keyword in cperl-sub-keywords
when (eq char (aref keyword (1- (length keyword))))
return t))
;; Rich Schaefer <schaefer@asc.slb.com> Schlumberger, Austin, Tx.
(defun gud-find-c-expr ()
- "Returns the expr that surrounds point."
+ "Return the expr that surrounds point."
(interactive)
(save-excursion
(let ((p (point))
(buffer-substring (car expr) (cdr expr)))))
(defun gud-innermost-expr ()
- "Returns the smallest expr that point is in; move point to beginning of it.
+ "Return the smallest expr that point is in; move point to beginning of it.
The expr is represented as a cons cell, where the car specifies the point in
the current buffer that marks the beginning of the expr and the cdr specifies
the character after the end of the expr."
(error t)))
(defun gud-prev-expr ()
- "Returns the previous expr, point is set to beginning of that expr.
+ "Return the previous expr, point is set to beginning of that expr.
The expr is represented as a cons cell, where the car specifies the point in
the current buffer that marks the beginning of the expr and the cdr specifies
the character after the end of the expr."
(cons begin end)))
(defun gud-next-expr ()
- "Returns the following expr, point is set to beginning of that expr.
+ "Return the following expr, point is set to beginning of that expr.
The expr is represented as a cons cell, where the car specifies the point in
the current buffer that marks the beginning of the expr and the cdr specifies
the character after the end of the expr."
(buffer-substring (point) end))))
(defun lisp-input-filter (str)
- "t if STR does not match `inferior-lisp-filter-regexp'."
+ "Return t if STR does not match `inferior-lisp-filter-regexp'."
(not (string-match inferior-lisp-filter-regexp str)))
;;;###autoload
;;; Adapted from function-called-at-point in help.el.
(defun lisp-fn-called-at-pt ()
- "Returns the name of the function called in the current call.
+ "Return the name of the function called in the current call.
The value is nil if it can't find one."
(condition-case nil
(save-excursion
(cl-defgeneric xref-backend-identifier-at-point (_backend)
"Return the relevant identifier at point.
-The return value must be a string or nil. nil means no
-identifier at point found.
+The return value must be a string, or nil meaning no identifier
+at point found.
If it's hard to determine the identifier precisely (e.g., because
it's a method call on unknown type), the implementation can
(and thing (substring-no-properties thing))))
(cl-defgeneric xref-backend-identifier-completion-table (backend)
- "Returns the completion table for identifiers.")
+ "Return the completion table for identifiers.")
\f
;;; misc utilities
(setq tracker (make-hash-table :size 100 :rehash-size 2.0)))))
(cl-defmethod registry-lookup ((db registry-db) keys)
- "Search for KEYS in the registry-db THIS.
+ "Search for KEYS in the registry-db DB.
Returns an alist of the key followed by the entry in a list, not a cons cell."
(let ((data (oref db data)))
(delq nil
keys))))
(cl-defmethod registry-lookup-breaks-before-lexbind ((db registry-db) keys)
- "Search for KEYS in the registry-db THIS.
+ "Search for KEYS in the registry-db DB.
Returns an alist of the key followed by the entry in a list, not a cons cell."
(let ((data (oref db data)))
(delq nil
(cl-defmethod registry-lookup-secondary ((db registry-db) tracksym
&optional create)
- "Search for TRACKSYM in the registry-db THIS.
+ "Search for TRACKSYM in the registry-db DB.
When CREATE is not nil, create the secondary index hash table if needed."
(let ((h (gethash tracksym (oref db tracker))))
(if h
(cl-defmethod registry-lookup-secondary-value ((db registry-db) tracksym val
&optional set)
- "Search for TRACKSYM with value VAL in the registry-db THIS.
+ "Search for TRACKSYM with value VAL in the registry-db DB.
When SET is not nil, set it for VAL (use t for an empty list)."
;; either we're asked for creation or there should be an existing index
(when (or set (registry-lookup-secondary db tracksym))
(registry--match mode entry (cdr-safe check-list))))))
(cl-defmethod registry-search ((db registry-db) &rest spec)
- "Search for SPEC across the registry-db THIS.
+ "Search for SPEC across the registry-db DB.
For example calling with `:member \\='(a 1 2)' will match entry \((a 3 1)).
Calling with `:all t' (any non-nil value) will match all.
Calling with `:regex \\='(a \"h.llo\")' will match entry \(a \"hullo\" \"bye\").
collect k))))
(cl-defmethod registry-delete ((db registry-db) keys assert &rest spec)
- "Delete KEYS from the registry-db THIS.
+ "Delete KEYS from the registry-db DB.
If KEYS is nil, use SPEC to do a search.
Updates the secondary ('tracked') indices as well.
With assert non-nil, errors out if the key does not exist already."
keys))
(cl-defmethod registry-size ((db registry-db))
- "Returns the size of the registry-db object THIS.
+ "Return the size of the registry-db object DB.
This is the key count of the `data' slot."
(hash-table-count (oref db data)))
(cl-defmethod registry-full ((db registry-db))
- "Checks if registry-db THIS is full."
+ "Check if registry-db DB is full."
(>= (registry-size db)
(oref db max-size)))
(cl-defmethod registry-insert ((db registry-db) key entry)
- "Insert ENTRY under KEY into the registry-db THIS.
+ "Insert ENTRY under KEY into the registry-db DB.
Updates the secondary ('tracked') indices as well.
Errors out if the key exists already."
(cl-assert (not (gethash key (oref db data))) nil
entry)
(cl-defmethod registry-reindex ((db registry-db))
- "Rebuild the secondary indices of registry-db THIS."
+ "Rebuild the secondary indices of registry-db DB."
(let ((count 0)
(expected (* (length (oref db tracked)) (registry-size db))))
(dolist (tr (oref db tracked))
(oref db data))))))
(cl-defmethod registry-prune ((db registry-db) &optional sortfunc)
- "Prunes the registry-db object DB.
+ "Prune the registry-db object DB.
Attempts to prune the number of entries down to \(*
:max-size :prune-factor) less than the max-size limit, so
(cl-defmethod registry-collect-prune-candidates ((db registry-db)
limit sortfunc)
- "Collects pruning candidates from the registry-db object DB.
+ "Collect pruning candidates from the registry-db object DB.
Proposes only entries without the :precious keys, and attempts to
return LIMIT such candidates. If SORTFUNC is provided, sort
;; `provided-mode-derived-p' was added in 26.1
(unless (fboundp 'provided-mode-derived-p)
(defun provided-mode-derived-p (mode &rest modes)
- "Non-nil if MODE is derived from one of MODES.
+ "Return non-nil if MODE is derived from one of MODES.
Uses the `derived-mode-parent' property of the symbol to trace backwards.
If you just want to check `major-mode', use `derived-mode-p'."
(while (and (not (memq mode modes))
(put 'so-long-mode-line-info 'risky-local-variable t)
(defun so-long-mode-line-info ()
- "Returns the mode line construct for variable `so-long-mode-line-info'."
+ "Return the mode line construct for variable `so-long-mode-line-info'."
(let ((map (make-sparse-keymap)))
(define-key map (kbd "<mode-line> <down-mouse-1>")
`(menu-item "" nil
Use \\[so-long-commentary] for more information.
-Use \\[so-long-customize] to configure the behaviour."
+Use \\[so-long-customize] to configure the behavior."
;; Housekeeping. `so-long-mode' might be invoked directly rather than via
;; `so-long', so replicate the necessary behaviours. We could use this same
;; test in `so-long-after-change-major-mode' to run `so-long-hook', but that's
(defun so-long--check-header-modes ()
;; See also "Files with a file-local 'mode'" in the Commentary.
- "Handles the header-comments processing in `set-auto-mode'.
+ "Handle the header-comments processing in `set-auto-mode'.
`set-auto-mode' has some special-case code to handle the 'mode' pseudo-variable
when set in the header comment. This runs outside of `hack-local-variables'
(nbutlast (copy-sequence list) n)))
(defun nbutlast (list &optional n)
- "Modifies LIST to remove the last N elements.
+ "Modify LIST to remove the last N elements.
If N is omitted or nil, remove the last element."
(let ((m (length list)))
(or n (setq n 1))
(nreverse lines)))))
(defun process-live-p (process)
- "Returns non-nil if PROCESS is alive.
+ "Return non-nil if PROCESS is alive.
A process is considered alive if its status is `run', `open',
`listen', `connect' or `stop'. Value is nil if PROCESS is not a
process."
Type ? after invocation to get help on commands available.
Type q to remove the list of window configurations from the display.
-The first column shows `D' for for a window configuration you have
+The first column shows `D' for a window configuration you have
marked for deletion."
(interactive)
(let ((dir default-directory)
(equal cell-beg (progn (goto-char end) (table--probe-cell))))))))
(defun table--at-cell-p (position &optional object at-column)
- "Returns non-nil if POSITION has table-cell property in OBJECT.
+ "Return non-nil if POSITION has table-cell property in OBJECT.
OBJECT is optional and defaults to the current buffer.
If POSITION is at the end of OBJECT, the value is nil."
(if (and at-column (stringp object))
(get-text-property (point) 'table-cell)))
(defun table--probe-cell (&optional abort-on-error)
- "Probes a table cell around the point.
+ "Probe a table cell around the point.
Searches for the left upper corner and the right bottom corner of a table
cell which contains the current point location.
(get-text-property (1- (cdr cell)) property)))
(defun table--get-cell-justify-property (cell)
- "Get cell's justify property."
+ "Get CELL's justify property."
(table--get-property cell 'table-justify))
(defun table--get-cell-valign-property (cell)
- "Get cell's vertical alignment property."
+ "Get CELL's vertical alignment property."
(table--get-property cell 'table-valign))
(defun table--put-property (cell property value)
(put-text-property (1- end) end property value)))
(defun table--put-cell-justify-property (cell justify)
- "Put cell's justify property."
+ "Put CELL's JUSTIFY property."
(table--put-property cell 'table-justify justify))
(defun table--put-cell-valign-property (cell valign)
- "Put cell's vertical alignment property."
+ "Put CELL's vertical alignment property."
(table--put-property cell 'table-valign valign))
(defun table--point-entered/left-cell-function (_window _oldpos dir)
{
struct alsa_params *p = (struct alsa_params *) sd->data;
- /* The the third parameter to snd_pcm_writei is frames, not bytes. */
+ /* The third parameter to snd_pcm_writei is frames, not bytes. */
int fact = snd_pcm_format_size (sd->format, 1) * sd->channels;
ptrdiff_t nwritten = 0;
int err;
memset (&it->position, 0, sizeof it->position);
/* Only generate a stretch glyph if there is distance
- between current_x and and the indicator position. */
+ between current_x and the indicator position. */
if (stretch_width > 0)
{
int stretch_ascent = (((it->ascent + it->descent)