Drop Emacs 26.x support

Emacs 27.x has been the stable version of Emacs for nearly a year, and
introduces a litany of bugfixes, performance, and quality-of-life
improvements that significantly reduce Doom's maintenance burden (like
XDG support, early-init.el, image manipulation without imagemagick, a
native JSON library, harfbuzz support, pdumper, and others).

With so many big changes on Doom's horizon, I like having one less (big)
thing to worry about.

Also reverts bb677cf7a (#5232) as it is no longer needed.
This commit is contained in:
Henrik Lissner
2021-07-06 01:54:32 -04:00
parent ff2d56794e
commit 044a1a5f2b
19 changed files with 58 additions and 326 deletions

View File

@@ -625,72 +625,7 @@ testing advice (when combined with `rotate-text').
;;
;;; Backports
(eval-when! (version< emacs-version "27.0.90")
;; DEPRECATED Backported from Emacs 27
(defmacro setq-local (&rest pairs)
"Make variables in PAIRS buffer-local and assign them the corresponding values.
PAIRS is a list of variable/value pairs. For each variable, make
it buffer-local and assign it the corresponding value. The
variables are literal symbols and should not be quoted.
The second VALUE is not computed until after the first VARIABLE
is set, and so on; each VALUE can use the new value of variables
set earlier in the setq-local. The return value of the
setq-local form is the value of the last VALUE.
\(fn [VARIABLE VALUE]...)"
(declare (debug setq))
(unless (zerop (mod (length pairs) 2))
(error "PAIRS must have an even number of variable/value members"))
(let ((expr nil))
(while pairs
(unless (symbolp (car pairs))
(error "Attempting to set a non-symbol: %s" (car pairs)))
;; Can't use backquote here, it's too early in the bootstrap.
(setq expr
(cons
(list 'set
(list 'make-local-variable (list 'quote (car pairs)))
(car (cdr pairs)))
expr))
(setq pairs (cdr (cdr pairs))))
(macroexp-progn (nreverse expr)))))
(eval-when! (version< emacs-version "27.1")
;; DEPRECATED Backported from Emacs 27. Remove when 26.x support is dropped.
(defun executable-find (command &optional remote)
"Search for COMMAND in `exec-path' and return the absolute file name.
Return nil if COMMAND is not found anywhere in `exec-path'. If
REMOTE is non-nil, search on the remote host indicated by
`default-directory' instead."
(if (and remote (file-remote-p default-directory))
(let ((res (locate-file
command
(mapcar
(lambda (x) (concat (file-remote-p default-directory) x))
(exec-path))
exec-suffixes 'file-executable-p)))
(when (stringp res) (file-local-name res)))
;; Use 1 rather than file-executable-p to better match the
;; behavior of call-process.
(let ((default-directory
(let (file-name-handler-alist)
(file-name-quote default-directory))))
(locate-file command exec-path exec-suffixes 1)))))
(eval-when! (not (fboundp 'exec-path))
;; DEPRECATED Backported from Emacs 27.1. Remove when 26.x support is dropped.
(defun exec-path ()
"Return list of directories to search programs to run in remote subprocesses.
The remote host is identified by `default-directory'. For remote
hosts that do not support subprocesses, this returns `nil'.
If `default-directory' is a local directory, this function returns
the value of the variable `exec-path'."
(let ((handler (find-file-name-handler default-directory 'exec-path)))
(if handler
(funcall handler 'exec-path)
exec-path))))
;; None at the moment!
(provide 'core-lib)
;;; core-lib.el ends here