[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0d17d8d 25/62: Warn before resetting dictionary during pop
From: |
Ian Dunn |
Subject: |
[elpa] master 0d17d8d 25/62: Warn before resetting dictionary during population |
Date: |
Sat, 9 Dec 2017 14:34:00 -0500 (EST) |
branch: master
commit 0d17d8d89b3513cd1161e6ab5927b16cb75529ca
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>
Warn before resetting dictionary during population
* paced.el (paced-populate-warn-about-reset): New defcustom
(paced-repopulate-named-dictionary): Use it.
---
paced.el | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/paced.el b/paced.el
index 1d4a2e6..73e2b04 100644
--- a/paced.el
+++ b/paced.el
@@ -115,6 +115,11 @@ allowing all files."
:group 'paced
:type 'boolean)
+(defcustom paced-populate-warn-about-reset t
+ "Whether to warn the user about resetting a dictionary when repopulating."
+ :group 'paced
+ :type 'boolean)
+
(defun paced--default-dictionary-sort-func (usage-hash)
@@ -885,13 +890,15 @@ repopulating it."
Population commands are stored in the field of the same name.
Note that this will empty the dictionary's contents before
-repopulating it."
+repopulating it. If `paced-populate-warn-about-reset' is
+non-nil, confirmation will be requested before continuing."
(interactive
(list (paced-read-dictionary)))
(paced-ensure-registered key)
(let ((dict (paced-named-dictionary key)))
- ;; TODO: Warn about reset.
- (paced-dictionary-repopulate dict)))
+ (when (or (not paced-populate-warn-about-reset)
+ (y-or-n-p "Warning: Repopulating dictionary will reset it.
Continue?"))
+ (paced-dictionary-repopulate dict))))
(defun paced-add-buffer-file-to-dictionary (&optional buffer)
"Populate the dictionary of BUFFER with BUFFER.
- [elpa] master 38979b5 18/62: Fixed up contributing documentation, (continued)
- [elpa] master 38979b5 18/62: Fixed up contributing documentation, Ian Dunn, 2017/12/09
- [elpa] master 4162bd4 22/62: Changed name of registered checker, Ian Dunn, 2017/12/09
- [elpa] master 302d4b4 28/62: Added convenience method for adding population commands, Ian Dunn, 2017/12/09
- [elpa] master 4824306 21/62: Make the registered dictionary map a hash table, Ian Dunn, 2017/12/09
- [elpa] master e751e4f 24/62: Update case-handling slot name in Documentation, Ian Dunn, 2017/12/09
- [elpa] master dada473 19/62: Push of info page, Ian Dunn, 2017/12/09
- [elpa] master 6e7d6d7 29/62: Updated method names in paced-repopulate-dictionary-async, Ian Dunn, 2017/12/09
- [elpa] master ce7a2be 20/62: Changed case-sensitivity to case-handling, Ian Dunn, 2017/12/09
- [elpa] master 35ba53b 26/62: Autoload paced-repopulate-named-dictionary-async, Ian Dunn, 2017/12/09
- [elpa] master 6e8acdf 09/62: Added documentation, Ian Dunn, 2017/12/09
- [elpa] master 0d17d8d 25/62: Warn before resetting dictionary during population,
Ian Dunn <=
- [elpa] master 6aefb0b 05/62: Made dictionary names strings, Ian Dunn, 2017/12/09
- [elpa] master bda0995 36/62: Remove inaccurate comment about completion in case-handling slot, Ian Dunn, 2017/12/09
- [elpa] master 7c9a342 39/62: Fixed paced-global-dict-enable-alist value type, Ian Dunn, 2017/12/09
- [elpa] master 8f1860a 37/62: Documentation fixes, Ian Dunn, 2017/12/09
- [elpa] master b95b016 38/62: Pushed updated info pages, Ian Dunn, 2017/12/09
- [elpa] master 964eb48 42/62: Fixed bug in completion, Ian Dunn, 2017/12/09
- [elpa] master 23c4a65 48/62: Mention common variables in population commands settings, Ian Dunn, 2017/12/09
- [elpa] master e293378 50/62: Fix completion falling back to other backend, Ian Dunn, 2017/12/09
- [elpa] master 3cd1147 45/62: Add IDs and descriptions for Contributing section, Ian Dunn, 2017/12/09
- [elpa] master 158ff71 56/62: Fixed internal links in documentation, Ian Dunn, 2017/12/09