emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/vcard 3a63482 5/6: [vcard] Move vcard-mode into main vc


From: Stefan Monnier
Subject: [elpa] externals/vcard 3a63482 5/6: [vcard] Move vcard-mode into main vcard file, release version 0.1
Date: Tue, 1 Dec 2020 09:58:07 -0500 (EST)

branch: externals/vcard
commit 3a63482059bc6f512c217f655db30d8d679e9427
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    [vcard] Move vcard-mode into main vcard file, release version 0.1
    
    * packages/vcard/vcard.el: Put the major mode here instead.
---
 vcard-mode.el | 61 -----------------------------------------------------------
 vcard.el      | 51 +++++++++++++++++++++++++++++++++++--------------
 2 files changed, 37 insertions(+), 75 deletions(-)

diff --git a/vcard-mode.el b/vcard-mode.el
deleted file mode 100644
index ad6e124..0000000
--- a/vcard-mode.el
+++ /dev/null
@@ -1,61 +0,0 @@
-;;; vcard-mode.el --- Major mode for viewing vCard files  -*- lexical-binding: 
t; -*-
-
-;; Copyright (C) 2019  Free Software Foundation, Inc.
-
-;; Author: Eric Abrahamsen <eric@ericabrahamsen.net>
-;; Maintainer: Eric Abrahamsen <eric@ericabrahamsen.net>
-
-;; 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:
-
-;; This file contains `vcard-mode', for viewing vcard files.
-
-;;; Code:
-
-(require 'vcard)
-
-(defface vcard-property-face
-  '((t :inherit font-lock-function-name-face))
-  "Face for highlighting property names."
-  :group 'vcard)
-
-(defface vcard-parameter-key-face
-  '((t :inherit font-lock-comment-face))
-  "Face for highlighting parameter keys."
-  :group 'vcard)
-
-(defface vcard-parameter-value-face
-  '((t :inherit font-lock-type-face))
-  "Face for highlighting parameter values."
-  :group 'vcard)
-
-(defvar vcard-font-lock-keywords
-  '("BEGIN:VCARD" "END:VCARD"
-    ("^[^ \t;:]+" . 'vcard-property-face)
-    (";\\([^=\n]+\\)=" (1 'vcard-parameter-key-face))
-    ("=\\([^;:\n]+\\)[;:]" (1 'vcard-parameter-value-face))))
-
-;;;###autoload
-(define-derived-mode vcard-mode text-mode "vCard"
-  "Major mode for viewing vCard files."
-  (turn-off-auto-fill)
-  (set (make-local-variable 'paragraph-start) "BEGIN:VCARD")
-  (setq font-lock-defaults '(vcard-font-lock-keywords)))
-
-;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.[Vv][Cc][Ff]\\'" . vcard-mode))
-
-(provide 'vcard-mode)
-;;; vcard-mode.el ends here
diff --git a/vcard.el b/vcard.el
index 2574cd9..69032b6 100644
--- a/vcard.el
+++ b/vcard.el
@@ -1,13 +1,12 @@
-;;; vcard.el --- Utilities for working with vCard files  -*- lexical-binding: 
t; -*-
+;;; vcard.el --- Package for handling vCard files  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2020  Free Software Foundation, Inc.
 
-;; Version: 0
-;; Package-Requires: ((emacs "25.1"))
-
 ;; Author: Eric Abrahamsen <eric@ericabrahamsen.net>
 ;; Maintainer: Eric Abrahamsen <eric@ericabrahamsen.net>
-;; Keywords: mail, comm
+
+;; Version: 0.1
+;; Package-Requires: ((emacs "27.1"))
 
 ;; 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
@@ -24,18 +23,42 @@
 
 ;;; Commentary:
 
-;; This package provides libraries for working with vCard data: files
-;; representing contact information.  At present there are two parts
-;; to it: a major mode for looking at *.vcf files, and a library for
-;; parsing those files into elisp data structures.  The third part,
-;; eventually, will be a library for writing elisp data structures to
-;; *.vcf files.
+;; This file contains `vcard-mode', for viewing vCard files.  Other
+;; files in this package contain functions for parsing and writing
+;; vCard data.
 
 ;;; Code:
 
-(defgroup vcard nil
-  "Customization options for the vcard library."
-  :group 'mail)
+(defface vcard-property-face
+  '((t :inherit font-lock-function-name-face))
+  "Face for highlighting property names."
+  :group 'vcard)
+
+(defface vcard-parameter-key-face
+  '((t :inherit font-lock-comment-face))
+  "Face for highlighting parameter keys."
+  :group 'vcard)
+
+(defface vcard-parameter-value-face
+  '((t :inherit font-lock-type-face))
+  "Face for highlighting parameter values."
+  :group 'vcard)
+
+(defvar vcard-font-lock-keywords
+  '("BEGIN:VCARD" "END:VCARD"
+    ("^[^ \t;:]+" . 'vcard-property-face)
+    (";\\([^=\n]+\\)=" (1 'vcard-parameter-key-face))
+    ("=\\([^;:\n]+\\)[;:]" (1 'vcard-parameter-value-face))))
+
+;;;###autoload
+(define-derived-mode vcard-mode text-mode "vCard"
+  "Major mode for viewing vCard files."
+  (turn-off-auto-fill)
+  (set (make-local-variable 'paragraph-start) "BEGIN:VCARD")
+  (setq font-lock-defaults '(vcard-font-lock-keywords)))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.[Vv][Cc][Ff]\\'" . vcard-mode))
 
 (provide 'vcard)
 ;;; vcard.el ends here



reply via email to

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