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

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

[elpa] externals/ebdb 06123d9 217/350: Make sure database files are deco


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 06123d9 217/350: Make sure database files are decoded as utf-8-emacs
Date: Mon, 14 Aug 2017 11:46:39 -0400 (EDT)

branch: externals/ebdb
commit 06123d97683c2b02609cf5846de42ceb3ee355a3
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Make sure database files are decoded as utf-8-emacs
    
    Addresses #35
    
    * ebdb.el (ebdb-load): Database objects will be loaded correctly no
      matter what, this only affects the case where someone visits a
      database persistence file directly.
---
 ebdb.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ebdb.el b/ebdb.el
index 75614f9..b0e2975 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -4423,6 +4423,15 @@ important work is done by the `ebdb-db-load' method."
     (message "Initializing EBDB records... done")
     ;; Users will expect the same ordering as `ebdb-sources'
     (setq ebdb-db-list (nreverse ebdb-db-list))
+    ;; If users look at the database files, they should be read as
+    ;; utf-8-emacs.
+    (push
+     (cons
+      (regexp-opt (mapcar (lambda (db)
+                           (slot-value db 'file))
+                         ebdb-db-list))
+      'utf-8-emacs)
+     auto-coding-alist)
     (run-hooks 'ebdb-after-load-hook)
     (when ebdb-use-diary
       (add-hook 'diary-list-entries-hook #'ebdb-diary-add-entries))



reply via email to

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