Commit 2054a44c authored by Chong Yidong's avatar Chong Yidong
Browse files

* cedet/srecode/map.el (srecode-get-maps):

* cedet/semantic/wisent/wisent.el (wisent-parse-toggle-verbose-flag):
* cedet/semantic/wisent/comp.el (wisent-toggle-verbose-flag):
* cedet/semantic/decorate/mode.el (semantic-decoration-mode)
(semantic-toggle-decoration-style):
* cedet/semantic/decorate/include.el
(semantic-decoration-include-describe)
(semantic-decoration-unknown-include-describe)
(semantic-decoration-unparsed-include-describe)
(semantic-decoration-all-include-summary):
* cedet/semantic/bovine/c.el (semantic-c-debug-mode-init):
* cedet/semantic/analyze/complete.el
(semantic-analyze-possible-completions):
* cedet/semantic/util-modes.el (semantic-highlight-edits-mode)
(semantic-show-unmatched-syntax-mode)
(semantic-show-parser-state-mode, semantic-stickyfunc-mode)
(semantic-highlight-func-mode):
* cedet/semantic/util.el (semantic-describe-buffer):
* cedet/semantic/symref.el (semantic-symref-find-references-by-name)
(semantic-symref-find-tags-by-name)
(semantic-symref-find-tags-by-regexp)
(semantic-symref-find-tags-by-completion)
(semantic-symref-find-file-references-by-name)
(semantic-symref-find-text):
* cedet/semantic/senator.el (senator-copy-tag, senator-kill-tag)
(senator-yank-tag):
* cedet/semantic/scope.el (semantic-calculate-scope):
* cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode):
* cedet/semantic/idle.el (semantic-idle-scheduler-mode)
(define-semantic-idle-service):
* cedet/semantic/complete.el (semantic-complete-analyze-inline)
(semantic-complete-analyze-inline-idle):
* cedet/semantic/analyze.el (semantic-analyze-current-context):
* cedet/mode-local.el (describe-mode-local-bindings)
(describe-mode-local-bindings-in-mode):
* cedet/ede/make.el (ede-make-check-version):
* cedet/ede/locate.el (ede-enable-locate-on-project):
* cedet/cedet-idutils.el (cedet-idutils-expand-filename)
(cedet-idutils-version-check):
* cedet/cedet-global.el (cedet-gnu-global-expand-filename)
(cedet-gnu-global-version-check):
* cedet/cedet-cscope.el (cedet-cscope-expand-filename)
(cedet-cscope-version-check): Use called-interactively-p instead
of interactive-p.
parent e96ec425
2009-11-22 Chong Yidong <cyd@stupidchicken.com>
* cedet/srecode/map.el (srecode-get-maps):
* cedet/semantic/wisent/wisent.el (wisent-parse-toggle-verbose-flag):
* cedet/semantic/wisent/comp.el (wisent-toggle-verbose-flag):
* cedet/semantic/decorate/mode.el (semantic-decoration-mode)
(semantic-toggle-decoration-style):
* cedet/semantic/decorate/include.el
(semantic-decoration-include-describe)
(semantic-decoration-unknown-include-describe)
(semantic-decoration-unparsed-include-describe)
(semantic-decoration-all-include-summary):
* cedet/semantic/bovine/c.el (semantic-c-debug-mode-init):
* cedet/semantic/analyze/complete.el
(semantic-analyze-possible-completions):
* cedet/semantic/util-modes.el (semantic-highlight-edits-mode)
(semantic-show-unmatched-syntax-mode)
(semantic-show-parser-state-mode, semantic-stickyfunc-mode)
(semantic-highlight-func-mode):
* cedet/semantic/util.el (semantic-describe-buffer):
* cedet/semantic/symref.el (semantic-symref-find-references-by-name)
(semantic-symref-find-tags-by-name)
(semantic-symref-find-tags-by-regexp)
(semantic-symref-find-tags-by-completion)
(semantic-symref-find-file-references-by-name)
(semantic-symref-find-text):
* cedet/semantic/senator.el (senator-copy-tag, senator-kill-tag)
(senator-yank-tag):
* cedet/semantic/scope.el (semantic-calculate-scope):
* cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode):
* cedet/semantic/idle.el (semantic-idle-scheduler-mode)
(define-semantic-idle-service):
* cedet/semantic/complete.el (semantic-complete-analyze-inline)
(semantic-complete-analyze-inline-idle):
* cedet/semantic/analyze.el (semantic-analyze-current-context):
* cedet/mode-local.el (describe-mode-local-bindings)
(describe-mode-local-bindings-in-mode):
* cedet/ede/make.el (ede-make-check-version):
* cedet/ede/locate.el (ede-enable-locate-on-project):
* cedet/cedet-idutils.el (cedet-idutils-expand-filename)
(cedet-idutils-version-check):
* cedet/cedet-global.el (cedet-gnu-global-expand-filename)
(cedet-gnu-global-version-check):
* cedet/cedet-cscope.el (cedet-cscope-expand-filename)
(cedet-cscope-version-check): Use called-interactively-p instead
of interactive-p.
* cedet/semantic/ia.el (semantic-ia-completion-format-tag-function):
Use semantic-format-tag-prototype.
......
......@@ -98,7 +98,7 @@ Return a fully qualified filename."
(ans2 (mapcar (lambda (hit)
(expand-file-name (car (split-string hit " "))))
ans1)))
(when (interactive-p)
(when (called-interactively-p 'interactive)
(if ans2
(if (= (length ans2) 1)
(message "%s" (car ans2))
......@@ -133,7 +133,7 @@ return nil."
(rev nil))
(if (not b)
(progn
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "CScope not found."))
nil)
(with-current-buffer b
......@@ -146,7 +146,7 @@ return nil."
(error "Version of CScope is %s. Need at least %s"
rev cedet-cscope-min-version))
;; Else, return TRUE, as in good enough.
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "CScope %s - Good enough for CEDET." rev))
t)))))
......
......@@ -84,7 +84,7 @@ Return a fully qualified filename."
(if (looking-at "global: ")
(error "GNU Global not available")
(split-string (buffer-string) "\n" t)))))
(when (interactive-p)
(when (called-interactively-p 'interactive)
(if ans
(if (= (length ans) 1)
(message "%s" (car ans))
......@@ -122,7 +122,7 @@ return nil."
(rev nil))
(if (not b)
(progn
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "GNU Global not found."))
nil)
(with-current-buffer b
......@@ -135,7 +135,7 @@ return nil."
(error "Version of GNU Global is %s. Need at least %s"
rev cedet-global-min-version))
;; Else, return TRUE, as in good enough.
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "GNU Global %s - Good enough for CEDET." rev))
t)))))
......
......@@ -116,7 +116,7 @@ Return a filename relative to the default directory."
(error "ID Utils not available")
(split-string (buffer-string) "\n" t)))))
(setq ans (mapcar 'expand-file-name ans))
(when (interactive-p)
(when (called-interactively-p 'interactive)
(if ans
(if (= (length ans) 1)
(message "%s" (car ans))
......@@ -154,7 +154,7 @@ return nil."
(rev nil))
(if (not b)
(progn
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "ID Utils not found."))
nil)
(with-current-buffer b
......@@ -167,7 +167,7 @@ return nil."
(error "Version of ID Utils is %s. Need at least %s"
rev cedet-idutils-min-version))
;; Else, return TRUE, as in good enough.
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "ID Utils %s - Good enough for CEDET." rev))
t)))))
......
......@@ -86,18 +86,18 @@ based on `ede-locate-setup-options'."
(while (and opts (not ans))
(when (ede-locate-ok-in-project (car opts) root)
;; If interactive, check with the user.
(when (or (not (interactive-p))
(when (or (not (called-interactively-p 'any))
(y-or-n-p (format "Set project locator to %s? " (car opts))))
(setq ans (car opts))))
(setq opts (cdr opts)))
;; No match? Always create the baseclass for the hashing tool.
(when (not ans)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "Setting locator to ede-locate-base"))
(setq ans 'ede-locate-base))
(oset proj locate-obj (make-instance ans "Loc" :root root))
(when (interactive-p)
(message "Satting locator to %s." ans))
(when (called-interactively-p 'interactive)
(message "Setting locator to %s." ans))
))
;;; LOCATE BASECLASS
......
......@@ -91,7 +91,7 @@ If NOERROR is nil, then throw an error on failure. Return t otherwise."
(setq ans (not (inversion-check-version rev nil ede-make-min-version))))
;; Answer reporting.
(when (and (interactive-p) ans)
(when (and (called-interactively-p 'interactive) ans)
(message "GNU Make version %s. Good enough for CEDET." rev))
(when (and (not noerror) (not ans))
......
......@@ -728,7 +728,7 @@ invoked interactively."
"Display mode local bindings active in BUFFER."
(interactive "b")
(when (setq buffer (get-buffer buffer))
(mode-local-describe-bindings-1 buffer (interactive-p))))
(mode-local-describe-bindings-1 buffer (called-interactively-p 'any))))
(defun describe-mode-local-bindings-in-mode (mode)
"Display mode local bindings active in MODE hierarchy."
......@@ -738,7 +738,7 @@ invoked interactively."
#'(lambda (s) (get s 'mode-local-symbol-table))
t (symbol-name major-mode))))
(when (setq mode (intern-soft mode))
(mode-local-describe-bindings-1 mode (interactive-p))))
(mode-local-describe-bindings-1 mode (called-interactively-p 'any))))
;; ;;; find-func support (Emacs 21.4, or perhaps 22.1)
;; ;;
......
......@@ -504,7 +504,7 @@ if a cached copy of the return object is found."
'current-context
'exit-cache-zone)))
;; Check for interactivity
(when (interactive-p)
(when (called-interactively-p 'any)
(if answer
(semantic-analyze-pop-to-context answer)
(message "No Context."))
......
......@@ -91,7 +91,7 @@ in a buffer."
(error "Nothing to complete")
(:override))))
;; If interactive, display them.
(when (interactive-p)
(when (called-interactively-p 'any)
(with-output-to-temp-buffer "*Possible Completions*"
(semantic-analyze-princ-sequence ans "" (current-buffer)))
(shrink-window-if-larger-than-buffer
......
......@@ -763,7 +763,7 @@ the regular parser."
(defun semantic-c-debug-mode-init (mm)
"Debug mode init for major mode MM after we're done parsing now."
(interactive (list semantic-c-debug-mode-init-last-mode))
(if (interactive-p)
(if (called-interactively-p 'interactive)
;; Do the debug.
(progn
(switch-to-buffer (get-buffer-create "*MODE HACK TEST*"))
......
......@@ -2030,13 +2030,12 @@ how completion options are displayed."
(semantic-complete-inline-analyzer
(semantic-analyze-current-context (point))))
;; Report a message if things didn't startup.
(if (and (interactive-p)
(if (and (called-interactively-p 'any)
(not (semantic-completion-inline-active-p)))
(message "Inline completion not needed.")
;; Since this is most likely bound to something, and not used
;; at idle time, throw in a TAB for good measure.
(semantic-complete-inline-TAB)
))
(semantic-complete-inline-TAB)))
;;;###autoload
(defun semantic-complete-analyze-inline-idle ()
......@@ -2053,10 +2052,9 @@ to change how completion options are displayed."
(semantic-complete-inline-analyzer-idle
(semantic-analyze-current-context (point))))
;; Report a message if things didn't startup.
(if (and (interactive-p)
(if (and (called-interactively-p 'interactive)
(not (semantic-completion-inline-active-p)))
(message "Inline completion not needed."))
)
(message "Inline completion not needed.")))
;;;###autoload
(defun semantic-complete-self-insert (arg)
......
......@@ -326,7 +326,7 @@ Argument EVENT is the mouse clicked event."
(semanticdb-file-table-object file t))))
(with-output-to-temp-buffer (help-buffer) ; "*Help*"
(help-setup-xref (list #'semantic-decoration-include-describe)
(interactive-p))
(called-interactively-p 'interactive))
(princ "Include File: ")
(princ (semantic-format-tag-name tag nil t))
(princ "\n")
......@@ -425,7 +425,7 @@ Argument EVENT is the mouse clicked event."
(mm major-mode))
(with-output-to-temp-buffer (help-buffer) ; "*Help*"
(help-setup-xref (list #'semantic-decoration-unknown-include-describe)
(interactive-p))
(called-interactively-p 'interactive))
(princ "Include File: ")
(princ (semantic-format-tag-name tag nil t))
(princ "\n\n")
......@@ -507,7 +507,7 @@ Argument EVENT is the mouse clicked event."
(let ((tag (semantic-current-tag)))
(with-output-to-temp-buffer (help-buffer); "*Help*"
(help-setup-xref (list #'semantic-decoration-unparsed-include-describe)
(interactive-p))
(called-interactively-p 'interactive))
(princ "Include File: ")
(princ (semantic-format-tag-name tag nil t))
......@@ -588,7 +588,7 @@ Argument EVENT describes the event that caused this function to be called."
)
(with-output-to-temp-buffer (help-buffer) ;"*Help*"
(help-setup-xref (list #'semantic-decoration-all-include-summary)
(interactive-p))
(called-interactively-p 'interactive))
(princ "Include Summary for File: ")
(princ (file-truename (buffer-file-name)))
......
......@@ -316,7 +316,7 @@ minor mode is enabled."
(not semantic-decoration-mode)))
(semantic-decoration-mode-setup)
(run-hooks 'semantic-decoration-mode-hook)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(message "decoration-mode minor mode %sabled"
(if semantic-decoration-mode "en" "dis")))
(semantic-mode-line-update)
......@@ -375,7 +375,7 @@ Return non-nil if the decoration style is enabled."
(when semantic-decoration-mode
(semantic-decoration-mode -1)
(semantic-decoration-mode 1))
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "Decoration style %s turned %s" (car style)
(if flag "on" "off"))))
flag)))
......
......@@ -224,7 +224,7 @@ minor mode is enabled."
(not semantic-idle-scheduler-mode)))
(semantic-idle-scheduler-mode-setup)
(run-hooks 'semantic-idle-scheduler-mode-hook)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(message "idle-scheduler minor mode %sabled"
(if semantic-idle-scheduler-mode "en" "dis")))
(semantic-mode-line-update)
......@@ -670,7 +670,7 @@ Return non-nil if the minor mode is enabled.")
(not ,mode)))
(,setup)
(run-hooks ,hook)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(message "%s %sabled"
(symbol-name ',mode)
(if ,mode "en" "dis")))
......
......@@ -326,7 +326,7 @@ minor mode is enabled."
(not semantic-mru-bookmark-mode)))
(semantic-mru-bookmark-mode-setup)
(run-hooks 'semantic-mru-bookmark-mode-hook)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(message "mru-bookmark minor mode %sabled"
(if semantic-mru-bookmark-mode "en" "dis")))
(semantic-mode-line-update)
......
......@@ -663,10 +663,9 @@ The class returned from the scope calculation is variable
nil ;; Don't do anything...
(require 'semantic/db-typecache)
(if (not point) (setq point (point)))
(when (interactive-p)
(when (called-interactively-p 'any)
(semantic-fetch-tags)
(semantic-scope-reset-cache)
)
(semantic-scope-reset-cache))
(save-excursion
(goto-char point)
(let* ((TAG (semantic-current-tag))
......@@ -726,10 +725,9 @@ The class returned from the scope calculation is variable
;; Make sure we become dependant on the typecache.
(semanticdb-typecache-add-dependant scopecache)
;; Handy debug output.
(when (interactive-p)
(when (called-interactively-p 'any)
(require 'eieio-datadebug)
(data-debug-show scopecache)
)
(data-debug-show scopecache))
;; Return ourselves
scopecache))))
......
......@@ -684,9 +684,9 @@ Use semantic tags to navigate."
(when ft
(ring-insert senator-tag-ring ft)
(kill-ring-save (semantic-tag-start ft) (semantic-tag-end ft))
(when (interactive-p)
(message "Use C-y to yank text. Use `senator-yank-tag' for prototype insert."))
)
(when (called-interactively-p 'interactive)
(message "Use C-y to yank text. \
Use `senator-yank-tag' for prototype insert.")))
ft))
;;;###autoload
......@@ -698,9 +698,9 @@ the kill ring. Retrieve that text with \\[yank]."
(let ((ct (senator-copy-tag))) ;; this handles the reparse for us.
(kill-region (semantic-tag-start ct)
(semantic-tag-end ct))
(when (interactive-p)
(message "Use C-y to yank text. Use `senator-yank-tag' for prototype insert."))
))
(when (called-interactively-p 'interactive)
(message "Use C-y to yank text. \
Use `senator-yank-tag' for prototype insert."))))
;;;###autoload
(defun senator-yank-tag ()
......@@ -712,10 +712,9 @@ yanked to."
(let ((ft (ring-ref senator-tag-ring 0)))
(semantic-foreign-tag-check ft)
(semantic-insert-foreign-tag ft)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "Use C-y to recover the yank the text of %s."
(semantic-tag-name ft)))
)))
(semantic-tag-name ft))))))
;;;###autoload
(defun senator-copy-tag-to-register (register &optional kill-flag)
......
......@@ -167,7 +167,7 @@ to perform the search. This was added for use by a test harness."
(set tool-return inst))
(prog1
(setq semantic-symref-last-result result)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(semantic-symref-data-debug-last-result))))
)
......@@ -187,7 +187,7 @@ Returns an object of class `semantic-symref-result'."
(result (semantic-symref-get-result inst)))
(prog1
(setq semantic-symref-last-result result)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(semantic-symref-data-debug-last-result))))
)
......@@ -207,7 +207,7 @@ Returns an object of class `semantic-symref-result'."
(result (semantic-symref-get-result inst)))
(prog1
(setq semantic-symref-last-result result)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(semantic-symref-data-debug-last-result))))
)
......@@ -227,7 +227,7 @@ Returns an object of class `semantic-symref-result'."
(result (semantic-symref-get-result inst)))
(prog1
(setq semantic-symref-last-result result)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(semantic-symref-data-debug-last-result))))
)
......@@ -247,7 +247,7 @@ Returns an object of class `semantic-symref-result'."
(result (semantic-symref-get-result inst)))
(prog1
(setq semantic-symref-last-result result)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(semantic-symref-data-debug-last-result))))
)
......@@ -268,7 +268,7 @@ Returns an object of class `semantic-symref-result'."
(result (semantic-symref-get-result inst)))
(prog1
(setq semantic-symref-last-result result)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(semantic-symref-data-debug-last-result))))
)
......
......@@ -288,7 +288,7 @@ minor mode is enabled."
(not semantic-highlight-edits-mode)))
(semantic-highlight-edits-mode-setup)
(run-hooks 'semantic-highlight-edits-mode-hook)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(message "highlight-edits minor mode %sabled"
(if semantic-highlight-edits-mode "en" "dis")))
(semantic-mode-line-update)
......@@ -496,7 +496,7 @@ minor mode is enabled.
(not semantic-show-unmatched-syntax-mode)))
(semantic-show-unmatched-syntax-mode-setup)
(run-hooks 'semantic-show-unmatched-syntax-mode-hook)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(message "show-unmatched-syntax minor mode %sabled"
(if semantic-show-unmatched-syntax-mode "en" "dis")))
(semantic-mode-line-update)
......@@ -656,7 +656,7 @@ minor mode is enabled."
(not semantic-show-parser-state-mode)))
(semantic-show-parser-state-mode-setup)
(run-hooks 'semantic-show-parser-state-mode-hook)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(message "show-parser-state minor mode %sabled"
(if semantic-show-parser-state-mode "en" "dis")))
(semantic-mode-line-update)
......@@ -928,7 +928,7 @@ minor mode is enabled."
(not semantic-stickyfunc-mode)))
(semantic-stickyfunc-mode-setup)
(run-hooks 'semantic-stickyfunc-mode-hook)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(message "Stickyfunc minor mode %sabled"
(if semantic-stickyfunc-mode "en" "dis")))
(semantic-mode-line-update)
......@@ -1173,7 +1173,7 @@ minor mode is enabled."
(not semantic-highlight-func-mode)))
(semantic-highlight-func-mode-setup)
(run-hooks 'semantic-highlight-func-mode-hook)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(message "Highlight-Func minor mode %sabled"
(if semantic-highlight-func-mode "en" "dis")))
semantic-highlight-func-mode)
......
......@@ -305,7 +305,8 @@ If TAG is not specified, use the tag at point."
)
(with-output-to-temp-buffer (help-buffer)
(help-setup-xref (list #'semantic-describe-buffer) (interactive-p))
(help-setup-xref (list #'semantic-describe-buffer)
(called-interactively-p 'interactive))
(with-current-buffer standard-output
(princ "Semantic Configuration in ")
(princ (buffer-name buff))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment