From 42947150adc2639bf7456d40dedce09338cec303 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Jul 2022 16:47:32 -0500 Subject: Rename +compat.el to avoid collision; add a thing --- lisp/compat.el | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 lisp/compat.el (limited to 'lisp/compat.el') diff --git a/lisp/compat.el b/lisp/compat.el deleted file mode 100644 index 4bb8706..0000000 --- a/lisp/compat.el +++ /dev/null @@ -1,34 +0,0 @@ -;;; compat.el --- Thin backward-compatibility shim -*- lexical-binding: t; -*- - -;;; Commentary: - -;; I use different versionso of Emacs. Sometimes I have to copy-paste functions -;; from newer Emacs to make my customizations work. This is that file. - -;; This is probably ill-advised. - -;;; Code: - -;; Load stuff in compat/ subdirectory -(dolist (file (directory-files (locate-user-emacs-file "lisp/compat") :full "\\.el\\'")) - (load file :noerror)) - -;; Other stuff... - -(unless (fboundp 'dlet) - (defmacro dlet (binders &rest body) - "Like `let' but using dynamic scoping." - (declare (indent 1) (debug let)) - ;; (defvar FOO) only affects the current scope, but in order for - ;; this not to affect code after the main `let' we need to create a new scope, - ;; which is what the surrounding `let' is for. - ;; FIXME: (let () ...) currently doesn't actually create a new scope, - ;; which is why we use (let (_) ...). - `(let (_) - ,@(mapcar (lambda (binder) - `(defvar ,(if (consp binder) (car binder) binder))) - binders) - (let ,binders ,@body)))) - -(provide 'compat) -;;; compat.el ends here -- cgit 1.4.1-21-gabe81