diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-21 17:40:23 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-21 17:40:23 +0100 |
| commit | 9b984aeb088901fc8b238a5e52ae343ea1dac527 (patch) | |
| tree | 3d1d26be0b1bda733f5f601cdbe72484a905e4fb /compat-27.el | |
| parent | a18351d539ac85ae31cd71520afff650ee5856b9 (diff) | |
Drop unneeded definitions
Diffstat (limited to 'compat-27.el')
| -rw-r--r-- | compat-27.el | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/compat-27.el b/compat-27.el index 8c06a5a..ee7f89e 100644 --- a/compat-27.el +++ b/compat-27.el @@ -123,40 +123,6 @@ NOTE: This function is not as accurate as the actual `time-equal-p'." (< (abs (- (float-time t1) (float-time t2))) (if (and t1 t2) 1e-6 1e-5))))) -;;;; Defined in fileio.c - -(compat-defun file-name-absolute-p (filename) ;; <compat-tests:file-name-absolute-p> - "Return t if FILENAME is an absolute file name. -On Unix, absolute file names start with `/'. In Emacs, an absolute -file name can also start with an initial `~' or `~USER' component, -where USER is a valid login name." - ;; See definitions in filename.h - (let ((drive - (eval-when-compile - (cond - ((memq system-type '(windows-nt ms-dos)) - "\\`[A-Za-z]:[\\/]") - ((eq system-type 'cygwin) - "\\`\\([\\/]\\|[A-Za-z]:\\)") - ("\\`/")))) - (home - (eval-when-compile - (if (memq system-type '(cygwin windows-nt ms-dos)) - "\\`~[\\/]" "\\`~/"))) - (user-home - (eval-when-compile - (format "\\`\\(~.*?\\)\\(%s.*\\)?$" - (if (memq system-type '(cygwin windows-nt ms-dos)) - "[\\/]" "/"))))) - (or (and (string-match-p drive filename) t) - (and (string-match-p home filename) t) - (save-excursion - (when (string-match user-home filename) - (let ((init (match-string 1 filename))) - (not (string= - (file-name-base (expand-file-name init)) - init)))))))) - ;;;; Defined in subr.el (compat-defalias fixnump integerp) ;; <compat-tests:fixnump> @@ -177,27 +143,6 @@ where USER is a valid login name." body))) (cons 'progn (nreverse body)))) -(compat-defun provided-mode-derived-p (mode &rest modes) ;; <compat-tests:derived-mode-p> - "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'." - ;; If MODE is an alias, then look up the real mode function first. - (let ((alias (symbol-function mode))) - (when (and alias (symbolp alias)) - (setq mode alias))) - (while - (and - (not (memq mode modes)) - (let* ((parent (get mode 'derived-mode-parent)) - (parentfn (symbol-function parent))) - (setq mode (if (and parentfn (symbolp parentfn)) parentfn parent))))) - mode) - -(compat-defun derived-mode-p (&rest modes) ;; <compat-tests:derived-mode-p> - "Non-nil if the current major mode is derived from one of MODES. -Uses the `derived-mode-parent' property of the symbol to trace backwards." - (apply #'provided-mode-derived-p major-mode modes)) - (compat-defmacro ignore-error (condition &rest body) ;; <compat-tests:ignore-error> "Execute BODY; if the error CONDITION occurs, return nil. Otherwise, return result of last form in BODY. |
