;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*- ;; ;; Copyright (c) 2010-2022 Sameer Rahmani ;; ;; Author: Sameer Rahmani ;; URL: https://gitlab.com/FG42/FG42 ;; Version: 3.0.0 ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;; ;;; Commentary: ;;; Code: (defvar fg42/modeline-setter #'fg42/default-mode-line-setter) (defvar fg42/default-modeline (list :brief '("hnt |" (buffer-name)) :long " ")) (defun fg42/default-mode-line-setter (_) "Set the modeline definition in X to the `fg42-modeline'." (setq mode-line-format (plist-get fg42/default-modeline :brief))) (defun fg42/setup-modeline-format (definition) "Setup the modeline by calling the setter function and passing the DEFINITION." (funcall fg42/modeline-setter definition)) (defmacro defmode-line (name body) `(defvar ,name ,@body)) (provide 'fg42/modeline) ;;; modeline.el ends here