Skip to content

Commit

Permalink
Fix: (bufler-define-column) Pcase binding form
Browse files Browse the repository at this point in the history
I have no explanation for why that binding form fails to expand
properly on Emacs 27, yet works on 26.3 and 28.0.50.  See
<#70>.

Fixes #70.  Thanks to @rmolinari and Siddharth N. (@iffsid) for their
help.
  • Loading branch information
alphapapa committed Sep 7, 2021
1 parent 76afc5e commit 5d7cd93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bufler.el
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,10 @@ PLIST may be a plist setting the following options:
(declare (indent defun))
(cl-check-type name string)
(pcase-let* ((fn-name (intern (concat "bufler-column-format-" (downcase name))))
((map :face :max-width) plist)
;; NOTE: Emacs 27 inexplicably fails to expand this `pcase' binding form correctly at compile time,
;; so we use the more explicit form. See <https://github.com/alphapapa/bufler.el/issues/70>.
;; ((map :face :max-width) plist)
((map (:face face) (:max-width max-width)) plist)
(max-width-variable (intern (concat "bufler-column-" name "-max-width")))
(max-width-docstring (format "Maximum width of the %s column." name)))
`(progn
Expand Down

0 comments on commit 5d7cd93

Please sign in to comment.