[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dict-tree 47f8163 010/154: Made saving dictionaries to
From: |
Stefan Monnier |
Subject: |
[elpa] externals/dict-tree 47f8163 010/154: Made saving dictionaries to compiled or uncomiled forms a customization option. |
Date: |
Mon, 14 Dec 2020 12:21:33 -0500 (EST) |
branch: externals/dict-tree
commit 47f8163f4dd1739da4d34b1d806701ac583aa154
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>
Made saving dictionaries to compiled or uncomiled forms a customization
option.
---
dict-tree.el | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/dict-tree.el b/dict-tree.el
index 5668fc5..b6793a7 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -2,7 +2,7 @@
;;; dict-tree.el --- dictionary data structure package
-;; Copyright (C) 2004-2006 Toby Cubitt
+;; Copyright (C) 2004-2008 Toby Cubitt
;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
;; Version: 0.11
@@ -1572,7 +1572,7 @@ line is in wrong format."
-(defun dictree-save-modified (&optional dict ask)
+(defun dictree-save-modified (&optional dict ask compilation)
"Save all modified dictionaries that have a non-nil autosave flag.
If optional argument DICT is a list of dictionaries or a single
@@ -1582,8 +1582,11 @@ dictionaries, irrespective of their autosave flag.
Interactively,
this can be set by supplying a prefix argument.
If optional argument ASK is non-nil, ask for confirmation before
-saving. Interactively, ASK is the prefix argument."
- (interactive "P")
+saving.
+
+Optional argument COMPILATION determines whether to save the
+dictionaries in compiled or uncompiled form. The default is to
+save both forms. See `dictree-write'."
;; sort out DICT argument
(cond
@@ -1601,16 +1604,19 @@ saving. Interactively, ASK is the prefix argument."
(or (not ask)
(y-or-n-p (format "Save modified dictionary %s? "
(dictree--filename dic)))))
- (dictree-save dic)
+ (dictree-save dic compilation)
(dictree--set-modified dic nil)))
)
-(defun dictree-save (dict)
+(defun dictree-save (dict &optional compilation)
"Save dictionary DICT to it's associated file.
-Use `dictree-write' to save to a different file."
- (interactive (list (read-dict "Dictionary to save: ")))
+Use `dictree-write' to save to a different file.
+
+Optional argument COMPILATION determines whether to save the
+dictionary in compiled or uncompiled form. The default is to save
+both forms. See `dictree-write'."
(let* ((filename (dictree--filename dict)))
@@ -1626,7 +1632,7 @@ Use `dictree-write' to save to a different file."
(if (string= filename "")
(message "Dictionary %s NOT saved" (dictree--name dict))
;; otherwise write dictionary to file without requiring confirmation
- (dictree-write dict filename t)))
+ (dictree-write dict filename t compilation)))
)
@@ -1652,10 +1658,6 @@ symbol 'uncompiled, only the uncompiled version will be
created.
Interactivley, DICT and FILENAME are read from the minibuffer,
and OVERWRITE is the prefix argument."
- (interactive (list (read-dict "Dictionary to write: ")
- (read-file-name "File to write to: ")
- current-prefix-arg))
-
(let (dictname buff tmpfile)
;; add .el(c) extension to the filename if not already there
(cond
- [elpa] branch externals/dict-tree created (now 9242ff7), Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree ae0dc0e 001/154: Version 0.10 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree d86829b 007/154: Fixed bugs in predictive's auto-learn and which dict mode features., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 47f8163 010/154: Made saving dictionaries to compiled or uncomiled forms a customization option.,
Stefan Monnier <=
- [elpa] externals/dict-tree 9e6d0f2 017/154: Fixed bug when deleting non-existent entries., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 4cd369d 027/154: Avoid breaking setf abstraction in dictree--wrap-insfun., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 9827131 016/154: Fixed unwrapped rank-function bug in dictree--query, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 87bb7e8 019/154: Allow custom write and load functions when saving and dumping dictionaries;, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 2978fc7 024/154: ...and already a bug-fix to the new cache updating code, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 7d9b258 033/154: Improved handling of dictionary file names in dictree-load, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree f46da76 008/154: Minor bug fixes., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 405d11b 023/154: Implemented the other cache and cache-update policies, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 57d59eb 021/154: Bug-fixes to predictive-auto-learn and read-dict., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 76140ec 026/154: Converted function wrapping macros into functions, Stefan Monnier, 2020/12/14