branch: externals/compat commit 158edd3161f26132b4fd6aee60bbd12c343bbaf0 Author: Philip Kaludercic <phil...@posteo.net> Commit: Philip Kaludercic <phil...@posteo.net>
Mark all currently untested functions --- compat-24.el | 6 ++++++ compat-25.el | 3 +++ compat-26.el | 4 ++++ compat-27.el | 12 ++++++++++++ compat-28.el | 20 ++++++++++++++++++++ 5 files changed, 45 insertions(+) diff --git a/compat-24.el b/compat-24.el index 80dac0e309..933d9c741d 100644 --- a/compat-24.el +++ b/compat-24.el @@ -243,6 +243,7 @@ return value from A's length." ;;;; Defined in subr.el +;;* UNTESTED (compat-defmacro with-eval-after-load (file &rest body) "Execute BODY after FILE is loaded. FILE is normally a feature name, but it can also be a file name, @@ -319,6 +320,7 @@ non-nil." (setcdr last nil))) list) +;;* UNTESTED (compat-defun define-error (name message &optional parent) "Define NAME as a new error signal. MESSAGE is a string that will be output to the echo area if such an error @@ -342,6 +344,7 @@ Defaults to `error'." ;;;; Defined in minibuffer.el +;;* UNTESTED (compat-defun completion-table-with-cache (fun &optional ignore-case) "Create dynamic completion table from function FUN, with cache. This is a wrapper for `completion-table-dynamic' that saves the last @@ -362,6 +365,7 @@ When IGNORE-CASE is non-nil, FUN is expected to be case-insensitive." (setq last-arg arg)))))) (completion-table-dynamic new-fun))) +;;* UNTESTED (compat-defun completion-table-merge (&rest tables) "Create a completion table that collects completions from all TABLES." :version "24.4" @@ -389,6 +393,7 @@ When IGNORE-CASE is non-nil, FUN is expected to be case-insensitive." ;;;; Defined in subr-x.el +;;* UNTESTED (compat-advise require (feature &rest args) "Allow for Emacs 24.x to require the inexistent FEATURE subr-x." :version "24.4" @@ -455,6 +460,7 @@ carriage return." ;;;; Defined in faces.el +;;* UNTESTED (compat-defun face-spec-set (face spec &optional spec-type) "Set the FACE's spec SPEC, define FACE, and recalculate its attributes. See `defface' for the format of SPEC. diff --git a/compat-25.el b/compat-25.el index 0e107cb6c5..f87cc5adc4 100644 --- a/compat-25.el +++ b/compat-25.el @@ -76,6 +76,7 @@ Case is significant. Symbols are also allowed; their print names are used instead." (string-lessp string2 string1)) +;;* UNTESTED (compat-defmacro with-file-modes (modes &rest body) "Execute BODY with default file permissions temporarily set to MODES. MODES is as for `set-default-file-modes'." @@ -258,6 +259,7 @@ threading." ;;;; Defined in byte-run.el +;;* UNTESTED (compat-defun function-put (func prop value) "Set FUNCTION's property PROP to VALUE. The namespace for PROP is shared with symbols. @@ -267,6 +269,7 @@ So far, FUNCTION can only be a symbol, not a lambda expression." ;;;; Defined in files.el +;;* UNTESTED (compat-defun directory-files-recursively (dir regexp &optional include-directories predicate follow-symlinks) "Return list of all files under directory DIR whose names match REGEXP. diff --git a/compat-26.el b/compat-26.el index 9a6b836cdc..07a338c286 100644 --- a/compat-26.el +++ b/compat-26.el @@ -62,6 +62,7 @@ Concatenate the results by altering them (using `nconc'). SEQUENCE may be a list, a vector, a boolean vector, or a string." (apply #'nconc (mapcar func sequence))) +;;* UNTESTED (compat-defun line-number-at-pos (&optional position absolute) "Handle optional argument ABSOLUTE: @@ -273,6 +274,8 @@ Elements of ALIST that are not conses are ignored." ;;;; Defined in files.el (declare-function temporary-file-directory nil) + +;;* UNTESTED (compat-defun make-nearby-temp-file (prefix &optional dir-flag suffix) "Create a temporary file as close as possible to `default-directory'. If PREFIX is a relative file name, and `default-directory' is a @@ -296,6 +299,7 @@ same meaning as in `make-temp-file'." "^" (regexp-opt '("/afs/" "/media/" "/mnt" "/net/" "/tmp_mnt/"))))) "File systems that ought to be mounted.") +;;* UNTESTED (compat-defun temporary-file-directory () "The directory for writing temporary files. In case of a remote `default-directory', this is a directory for diff --git a/compat-27.el b/compat-27.el index e728fb04d9..ad37025deb 100644 --- a/compat-27.el +++ b/compat-27.el @@ -279,6 +279,7 @@ represent a JSON false value. It defaults to `:false'." body))) (cons 'progn (nreverse body)))) +;;* UNTESTED (compat-defmacro ignore-error (condition &rest body) "Execute BODY; if the error CONDITION occurs, return nil. Otherwise, return result of last form in BODY. @@ -287,6 +288,7 @@ CONDITION can also be a list of error conditions." (declare (debug t) (indent 1)) `(condition-case nil (progn ,@body) (,condition nil))) +;;* UNTESTED (compat-defmacro dolist-with-progress-reporter (spec reporter-or-message &rest body) "Loop over a list and report progress in the echo area. Evaluate BODY with VAR bound to each car from LIST, in turn. @@ -347,47 +349,56 @@ return nil." ;;;; Defined in simple.el +;;* UNTESTED (compat-defun decoded-time-second (time) "The seconds in TIME, which is a value returned by `decode-time'. This is an integer between 0 and 60 (inclusive). (60 is a leap second, which only some operating systems support.)" (nth 0 time)) +;;* UNTESTED (compat-defun decoded-time-minute (time) "The minutes in TIME, which is a value returned by `decode-time'. This is an integer between 0 and 59 (inclusive)." (nth 1 time)) +;;* UNTESTED (compat-defun decoded-time-hour (time) "The hours in TIME, which is a value returned by `decode-time'. This is an integer between 0 and 23 (inclusive)." (nth 2 time)) +;;* UNTESTED (compat-defun decoded-time-day (time) "The day-of-the-month in TIME, which is a value returned by `decode-time'. This is an integer between 1 and 31 (inclusive)." (nth 3 time)) +;;* UNTESTED (compat-defun decoded-time-month (time) "The month in TIME, which is a value returned by `decode-time'. This is an integer between 1 and 12 (inclusive). January is 1." (nth 4 time)) +;;* UNTESTED (compat-defun decoded-time-year (time) "The year in TIME, which is a value returned by `decode-time'. This is a four digit integer." (nth 5 time)) +;;* UNTESTED (compat-defun decoded-time-weekday (time) "The day-of-the-week in TIME, which is a value returned by `decode-time'. This is a number between 0 and 6, and 0 is Sunday." (nth 6 time)) +;;* UNTESTED (compat-defun decoded-time-dst (time) "The daylight saving time in TIME, which is a value returned by `decode-time'. This is t if daylight saving time is in effect, and nil if not." (nth 7 time)) +;;* UNTESTED (compat-defun decoded-time-zone (time) "The time zone in TIME, which is a value returned by `decode-time'. This is an integer indicating the UTC offset in seconds, i.e., @@ -460,6 +471,7 @@ in all cases, since that is the standard symbol for byte." (declare-function lm-header "lisp-mnt") +;;* UNTESTED (compat-defun package-get-version () "Return the version number of the package in which this is used. Assumes it is used from an Elisp file placed inside the top-level directory diff --git a/compat-28.el b/compat-28.el index 27b1dba7a2..278245aae5 100644 --- a/compat-28.el +++ b/compat-28.el @@ -31,6 +31,7 @@ ;;;; Defined in fns.c +;;* INCOMPLETE FEATURE: Should handle multibyte regular expressions (compat-defun string-search (needle haystack &optional start-pos) "Search for the string NEEDLE in the strign HAYSTACK. @@ -105,6 +106,7 @@ inserted before contatenating." ;;;; Defined in alloc.c +;;* UNTESTED (but also not necessary) (compat-defun garbage-collect-maybe (_factor) "Call ‘garbage-collect’ if enough allocation happened. FACTOR determines what \"enough\" means here: If FACTOR is a @@ -144,6 +146,7 @@ consider, and are interpreted as in `substring'." ;;;; Defined in dired.c +;;* UNTESTED (compat-defun directory-files (directory &optional full match nosort count) "Handle additional optional argument COUNT: @@ -308,6 +311,7 @@ and BLUE, is normalized to have its value in [0,65535]." ;;;; Defined in subr.el +;;* INCOMPLETE FEATURE: Should handle multibyte regular expressions (compat-defun string-replace (fromstring tostring instring) "Replace FROMSTRING with TOSTRING in INSTRING each time it occurs." (when (equal fromstring "") @@ -324,6 +328,7 @@ This function accepts any number of ARGUMENTS, but ignores them. Also see `ignore'." t) +;;* UNTESTED (compat-defun insert-into-buffer (buffer &optional start end) "Insert the contents of the current buffer into BUFFER. If START/END, only insert that region from the current buffer. @@ -332,6 +337,7 @@ Point in BUFFER will be placed after the inserted text." (with-current-buffer buffer (insert-buffer-substring current start end)))) +;;* UNTESTED (compat-defun replace-string-in-region (string replacement &optional start end) "Replace STRING with REPLACEMENT in the region from START to END. The number of replaced occurrences are returned, or nil if STRING @@ -359,6 +365,7 @@ Comparisons and replacements are done with fixed case." (and (not (zerop matches)) matches)))) +;;* UNTESTED (compat-defun replace-regexp-in-region (regexp replacement &optional start end) "Replace REGEXP with REPLACEMENT in the region from START to END. The number of replaced occurrences are returned, or nil if REGEXP @@ -393,6 +400,7 @@ REPLACEMENT can use the following special elements: (and (not (zerop matches)) matches)))) +;;* UNTESTED (compat-defun buffer-local-boundp (symbol buffer) "Return non-nil if SYMBOL is bound in BUFFER. Also see `local-variable-p'." @@ -402,6 +410,7 @@ Also see `local-variable-p'." (void-variable nil (throw 'fail nil))) t)) +;;* UNTESTED (compat-defmacro with-existing-directory (&rest body) "Execute BODY with `default-directory' bound to an existing directory. If `default-directory' is already an existing directory, it's not changed." @@ -419,6 +428,7 @@ If `default-directory' is already an existing directory, it's not changed." (throw ',quit (let ((default-directory dir)) ,@body))))))) +;;* UNTESTED (compat-defmacro dlet (binders &rest body) "Like `let' but using dynamic scoping." (declare (indent 1) (debug let)) @@ -615,6 +625,7 @@ See also `file-name-sans-extension'." (t (concat (file-name-sans-extension filename) "." extn))))) +;;* UNTESTED (compat-defun directory-empty-p (dir) "Return t if DIR names an existing directory containing no other files. Return nil if DIR does not name a directory, or if there was @@ -663,6 +674,7 @@ the leading `-' char." (if (zerop (logand 1 mode)) ?- ?x) (if (zerop (logand 1 mode)) ?T ?t)))) +;;* UNTESTED (compat-defun file-backup-file-names (filename) "Return a list of backup files for FILENAME. The list will be sorted by modification time so that the most @@ -713,6 +725,7 @@ is included in the return value." ;;;; Defined in windows.el +;;* UNTESTED (compat-defun count-windows (&optional minibuf all-frames) "Handle optional argument ALL-FRAMES: @@ -730,6 +743,8 @@ just the selected frame." ;;;; Defined in thingatpt.el (declare-function mouse-set-point "mouse" (event &optional promote-to-region)) + +;;* UNTESTED (compat-defun thing-at-mouse (event thing &optional no-properties) "Return the THING at mouse click. Like `thing-at-point', but tries to use the event @@ -741,6 +756,7 @@ where the mouse button is clicked to find a thing nearby." ;;;; Defined in macroexp.el +;;* UNTESTED (compat-defun macroexp-file-name () "Return the name of the file from which the code comes. Returns nil when we do not know. @@ -755,6 +771,7 @@ Other uses risk returning non-nil value that point to the wrong file." ;;;; Defined in env.el +;;* UNTESTED (compat-defmacro with-environment-variables (variables &rest body) "Set VARIABLES in the environent and execute BODY. VARIABLES is a list of variable settings of the form (VAR VALUE), @@ -773,6 +790,7 @@ The previous values will be be restored upon exit." ;;;; Defined in button.el +;;* UNTESTED (compat-defun button-buttonize (string callback &optional data) "Make STRING into a button and return it. When clicked, CALLBACK will be called with the DATA as the @@ -791,6 +809,8 @@ itself will be used instead as the function argument." ;;;; Defined in autoload.el (defvar generated-autoload-file) + +;;* UNTESTED (compat-defun make-directory-autoloads (dir output-file) "Update autoload definitions for Lisp files in the directories DIRS. DIR can be either a single directory or a list of