Commit a60f2e7b authored by Chong Yidong's avatar Chong Yidong
Browse files

Minor whitespace changes and `require' fixes.

parent 6ca2fce3
......@@ -95,31 +95,29 @@ See `cedet-edebug-prin1-extensions' for the official list."
;; whack the old implementation to force a rebuild.
(fmakunbound 'cedet-edebug-prin1-to-string-inner))
;; ;;; NOTE TO SELF. Make this system used as an extension
;; ;;; and then autoload the below.
;; ;;;###autoload
;; (add-hook 'edebug-setup-hook
;; (lambda ()
;; (require 'cedet-edebug)
;; ;; I suspect this isn't the best way to do this, but when
;; ;; cust-print was used on my system all my objects
;; ;; appeared as "#1 =" which was not useful. This allows
;; ;; edebug to print my objects in the nice way they were
;; ;; meant to with `object-print' and `class-name'
;; (defalias 'edebug-prin1-to-string 'cedet-edebug-prin1-to-string)
;; ;; Add a fancy binding into EDEBUG's keymap for ADEBUG.
;; (define-key edebug-mode-map "A" 'data-debug-edebug-expr)
;; ))
;; ;;; DEBUG MODE TOO
;; ;; This seems like as good a place as any to stick this hack.
;; ;;;###autoload
;; (add-hook 'debugger-mode-hook
;; (lambda ()
;; (require 'cedet-edebug)
;; ;; Add a fancy binding into the debug mode map for ADEBUG.
;; (define-key debugger-mode-map "A" 'data-debug-edebug-expr)
;; ))
;;; NOTE TO SELF. Make this system used as an extension
;;; and then autoload the below.
(add-hook 'edebug-setup-hook
(lambda ()
(require 'cedet-edebug)
;; I suspect this isn't the best way to do this, but when
;; cust-print was used on my system all my objects
;; appeared as "#1 =" which was not useful. This allows
;; edebug to print my objects in the nice way they were
;; meant to with `object-print' and `class-name'
(defalias 'edebug-prin1-to-string 'cedet-edebug-prin1-to-string)
;; Add a fancy binding into EDEBUG's keymap for ADEBUG.
(define-key edebug-mode-map "A" 'data-debug-edebug-expr)
))
;;; DEBUG MODE TOO
;; This seems like as good a place as any to stick this hack.
(add-hook 'debugger-mode-hook
(lambda ()
(require 'cedet-edebug)
;; Add a fancy binding into the debug mode map for ADEBUG.
(define-key debugger-mode-map "A" 'data-debug-edebug-expr)
))
(provide 'cedet-edebug)
......
......@@ -52,7 +52,7 @@
"Current version of CEDET.")
(require 'eieio)
;; (require 'semantic)
(require 'semantic)
;; (require 'srecode)
;; (require 'ede)
(require 'speedbar)
......
......@@ -45,7 +45,7 @@
(require 'ring)
(require 'eieio)
(eval-when-compile
(require 'semantic))
(require 'semantic/tag))
;;; Code:
......
......@@ -34,7 +34,6 @@
(defvar semantic-version "2.0pre7"
"Current version of Semantic."))
;; (require 'working)
(require 'assoc)
(require 'semantic/tag)
(require 'semantic/lex)
......@@ -821,8 +820,8 @@ a START and END part."
(provide 'semantic)
;;; semantic.el ends here
;; Semantic-util is a part of the semantic API. Include it last
;; because it depends on semantic.
(require 'semantic/util)
;;; semantic.el ends here
......@@ -64,14 +64,12 @@
;; constant. These need to be returned as there would be no
;; other possible completions.
;;
(require 'eieio)
(require 'semantic)
(require 'semantic/format)
(require 'semantic/ctxt)
(require 'semantic/sort)
(eval-when-compile (require 'semantic/find))
(require 'semantic/scope)
(require 'semantic/tag)
(require 'semantic/analyze/fcn)
;;; Code:
......
......@@ -321,8 +321,6 @@ Only works for tags in the global namespace."
(semantic-momentary-highlight-tag target))
)
(provide 'semantic/analyze/refs)
;; Local variables:
......
......@@ -122,7 +122,7 @@ part of the preprocessor map.")
(defun semantic-c-reset-preprocessor-symbol-map ()
"Reset the C preprocessor symbol map based on all input variables."
(when (featurep 'semantic-c)
(when (featurep 'semantic/bovine/c)
(let ((filemap nil)
)
(when (and (not semantic-c-in-reset-preprocessor-table)
......@@ -1592,6 +1592,7 @@ DO NOT return the list of tags encompassing point."
(defvar-mode-local c-mode senator-step-at-tag-classes '(function variable)
"Tag classes where senator will stop at the end.")
;;;###autoload
(defun semantic-default-c-setup ()
"Set up a buffer for semantic parsing of the C language."
(semantic-c-by--install-parser)
......@@ -1604,6 +1605,7 @@ DO NOT return the list of tags encompassing point."
(add-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook nil t)
)
;;;###autoload
(defun semantic-c-add-preprocessor-symbol (sym replacement)
"Add a preprocessor symbol SYM with a REPLACEMENT value."
(interactive "sSymbol: \nsReplacement: ")
......@@ -1619,7 +1621,9 @@ DO NOT return the list of tags encompassing point."
(semantic-c-reset-preprocessor-symbol-map)
)
;;;###autoload
(add-hook 'c-mode-hook 'semantic-default-c-setup)
;;;###autoload
(add-hook 'c++-mode-hook 'semantic-default-c-setup)
;;; SETUP QUERY
......@@ -1712,4 +1716,10 @@ DO NOT return the list of tags encompassing point."
(semantic-c-reset-preprocessor-symbol-map)
;; Local variables:
;; generated-autoload-file: "../loaddefs.el"
;; generated-autoload-feature: semantic/loaddefs
;; generated-autoload-load-name: "semantic/bovine/c"
;; End:
;;; semantic/bovine/c.el ends here
......@@ -463,7 +463,7 @@ Return a bovination list to use."
(condition-case nil
;; Try an Emacs 22 fcn. This throws errors.
(find-library-name (semantic-tag-name tag))
(error
(error
(message "semantic: connot find source file %s"
(semantic-tag-name tag))))
;; No handy function available. (Older Emacsen)
......@@ -533,14 +533,14 @@ Optional argument NOSNARF is ignored."
(cond ((eq (semantic-tag-class tag) 'function)
(setq d (documentation sym)))
(t
(setq d (documentation-property
(setq d (documentation-property
sym 'variable-documentation)))))
;; Label it as system doc.. perhaps just for debugging
;; purposes.
(if d (setq d (concat "Sytem Doc: \n" d)))
))
)
(when d
(concat
(substitute-command-keys
......
......@@ -153,7 +153,7 @@ We never have local variables in Makefiles."
)
(cond ((eq class 'function)
(concat name ": "
(semantic--format-tag-arguments
(semantic--format-tag-arguments
(semantic-tag-function-arguments tag)
#'semantic-format-tag-prototype
color)))
......@@ -205,6 +205,7 @@ Uses default implementation, and also gets a list of filenames."
nil
"The system include path used by Makefiles langauge.")
;;;###autoload
(defun semantic-default-make-setup ()
"Set up a Makefile buffer for parsing with semantic."
(semantic-make-by--install-parser)
......@@ -229,8 +230,15 @@ Uses default implementation, and also gets a list of filenames."
(setq semantic-lex-analyzer #'semantic-make-lexer)
)
;;;###autoload
(add-hook 'makefile-mode-hook 'semantic-default-make-setup)
(provide 'semantic/bovine/make)
;; Local variables:
;; generated-autoload-file: "../loaddefs.el"
;; generated-autoload-feature: semantic/loaddefs
;; generated-autoload-load-name: "semantic/bovine/make"
;; End:
;;; semantic/bovine/make.el ends here
......@@ -95,6 +95,7 @@ syntax as specified by the syntax table."
semantic-lex-number
semantic-lex-default-action)
;;;###autoload
(defun semantic-default-scheme-setup ()
"Setup hook function for Emacs Lisp files and Semantic."
(semantic-scm-by--install-parser)
......@@ -109,6 +110,7 @@ syntax as specified by the syntax table."
(setq semantic-lex-analyzer #'semantic-scheme-lexer)
)
;;;###autoload
(add-hook 'scheme-mode-hook 'semantic-default-scheme-setup)
(provide 'semantic/bovine/scm)
......
......@@ -26,17 +26,13 @@
;; the output of the semantic parser.
;;
(require 'chart)
(require 'semantic)
(require 'chart)
(require 'semantic/db)
(require 'semantic/tag)
(eval-when-compile (require 'semantic/find))
;; (require 'semantic/db-mode)
;; (require 'semantic/db-typecache)
;; (require 'semantic/scope)
;;; Code:
(defun semantic-chart-tags-by-class (&optional tagtable)
......@@ -173,8 +169,6 @@ items are charted. TAGTABLE is passedto
"Number of tags")
))
(provide 'semantic/chart)
;;; semantic/chart.el ends here
......@@ -114,7 +114,6 @@
(require 'semantic/ctxt)
(require 'semantic/decorate)
(require 'semantic/format)
(require 'semantic/tag)
(eval-when-compile
;; For the semantic-find-tags-for-completion macro.
......
......@@ -748,7 +748,7 @@ for details on how this list is derived."
(semantic-fetch-tags)
(require 'data-debug)
(let* ((semanticdb-find-default-throttle
(if (featurep 'semanticdb-find)
(if (featurep 'semantic/db-find)
(remq 'unloaded semanticdb-find-default-throttle)
nil))
(start (current-time))
......
......@@ -306,7 +306,6 @@ Return a list of tags."
;; function encodeURI (uri){}
;; function encodeURIComponent (uriComponent){}
(provide 'semantic/db-javascript)
;;; semantic/db-javascript.el ends here
......@@ -41,13 +41,9 @@
(require 'semantic/db)
(require 'semantic/tag)
(defvar semanticdb-find-default-throttle)
;; For the semantic-find-tags-by-name-regexp macro.
(eval-when-compile (require 'semantic/find))
(defvar semantic-case-fold)
(defmethod semanticdb-add-reference ((dbt semanticdb-abstract-table)
include-tag)
"Add a reference for the database table DBT based on INCLUDE-TAG.
......@@ -149,7 +145,6 @@ DBT, the second argument is DBT."
(i-include :initarg :i-include))
"Simple class to allow ADEBUG to show a nice list.")
(defvar semanticdb-current-table)
(declare-function data-debug-new-buffer "data-debug")
(declare-function data-debug-insert-object-slots "eieio-datadebug")
......
......@@ -31,14 +31,11 @@
(require 'semantic)
(require 'semantic/db)
(require 'semantic/db-find)
(require 'semantic/tag)
(require 'semantic/analyze/fcn)
;; For semantic-find-tags-by-* macros
(eval-when-compile (require 'semantic/find))
;; (require 'semantic/scope)
(declare-function data-debug-insert-thing "data-debug")
(declare-function data-debug-new-buffer "data-debug")
(declare-function semantic-sort-tags-by-name-then-type-increasing "semantic/sort")
......
......@@ -30,9 +30,6 @@
;;
(require 'eieio)
;; (require 'inversion)
;; (eval-and-compile
;; (inversion-require 'eieio "1.0"))
(require 'eieio-base)
(require 'semantic)
(eval-when-compile
......@@ -590,7 +587,7 @@ The file associated with OBJ does not need to be in a buffer."
;; Assume it is now up to date.
(oset table unmatched-syntax semantic-unmatched-syntax-cache)
;; The lexical table should be good too.
(when (featurep 'semantic-lex-spp)
(when (featurep 'semantic/lex-spp)
(oset table lexical-table (semantic-lex-spp-save-table)))
;; this implies dirtyness
(semanticdb-set-dirty table)
......@@ -619,7 +616,7 @@ The file associated with OBJ does not need to be in a buffer."
(semanticdb-set-dirty table)
;; The lexical table may be modified.
(when (featurep 'semantic-lex-spp)
(when (featurep 'semantic/lex-spp)
(oset table lexical-table (semantic-lex-spp-save-table)))
;; Incremental parser doesn't mokey around with this.
......
......@@ -38,16 +38,22 @@
(require 'semantic)
(require 'eieio)
(eval-when-compile (require 'semantic/find))
;;; Code:
;;;###autoload
(defvar semantic-debug-parser-source nil
"For any buffer, the file name (no path) of the parser.
This would be a parser for a specific language, not the source
to one of the parser generators.")
;;;###autoload
(make-variable-buffer-local 'semantic-debug-parser-source)
;;;###autoload
(defvar semantic-debug-parser-class nil
"Class to create when building a debug parser object.")
;;;###autoload
(make-variable-buffer-local 'semantic-debug-parser-class)
(defvar semantic-debug-enabled nil
......@@ -561,4 +567,10 @@ A frame is of the form:
(provide 'semantic/debug)
;; Local variables:
;; generated-autoload-file: "loaddefs.el"
;; generated-autoload-feature: semantic/loaddefs
;; generated-autoload-load-name: "semantic/debug"
;; End:
;;; semantic/debug.el ends here
......@@ -668,7 +668,7 @@ Argument EVENT describes the event that caused this function to be called."
))
(let* ((semanticdb-find-default-throttle
(if (featurep 'semanticdb-find)
(if (featurep 'semantic/db-find)
(remq 'unloaded semanticdb-find-default-throttle)
nil))
(path (semanticdb-find-translate-path nil nil)))
......
......@@ -34,7 +34,6 @@
;;; Code:
(require 'semantic)
(require 'semantic/tag)
(require 'semantic/tag-ls)
(require 'ezimage)
......@@ -103,6 +102,20 @@ The name is the shortest possible representation.
Optional argument PARENT is the parent type if TAG is a detail.
Optional argument COLOR means highlight the prototype with font-lock colors.")
(defun semantic-format-tag-name-default (tag &optional parent color)
"Return an abbreviated string describing TAG.
Optional argument PARENT is the parent type if TAG is a detail.
Optional argument COLOR means highlight the prototype with font-lock colors."
(let ((name (semantic-tag-name tag))
(destructor
(if (eq (semantic-tag-class tag) 'function)
(semantic-tag-function-destructor-p tag))))
(when destructor
(setq name (concat "~" name)))
(if color
(setq name (semantic--format-colorize-text name (semantic-tag-class tag))))
name))
;;;###autoload
(define-overloadable-function semantic-format-tag-prototype (tag &optional parent color)
"Return a prototype for TAG.
......@@ -298,20 +311,6 @@ of FACE-CLASS for which this is used."
(stringp (car anything)))
(semantic--format-colorize-text (car anything) colorhint))))
(defun semantic-format-tag-name-default (tag &optional parent color)
"Return an abbreviated string describing TAG.
Optional argument PARENT is the parent type if TAG is a detail.
Optional argument COLOR means highlight the prototype with font-lock colors."
(let ((name (semantic-tag-name tag))
(destructor
(if (eq (semantic-tag-class tag) 'function)
(semantic-tag-function-destructor-p tag))))
(when destructor
(setq name (concat "~" name)))
(if color
(setq name (semantic--format-colorize-text name (semantic-tag-class tag))))
name))
(declare-function semantic-go-to-tag "semantic/tag-file")
(defun semantic--format-tag-parent-tree (tag parent)
......@@ -477,7 +476,6 @@ Optional argument COLOR means highlight the prototype with font-lock colors.")
"Display a short form of TAG's documentation. (Comments, or docstring.)
Optional argument PARENT is the parent type if TAG is a detail.
Optional argument COLOR means highlight the prototype with font-lock colors."
(let* ((fname (or (semantic-tag-file-name tag)
(when parent (semantic-tag-file-name parent))))
(buf (or (semantic-tag-buffer tag)
......@@ -507,7 +505,7 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
))
;;; Prototype generation
;;
(defun semantic-format-tag-prototype-default (tag &optional parent color)
"Default method for returning a prototype for TAG.
This will work for C like languages.
......
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