emacs-devel
[Top][All Lists]
Advanced

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

Re: Possible bug: org-capture fails when emacs started as daemon


From: Eli Zaretskii
Subject: Re: Possible bug: org-capture fails when emacs started as daemon
Date: Wed, 16 Aug 2023 20:04:56 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: inigoserna@gmx.com,  yantar92@posteo.net,  morgan@ice9.digital,
>   emacs-devel@gnu.org
> Date: Wed, 16 Aug 2023 11:00:21 -0400
> 
> If we want to make the code simpler, then we should throw away
> `face-remap--copy-face` and use `copy-tree` instead.

Like below?

diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 3ec271b..c5f7af3 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -70,21 +70,10 @@ internal-lisp-face-attributes
    :foreground :background :stipple :overline :strike-through :box
    :font :inherit :fontset :distant-foreground :extend :vector])
 
-(defun face-remap--copy-face (val)
-  "Return a copy of the `face' property value VAL."
-  ;; A `face' property can be either a face name (a symbol), or a face
-  ;; property list like (:foreground "red" :inherit default),
-  ;; or a list of such things.
-  ;; FIXME: This should probably be shared to some extent with
-  ;; `add-face-text-property'.
-  (if (or (not (listp val)) (keywordp (car val)))
-      val
-    (copy-sequence val)))
-
 (defun face-attrs--make-indirect-safe ()
   "Deep-copy the buffer's `face-remapping-alist' upon cloning the buffer."
   (setq-local face-remapping-alist
-              (mapcar #'face-remap--copy-face face-remapping-alist)))
+              (mapcar #'copy-tree face-remapping-alist)))
 
 (add-hook 'clone-indirect-buffer-hook #'face-attrs--make-indirect-safe)
 



reply via email to

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