From 2c6bd8fa09eb07e05d768702553f2ef53a6fa198 Mon Sep 17 00:00:00 2001 From: Christophe Raffalli Date: Tue, 20 Feb 2001 09:33:06 +0000 Subject: *** empty log message *** --- phox/phox-fun.el | 45 +++++++++++++++++++++++++++++++++++++-------- phox/phox-tags.el | 22 +++++++++++++++------- phox/phox.el | 17 ++++++++++++++--- 3 files changed, 66 insertions(+), 18 deletions(-) (limited to 'phox') diff --git a/phox/phox-fun.el b/phox/phox-fun.el index 649c18ca..6cf8fc4b 100644 --- a/phox/phox-fun.el +++ b/phox/phox-fun.el @@ -61,15 +61,16 @@ ) -(defun phox-init-syntax-table () - "Set appropriate values for syntax table in current buffer." +(defun phox-init-syntax-table (&optional TABLE) + "Set appropriate values for syntax table in current buffer, +or for optional argument TABLE." ;; useful for using forward-word - (modify-syntax-entry ?_ "w") - (modify-syntax-entry ?\. "w") + (modify-syntax-entry ?_ "w" TABLE) + (modify-syntax-entry ?\. "w" TABLE) ;; Configure syntax table for block comments - (modify-syntax-entry ?\* ". 23") - (modify-syntax-entry ?\( "()1") - (modify-syntax-entry ?\) ")(4") + (modify-syntax-entry ?\* ". 23" TABLE) + (modify-syntax-entry ?\( "()1" TABLE) + (modify-syntax-entry ?\) ")(4" TABLE) ;; à compléter éventuellement ) @@ -349,16 +350,44 @@ ask for a string and possibly a type and send a search command to PhoX for it. stype (nothing for any type, 'a as type parameter) :") (proof-shell-invisible-command (concat "search \"" string "\" " type))) +;; The followings are proof commands (doc in cmd_proof.tex) : + +(defun phox-constraints() +"Interactive function : + send a constraints command to PhoX. + + Prints the constraints which should be fulfilled by unification variables, + only works in proofs." + + +(interactive) +(proof-shell-invisible-command "constraints")) + +(defun phox-goals() +"Interactive function : + send a goals command to PhoX. + + Prints the list of all remaining goals, only works in proofs." + + +(interactive) +(proof-shell-invisible-command "goals")) + +;; menu + (defvar phox-state-menu '("State" ["dependencies of a theorem" phox-depend-theorem t] -["show en extension list" phox-eshow-extlist t] +["show an extension list" phox-eshow-extlist t] ["value of a flag" phox-flag-name t] ["list of all paths" phox-path t] ["print expression" phox-print-expression t] ["print expression with sorts" phox-print-sort-expression t] ["priority of symbols (all if arg. empty)" phox-priority-symbols-list t] ["search for loaded symbols matching string" phox-search-string t] +["------------------" nil nil] +["constraints (proof command)" phox-constraints t] +["goals (proof command)" phox-goals t] ) "Phox menu for informations on state of the system." ) diff --git a/phox/phox-tags.el b/phox/phox-tags.el index c983c347..da91f022 100644 --- a/phox/phox-tags.el +++ b/phox/phox-tags.el @@ -14,7 +14,9 @@ ; Sous xemacs il faut gérer la variable tag-table-alist qui n'existe pas ; sous gnu emacs. -(require 'etags) + +(require 'etags) + (defun phox-tags-add-table(table) "add tags table" @@ -75,13 +77,19 @@ (defun phox-complete-tag() "Complete symbol using tags table. Works with FSF emacs. Problems with xemacs." -;; xemacs build a table for completion, tag-completion-table -;; this table donnot contains key words that use ".", probably a -;; problem with syntax table. - +;; xemacs build a table for completion, tag-completion-table this table +;; donnot contains key words that use ".". There is a problem with +;; syntax-table. In xemacs you need to redefine +;; add-to-tag-completion-table, in order to add your file-type and +;; syntax-table. The modification is very simple, there should be an +;; hook for that. +;; +(interactive) (if proof-running-on-XEmacs - (complete-tag) - (tag-complete-symbol))) + (tag-complete-symbol) + (complete-tag) + ) +) ;; menu diff --git a/phox/phox.el b/phox/phox.el index 42ef5abd..480b3386 100644 --- a/phox/phox.el +++ b/phox/phox.el @@ -73,11 +73,12 @@ :type 'string :group 'phox-config) +(require 'phox-fun) +(require 'phox-font) (require 'phox-extraction) (require 'phox-tags) (require 'phox-outline) -(require 'phox-font) -(require 'phox-fun) + ;; ----- PhoX specific menu @@ -135,6 +136,8 @@ font-lock-keywords phox-font-lock-keywords ) (phox-init-syntax-table) +;; the following is only useful for xemacs + (define-key phox-mode-map [(meta ?.)] 'phox-complete-tag) ) (defun phox-shell-config () @@ -220,7 +223,15 @@ (setq proof-mode-for-response 'phox-response-mode) (setq proof-mode-for-goals 'phox-goals-mode)) -(set-variable 'phox-completion-table +; completions +; dans completions.el +;(setq completion-min-length 6) +;(setq completion-prefix-min-length 3) les mots de moins de 6 caractères +; ne sont pas pris en compte. Les prefixes de moins de 3 caractères ne +; sont pas non plus pris en compte. + +; (set-variable 'phox-completion-table +(defpgdefault completion-table (append phox-top-keywords phox-proof-keywords) ) -- cgit v1.2.3