[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 123fb2b670 18/27: Put all faces in denote-faces.
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 123fb2b670 18/27: Put all faces in denote-faces.el |
Date: |
Sun, 3 Jul 2022 00:57:35 -0400 (EDT) |
branch: externals/denote
commit 123fb2b67088e98f675373b5d02b75f4d4a36f79
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Put all faces in denote-faces.el
This will help us decouple the backlinks' buffer from denote-dired-mode.
---
denote-dired.el | 61 +++++++-------------------------------
denote-faces.el | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 102 insertions(+), 51 deletions(-)
diff --git a/denote-dired.el b/denote-dired.el
index 54a83c0805..b607e3d02a 100644
--- a/denote-dired.el
+++ b/denote-dired.el
@@ -354,60 +354,19 @@ appropriate."
;;;; Extra fontification
-(defface denote-dired-field-date
- '((((class color) (min-colors 88) (background light))
- :foreground "#00538b")
- (((class color) (min-colors 88) (background dark))
- :foreground "#00d3d0")
- (t :inherit font-lock-variable-name-face))
- "Face for file name date in `dired-mode' buffers."
- :group 'denote-dired)
-
-(defface denote-dired-field-time
- '((t :inherit denote-dired-field-date))
- "Face for file name time in `dired-mode' buffers."
- :group 'denote-dired)
-
-(defface denote-dired-field-title
- '((t ))
- "Face for file name title in `dired-mode' buffers."
- :group 'denote-dired)
-
-(defface denote-dired-field-extension
- '((t :inherit shadow))
- "Face for file extension type in `dired-mode' buffers."
- :group 'denote-dired)
-
-(defface denote-dired-field-keywords
- '((default :inherit bold)
- (((class color) (min-colors 88) (background light))
- :foreground "#8f0075")
- (((class color) (min-colors 88) (background dark))
- :foreground "#f78fe7")
- (t :inherit font-lock-builtin-face))
- "Face for file name keywords in `dired-mode' buffers."
- :group 'denote-dired)
-
-(defface denote-dired-field-delimiter
- '((((class color) (min-colors 88) (background light))
- :foreground "gray70")
- (((class color) (min-colors 88) (background dark))
- :foreground "gray30")
- (t :inherit shadow))
- "Face for file name delimiters in `dired-mode' buffers."
- :group 'denote-dired)
+(require 'denote-faces)
(defconst denote-dired-font-lock-keywords
- `((,(concat "\\(?:.*/\\)?" denote--file-regexp)
- (1 'denote-dired-field-date)
- (2 'denote-dired-field-time)
- (3 'denote-dired-field-delimiter)
- (4 'denote-dired-field-title)
- (5 'denote-dired-field-delimiter)
- (6 'denote-dired-field-keywords)
- (7 'denote-dired-field-extension))
+ `((,denote--file-regexp
+ (1 'denote-faces-date)
+ (2 'denote-faces-time)
+ (3 'denote-faces-delimiter)
+ (4 'denote-faces-title)
+ (5 'denote-faces-delimiter)
+ (6 'denote-faces-keywords)
+ (7 'denote-faces-extension))
("_"
- (0 'denote-dired-field-delimiter t)))
+ (0 'denote-faces-delimiter t)))
"Keywords for fontification.")
;;;###autoload
diff --git a/denote-faces.el b/denote-faces.el
new file mode 100644
index 0000000000..2a5e32f1d4
--- /dev/null
+++ b/denote-faces.el
@@ -0,0 +1,92 @@
+;;; denote-faces.el --- Faces and fontification rules for Denote -*-
lexical-binding: t -*-
+
+;; Copyright (C) 2022 Free Software Foundation, Inc.
+
+;; Author: Protesilaos Stavrou <info@protesilaos.com>
+;; Maintainer: Denote Development <~protesilaos/denote@lists.sr.ht>
+;; URL: https://git.sr.ht/~protesilaos/denote
+;; Version: 0.1.0
+;; Package-Requires: ((emacs "27.2"))
+
+;; This file is NOT part of GNU Emacs.
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Used internally by Denote to fontify file names in Dired, the
+;; backlinks' buffer, and related.
+
+;;; Code:
+
+(defgroup denote-faces ()
+ "Faces for Denote."
+ :group 'denote)
+
+(defface denote-faces-subdirectory
+ '((t :inherit bold))
+ "Face for subdirectory of file name.
+This should only ever needed in the backlinks' buffer (or
+equivalent), not in Dired."
+ :group 'denote-faces)
+
+(defface denote-faces-date
+ '((((class color) (min-colors 88) (background light))
+ :foreground "#00538b")
+ (((class color) (min-colors 88) (background dark))
+ :foreground "#00d3d0")
+ (t :inherit font-lock-variable-name-face))
+ "Face for file name date in Dired buffers.
+This is the part of the identifier that covers the year, month,
+and day."
+ :group 'denote-faces)
+
+(defface denote-faces-time
+ '((t :inherit denote-faces-date))
+ "Face for file name time in Dired buffers.
+This is the part of the identifier that covers the hours, minutes,
+and seconds."
+ :group 'denote-faces)
+
+(defface denote-faces-title
+ '((t ))
+ "Face for file name title in Dired buffers."
+ :group 'denote-faces)
+
+(defface denote-faces-extension
+ '((t :inherit shadow))
+ "Face for file extension type in Dired buffers."
+ :group 'denote-faces)
+
+(defface denote-faces-keywords
+ '((default :inherit bold)
+ (((class color) (min-colors 88) (background light))
+ :foreground "#8f0075")
+ (((class color) (min-colors 88) (background dark))
+ :foreground "#f78fe7")
+ (t :inherit font-lock-builtin-face))
+ "Face for file name keywords in Dired buffers."
+ :group 'denote-faces)
+
+(defface denote-faces-delimiter
+ '((((class color) (min-colors 88) (background light))
+ :foreground "gray70")
+ (((class color) (min-colors 88) (background dark))
+ :foreground "gray30")
+ (t :inherit shadow))
+ "Face for file name delimiters in Dired buffers."
+ :group 'denote-faces)
+
+(provide 'denote-faces)
+;;; denote-faces.el ends here
- [elpa] externals/denote e5d6ad589b 13/27: Support subdirectories in denote--link-find-file-at-button, (continued)
- [elpa] externals/denote e5d6ad589b 13/27: Support subdirectories in denote--link-find-file-at-button, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 53e6ca2299 12/27: Tweak filename fontification to work with subdirs, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 58637a0035 04/27: Tweak doc string, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 8c724d54cf 01/27: Support subdirectories, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 12008dbcbf 11/27: Untabify a line, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 01618516ff 07/27: Refine denote--file-name-relative-to-denote-directory, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 070d4412ee 23/27: Set org-id-extra-files to all files in all subdirectories., ELPA Syncer, 2022/07/03
- [elpa] externals/denote add8f657bb 09/27: Merge pull request #25 from ggjp/subdir-support, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 5f8b585349 22/27: Merge branch 'main' into subdir-support, ELPA Syncer, 2022/07/03
- [elpa] externals/denote e1aeb459ea 19/27: Refine how faces are applied (extends 123fb2b), ELPA Syncer, 2022/07/03
- [elpa] externals/denote 123fb2b670 18/27: Put all faces in denote-faces.el,
ELPA Syncer <=
- [elpa] externals/denote 66e455ef84 14/27: Fix denote--current-file-is-note-p for subdirectories, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 6dfb9376ca 24/27: Merge pull request #28 from ggjp/subdir-support, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 25e86bf0bc 27/27: Update Acknowledgements in the manual, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 303f39e150 15/27: Merge pull request #26 from ggjp/subdir-support, ELPA Syncer, 2022/07/03
- [elpa] externals/denote c020d25a21 08/27: Fix denote-link--ol-resolve-link-to-target, ELPA Syncer, 2022/07/03
- [elpa] externals/denote ab2a6e538a 03/27: Use 'when' instead of 'if' for single condition, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 0116edc2f8 25/27: Remove sharp quote from lambda for simplicity, ELPA Syncer, 2022/07/03
- [elpa] externals/denote c68a8e224a 17/27: Tweak denote--get-note-path-by-id for style, ELPA Syncer, 2022/07/03
- [elpa] externals/denote d2f14291bf 06/27: Move let bound filter into its own function, ELPA Syncer, 2022/07/03
- [elpa] externals/denote 2aaf0f56d1 05/27: Add regexp to match only note file names, ELPA Syncer, 2022/07/03