emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/geiser 8e582fa644 2/3: geiser-custom: indent as declaratio


From: ELPA Syncer
Subject: [nongnu] elpa/geiser 8e582fa644 2/3: geiser-custom: indent as declaration, lexical binding (Stefan Monnier)
Date: Thu, 27 Jan 2022 18:57:58 -0500 (EST)

branch: elpa/geiser
commit 8e582fa644b3ad0391a0c493ad6e2faaf677347a
Author: jao <jao@gnu.org>
Commit: jao <jao@gnu.org>

    geiser-custom: indent as declaration, lexical binding (Stefan Monnier)
---
 elisp/geiser-custom.el | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/elisp/geiser-custom.el b/elisp/geiser-custom.el
index 8095863251..2b8a202198 100644
--- a/elisp/geiser-custom.el
+++ b/elisp/geiser-custom.el
@@ -1,4 +1,4 @@
-;;; geiser-custom.el -- customization utilities
+;;; geiser-custom.el -- customization utilities  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2009, 2010, 2012 Jose Antonio Ortega Ruiz
 
@@ -31,22 +31,21 @@
   :group 'faces)
 
 (defmacro geiser-custom--defface (face def group doc)
-  (declare (doc-string 4))
+  (declare (doc-string 4) (indent 1))
   (let ((face (intern (format "geiser-font-lock-%s" face))))
     `(defface ,face (face-default-spec ,def)
        ,(format "Face for %s." doc)
        :group ',group
        :group 'geiser-faces)))
-
-(put 'geiser-custom--defface 'lisp-indent-function 1)
-
-
 
 ;;; Reload support:
 
 (defvar geiser-custom--memoized-vars nil)
 
 (defun geiser-custom--memoize (name)
+  ;; FIXME: Why not build this list with mapatoms, filtering on a "\\`'geiser-"
+  ;; prefix and checking that it's a `defcustom', so we don't need
+  ;; `geiser-custom--defcustom'?
   (add-to-list 'geiser-custom--memoized-vars name))
 
 (defmacro geiser-custom--defcustom (name &rest body)
@@ -56,7 +55,7 @@ of the listed variables.  It is not used for anything else."
   ;; FIXME Remembering the value like this is not actually
   ;; necessary.  Evaluting `defcustom' always preserves the
   ;; existing value, if any.
-  (declare (doc-string 3) (debug (name body)))
+  (declare (doc-string 3) (debug (name body)) (indent 2))
   `(progn
      (geiser-custom--memoize ',name)
      (defcustom ,name ,@body)))
@@ -67,9 +66,6 @@ of the listed variables.  It is not used for anything else."
       (when (boundp name)
         (push (cons name (symbol-value name)) result)))))
 
-
-(put 'geiser-custom--defcustom 'lisp-indent-function 2)
-
 
 (defconst geiser-custom-font-lock-keywords
   (eval-when-compile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]