[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2cb1de6 06/11: Fix/enhance interactive declarations, this
From: |
Ingo Lohmar |
Subject: |
[elpa] master 2cb1de6 06/11: Fix/enhance interactive declarations, this fixes #1 |
Date: |
Sun, 02 Aug 2015 14:43:04 +0000 |
branch: master
commit 2cb1de61b868e88f2a2f5594f920aba12b747607
Author: Ingo Lohmar <address@hidden>
Commit: Ingo Lohmar <address@hidden>
Fix/enhance interactive declarations, this fixes #1
---
wconf.el | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/wconf.el b/wconf.el
index ce39cb1..242e11b 100644
--- a/wconf.el
+++ b/wconf.el
@@ -124,7 +124,7 @@ position INDEX."
(defun wc-save (&optional filename)
"Save stored configurations in FILENAME, defaults to `wc-file'."
- (interactive)
+ (interactive "F")
(let ((filename (or filename wc-file)))
(with-temp-file filename
(prin1 (mapcar #'cdr wc--configs) ;-> (wc name)
@@ -151,7 +151,7 @@ position INDEX."
;;;###autoload
(defun wc-load (&optional filename)
"Load stored configurations from FILENAME, defaults to `wc-file'."
- (interactive)
+ (interactive "f")
(let ((filename (or filename wc-file)))
(unless (file-readable-p filename)
(error "wc: Cannot read file %s" filename))
@@ -173,8 +173,12 @@ position INDEX."
;;;###autoload
(defun wc-create (&optional new)
"Clone the current configuration or create a new \"empty\"
-one. The new configuration is appended to the list and becomes active."
- (interactive)
+one. The new configuration is appended to the list and becomes active.
+
+With optional prefix argument NEW, or if there are no
+configurations yet, create a new configuration from the current
+window config."
+ (interactive "P")
(wc--update-active-config)
(setq wc--configs
(append wc--configs
@@ -212,7 +216,8 @@ one. The new configuration is appended to the list and
becomes active."
(defun wc-swap (i j)
"Swap configurations at positions I and J."
- (interactive)
+ (interactive (list wc--index
+ (read-number "Swap current config with index: ")))
(wc--update-active-config)
(let ((wc (wc- i)))
(setf (nth i wc--configs) (wc- j))
@@ -278,13 +283,15 @@ one. The new configuration is appended to the list and
becomes active."
(defun wc-switch-to-config (index &optional force)
"Change to current config INDEX."
(interactive "p")
- ;; remember active config (w/o name etc)
- (wc--update-active-config)
- ;; maybe use new configuration
- (when (or (not (eq wc--index index))
- force)
- (wc--use-config index))
- (message "wc: Switched to configuration %s" (wc--to-string index)))
+ (let ((index (or index
+ (read-number "Switch to config number: "))))
+ ;; remember active config (w/o name etc)
+ (wc--update-active-config)
+ ;; maybe use new configuration
+ (when (or (not (eq wc--index index))
+ force)
+ (wc--use-config index))
+ (message "wc: Switched to configuration %s" (wc--to-string index))))
(defun wc-use-previous ()
"Switch to previous window configuration."
- [elpa] master updated (6340c15 -> 43c8384), Ingo Lohmar, 2015/08/02
- [elpa] master 5f9ee38 04/11: Check file can be read, Ingo Lohmar, 2015/08/02
- [elpa] master dcce243 03/11: Update README and docstring, Ingo Lohmar, 2015/08/02
- [elpa] master 3bc4e13 02/11: Add a README, Ingo Lohmar, 2015/08/02
- [elpa] master facc191 01/11: Initial commit, Ingo Lohmar, 2015/08/02
- [elpa] master 8f3160b 07/11: Fix missing dependency on cl-lib, Ingo Lohmar, 2015/08/02
- [elpa] master 2cb1de6 06/11: Fix/enhance interactive declarations, this fixes #1,
Ingo Lohmar <=
- [elpa] master e5f23d1 05/11: Only deal with window configurations now, update doc, Ingo Lohmar, 2015/08/02
- [elpa] master b8ea22f 10/11: Bump version and copyright, Ingo Lohmar, 2015/08/02
- [elpa] master ae106c9 08/11: Make interactive functions more robust/friendly, Ingo Lohmar, 2015/08/02
- [elpa] master f67e959 09/11: Use "wconf" as package and filename prefix, Ingo Lohmar, 2015/08/02
- [elpa] master 43c8384 11/11: Add 'packages/wconf/' from commit 'b8ea22f80bff19222136d9495f685888dc682b9d', Ingo Lohmar, 2015/08/02