From 81839a8f06ef8d810b4772d867438f05acb5a7a1 Mon Sep 17 00:00:00 2001 From: John Connors Date: Mon, 7 Apr 2008 22:50:08 +0100 Subject: [PATCH] Minor bugfixes. --- ectags.el | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/ectags.el b/ectags.el index ec2c684..6b18c06 100644 --- a/ectags.el +++ b/ectags.el @@ -219,7 +219,7 @@ (make-shell-command-prefix directory)) (shell-command-suffix (concat " | " ectags-command " -o " (make-tag-file-name directory) " --options=" - (expand-file-name ectags-config-file) " --verbose --excmd=n --extra=+fq --fields=+afiKlmnsSz -L -"))) + (expand-file-name ectags-config-file) " --verbose --excmd=n --extra=+fq --fields=+afiKlmnsSzt --file-scope=no -L -"))) (concat shell-command-prefix (car suffix-clauses) (apply 'concat @@ -237,7 +237,6 @@ ;; prompt for directory (let ((tag-directory (read-directory-name "Directory to tag? " default-directory)) - ;; prompt for langage -- to do -- multiple langages per dir? (tag-languages (completing-read "Languages to tag? " ectags-language-file-suffix-alist nil nil))) (add-to-list 'compilation-error-regexp-alist '("^\\([^:]+\\) confusing argument declarations beginning at line \\([0-9]+\\))" 1 2)) @@ -400,7 +399,7 @@ (defun ectags-verify-table (file) "Given a file, read it in to a buffer and validate it as a tags table." (save-excursion -;; (message "Validating tags table %s " file) + (message "Validating tags table %s " file) (if (get-file-buffer file) (progn (set-buffer (get-file-buffer file)) @@ -687,6 +686,7 @@ plonk it in the match candidates." (defun ectags-select-goto-tag () "Goto the tag we currently have the point over in an ectags select mode window" + (interactive) (let ((case-fold-search (not *ectags-case-sensitive*))) (save-excursion (goto-char (point-min)) @@ -738,16 +738,6 @@ plonk it in the match candidates." (message (concat "Couldn't find tag number " tag-num)) (ding)))) -(defun ectags-select-by-tag-number (first-digit) - (let ((tag-num (read-from-minibuffer "Tag number? " first-digit)) - (current-point (point))) - (goto-char (point-min)) - (if (re-search-forward (concat "^<" tag-num ">") nil t) -;; TODO -- need to push tag and close window - (ectags-select-goto-tag) - (goto-char current-point) - (message (concat "Couldn't find tag number " tag-num)) - (ding)))) ;; user commands ------------------------------------------------------------------------------------------------------ @@ -852,10 +842,10 @@ to do." (defun ectags-eldoc-print-current-symbol-info () "Print the ectags info associated with the current eldoc symbol" (let* ((eldoc-sym (c-eldoc-function (- (point) 1000)))) - (seek-ectag (format scope-format eldoc-scope eldoc-sym) 'find-ectag)) + (seek-ectag eldoc-sym 'find-ectag) (if (> (length *ectags-matches*) 0) (ectags-match-tag-info (car *ectags-matches*)) - (format "Unknown %s " eldoc-sym))) + (format "Unknown %s " eldoc-sym)))) ;; scoped version for cpp and the like : tries to find symbol in current scope first ;; scope format is a format string that concatenates the cureend scope and the symbol with the scope operator @@ -872,7 +862,9 @@ to do." (progn (seek-ectag eldoc-sym 'find-ectag) (if (> (length *ectags-matches*) 0) - (format "%s %s" eldoc-sym (ectags-match-tag-info (car *ectags-matches*))) + (format "%s %s" eldoc-sym (ectags-match-tag-info (car *ectags-matches*))) + (if eldoc-scope + (format "Scope %s " eldoc-scope)) (format "Unknown %s " eldoc-sym))))))) ;;;###autoload -- 2.11.4.GIT