diff options
Diffstat (limited to 'phox/phox-tags.el')
-rw-r--r-- | phox/phox-tags.el | 66 |
1 files changed, 20 insertions, 46 deletions
diff --git a/phox/phox-tags.el b/phox/phox-tags.el index c62fe331..4851eb8c 100644 --- a/phox/phox-tags.el +++ b/phox/phox-tags.el @@ -21,29 +21,15 @@ (defun phox-tags-add-table(table) "add tags table" (interactive "D directory, location of a file named TAGS to add : ") - (if (featurep 'xemacs) - (let ((association (cons buffer-file-name table))) - (if (member association tag-table-alist) - (message "%s already loaded." table) - (setq tag-table-alist (cons association tag-table-alist)))) - ; gnu emacs - (if (member table tags-table-list) - (message "%s already loaded." table) -; (make-local-variable 'tags-table-list) ; ne fonctionne pas - (setq tags-table-list (cons table tags-table-list)) - ) - ) - ) + (if (member table tags-table-list) + (message "%s already loaded." table) + ;; (make-local-variable 'tags-table-list) ; ne fonctionne pas + (setq tags-table-list (cons table tags-table-list)))) (defun phox-tags-reset-table() "Set tags-table-list to nil." (interactive) -; (make-local-variable 'tags-table-list) - (if (featurep 'xemacs) - (progn - (setq tag-table-alist (remassoc buffer-file-name tag-table-alist))) - (setq tags-table-list nil)) - ) + (setq tags-table-list nil)) (defun phox-tags-add-doc-table() "Add tags in text documentation." @@ -75,37 +61,25 @@ (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 ".". 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 (featurep 'xemacs) - (tag-complete-symbol) - (complete-tag) - ) -) + "Complete symbol using tags table." + (interactive) + (complete-tag)) ;; menu (defvar phox-tags-menu - '("Tags" - ["create a tags table for local buffer" phox-tags-create-local-table t] - ["------------------" nil nil] - ["add table" phox-tags-add-table t] - ["add local table" phox-tags-add-local-table t] - ["add table for libraries" phox-tags-add-lib-table t] - ["add table for text doc" phox-tags-add-doc-table t] - ["reset tags table list" phox-tags-reset-table t] - ["------------------" nil nil] - ["Find theorem, definition ..." find-tag t] - ["complete theorem, definition ..." phox-complete-tag t] - ) + '("Tags" + ["create a tags table for local buffer" phox-tags-create-local-table t] + ["------------------" nil nil] + ["add table" phox-tags-add-table t] + ["add local table" phox-tags-add-local-table t] + ["add table for libraries" phox-tags-add-lib-table t] + ["add table for text doc" phox-tags-add-doc-table t] + ["reset tags table list" phox-tags-reset-table t] + ["------------------" nil nil] + ["Find theorem, definition ..." find-tag t] + ["complete theorem, definition ..." phox-complete-tag t] + ) "Phox menu for dealing with tags" ) |