aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Aspinall2000-05-16 10:05:53 +0000
committerDavid Aspinall2000-05-16 10:05:53 +0000
commit83e262c909179fca5a3c328bd867e18fd999561a (patch)
treeef7d4c4a3817830bdaa7f442f9a6e3e7e3b05c8d
parent9142ab64cf5699436c4cfae93e6ff9d5d8ef8c99 (diff)
Fixes for defining favourites, added warning for pre-release users.
-rw-r--r--generic/proof-menu.el29
1 files changed, 17 insertions, 12 deletions
diff --git a/generic/proof-menu.el b/generic/proof-menu.el
index 77e77a61..8bd23456 100644
--- a/generic/proof-menu.el
+++ b/generic/proof-menu.el
@@ -275,13 +275,16 @@ KEY is the optional key binding
This function defines a function and returns a menu entry
suitable for adding to the proof assistant menu."
(interactive
- (list
- (read-string (concat "Command to send to " proof-assistant ": ") nil
- proof-make-favourite-cmd-history)
- (y-or-n-p "Should command be recorded in script? ")
- (read-string "Name of command on menu: ")
- (if (y-or-n-p "Set a keybinding for this command? : ")
- (read-key-sequence "Type the key to use (I recommend C-c C-a <key>): " nil t))))
+ (let*
+ ((cmd (read-string
+ (concat "Command to send to " proof-assistant ": ") nil
+ proof-make-favourite-cmd-history))
+ (ins (y-or-n-p "Should command be recorded in script? "))
+ (men (read-string "Name of command on menu: " cmd))
+ (key (if (y-or-n-p "Set a keybinding for this command? : ")
+ (read-key-sequence
+ "Type the key to use (I recommend C-c C-a <key>): " nil t))))
+ (list cmd ins men key)))
(let* ((menunames (split-string (downcase menuname)))
(menuname-sym (proof-sym (proof-splice-separator "-" menunames)))
(menu-fn menuname-sym) (i 1))
@@ -290,11 +293,11 @@ suitable for adding to the proof assistant menu."
"-" (int-to-string i))))
(incf i))
(if inscript
- `(proof-defshortcut ,menu-fn ,command ,key)
- `(proof-definvisible ,menu-fn ,command ,key))
+ (eval `(proof-defshortcut ,menu-fn ,command ,key))
+ (eval `(proof-definvisible ,menu-fn ,command ,key)))
(let ((menu-entry (vector menuname menu-fn t)))
- (customize-save-variable 'proof-assistant-menu-entries
- (append proof-assistant-menu-entries
+ (customize-save-variable (proof-ass-sym menu-entries)
+ (append (proof-ass menu-entries)
(list menu-entry)))
;; Unfortunately, (easy-menu-add-item proof-assistant-menu nil ..)
;; seems buggy, it adds to main menu. But with "Coq" argument
@@ -304,7 +307,9 @@ suitable for adding to the proof assistant menu."
(easy-menu-add-item proof-assistant-menu
'("Favourites")
menu-entry
- "Add favourite"))))
+ "Add favourite"))
+ (warn
+ "PG: favourites mechanism is work-in-progress, not fully working yet!")))