Files
.emacs.d/modules/editor/siren-display-fill-column.el
Jim Myhrberg fe6a4e7ce5 fix(elisp): add lexical-binding comment to all files to suppress new Emacs 31 warnings
I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress
the warnings introduced in Emacs 31 requiring all elisp files to have a
`lexical-binding` comment.

This retains the default behavior of dynamic binding when no
`lexical-binding` comment is present. With it set to `t` across the
board, various things break, and fixing those is a task for another day.
2025-06-29 12:23:03 +01:00

45 lines
1.3 KiB
EmacsLisp

;;; siren-display-fill-column.el --- jimeh's Emacs Siren: fill-column configuration. -*- lexical-binding: nil; -*-
;;; Commentary:
;; Basic configuration for fill-column.
;;; Code:
;; Emacs 27.x and later: Use native display-fill-column-indicator
(when (not (version< emacs-version "27.0"))
(use-package display-fill-column-indicator
:straight (:type built-in)
:hook
(prog-mode . display-fill-column-indicator-mode)
:custom
(display-fill-column-indicator-character ?\u2502))
(defun siren-display-fill-column (&optional arg)
"Activate or deactivate visual fill column.
Optional ARG is passed directly to mode toggle function."
(interactive)
(display-fill-column-indicator-mode arg)))
;; Emacs 26.x: Use fill-column-indicator package
(when (version< emacs-version "27.0")
(use-package fill-column-indicator
:hook
(prog-mode . fci-mode)
:custom
(fci-handle-line-move-visual nil)
(fci-handle-truncate-lines nil)
(fci-rule-width 1))
(defun siren-display-fill-column (&optional arg)
"Activate or deactivate visual fill column.
Optional ARG is passed directly to mode toggle function."
(interactive)
(fci-mode (or arg t))))
(provide 'siren-display-fill-column)
;;; siren-display-fill-column.el ends here