Mercurial > emacs
changeset 104470:6ccad1511df1
Minor whitespace changes and `require' fixes.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 06 Sep 2009 21:22:05 +0000 |
parents | ce081012a7d6 |
children | 64ff46db1dda |
files | lisp/cedet/cedet-edebug.el lisp/cedet/cedet.el lisp/cedet/data-debug.el lisp/cedet/semantic.el lisp/cedet/semantic/analyze.el lisp/cedet/semantic/analyze/refs.el lisp/cedet/semantic/bovine/c.el lisp/cedet/semantic/bovine/el.el lisp/cedet/semantic/bovine/make.el lisp/cedet/semantic/bovine/scm.el lisp/cedet/semantic/chart.el lisp/cedet/semantic/complete.el lisp/cedet/semantic/db-find.el lisp/cedet/semantic/db-javascript.el lisp/cedet/semantic/db-ref.el lisp/cedet/semantic/db-typecache.el lisp/cedet/semantic/db.el lisp/cedet/semantic/debug.el lisp/cedet/semantic/decorate/include.el lisp/cedet/semantic/format.el lisp/cedet/semantic/html.el lisp/cedet/semantic/idle.el lisp/cedet/semantic/scope.el lisp/cedet/semantic/tag.el |
diffstat | 24 files changed, 101 insertions(+), 91 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cedet/cedet-edebug.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/cedet-edebug.el Sun Sep 06 21:22:05 2009 +0000 @@ -95,31 +95,29 @@ ;; 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) -;; )) +;;; 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. -;; ;;;###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) -;; )) +;;; 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)
--- a/lisp/cedet/cedet.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/cedet.el Sun Sep 06 21:22:05 2009 +0000 @@ -52,7 +52,7 @@ "Current version of CEDET.") (require 'eieio) -;; (require 'semantic) +(require 'semantic) ;; (require 'srecode) ;; (require 'ede) (require 'speedbar)
--- a/lisp/cedet/data-debug.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/data-debug.el Sun Sep 06 21:22:05 2009 +0000 @@ -45,7 +45,7 @@ (require 'ring) (require 'eieio) (eval-when-compile - (require 'semantic)) + (require 'semantic/tag)) ;;; Code:
--- a/lisp/cedet/semantic.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic.el Sun Sep 06 21:22:05 2009 +0000 @@ -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 @@ (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
--- a/lisp/cedet/semantic/analyze.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/analyze.el Sun Sep 06 21:22:05 2009 +0000 @@ -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:
--- a/lisp/cedet/semantic/analyze/refs.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/analyze/refs.el Sun Sep 06 21:22:05 2009 +0000 @@ -321,8 +321,6 @@ (semantic-momentary-highlight-tag target)) ) - - (provide 'semantic/analyze/refs) ;; Local variables:
--- a/lisp/cedet/semantic/bovine/c.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/bovine/c.el Sun Sep 06 21:22:05 2009 +0000 @@ -122,7 +122,7 @@ (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 @@ (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 @@ (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 @@ (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 @@ (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
--- a/lisp/cedet/semantic/bovine/el.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/bovine/el.el Sun Sep 06 21:22:05 2009 +0000 @@ -463,7 +463,7 @@ (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 @@ (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
--- a/lisp/cedet/semantic/bovine/make.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/bovine/make.el Sun Sep 06 21:22:05 2009 +0000 @@ -153,7 +153,7 @@ ) (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 @@ 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 @@ (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
--- a/lisp/cedet/semantic/bovine/scm.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/bovine/scm.el Sun Sep 06 21:22:05 2009 +0000 @@ -95,6 +95,7 @@ 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 @@ (setq semantic-lex-analyzer #'semantic-scheme-lexer) ) +;;;###autoload (add-hook 'scheme-mode-hook 'semantic-default-scheme-setup) (provide 'semantic/bovine/scm)
--- a/lisp/cedet/semantic/chart.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/chart.el Sun Sep 06 21:22:05 2009 +0000 @@ -26,17 +26,13 @@ ;; the output of the semantic parser. ;; +(require 'semantic) (require 'chart) -(require 'semantic) (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 @@ "Number of tags") )) - - (provide 'semantic/chart) ;;; semantic/chart.el ends here
--- a/lisp/cedet/semantic/complete.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/complete.el Sun Sep 06 21:22:05 2009 +0000 @@ -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.
--- a/lisp/cedet/semantic/db-find.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/db-find.el Sun Sep 06 21:22:05 2009 +0000 @@ -748,7 +748,7 @@ (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))
--- a/lisp/cedet/semantic/db-javascript.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/db-javascript.el Sun Sep 06 21:22:05 2009 +0000 @@ -306,7 +306,6 @@ ;; function encodeURI (uri){} ;; function encodeURIComponent (uriComponent){} - (provide 'semantic/db-javascript) ;;; semantic/db-javascript.el ends here
--- a/lisp/cedet/semantic/db-ref.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/db-ref.el Sun Sep 06 21:22:05 2009 +0000 @@ -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 @@ (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")
--- a/lisp/cedet/semantic/db-typecache.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/db-typecache.el Sun Sep 06 21:22:05 2009 +0000 @@ -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")
--- a/lisp/cedet/semantic/db.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/db.el Sun Sep 06 21:22:05 2009 +0000 @@ -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 @@ ;; 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 @@ (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.
--- a/lisp/cedet/semantic/debug.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/debug.el Sun Sep 06 21:22:05 2009 +0000 @@ -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 @@ (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
--- a/lisp/cedet/semantic/decorate/include.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/decorate/include.el Sun Sep 06 21:22:05 2009 +0000 @@ -668,7 +668,7 @@ )) (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)))
--- a/lisp/cedet/semantic/format.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/format.el Sun Sep 06 21:22:05 2009 +0000 @@ -34,7 +34,6 @@ ;;; Code: (require 'semantic) -(require 'semantic/tag) (require 'semantic/tag-ls) (require 'ezimage) @@ -103,6 +102,20 @@ 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 @@ (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 @@ "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 @@ )) ;;; 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.
--- a/lisp/cedet/semantic/html.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/html.el Sun Sep 06 21:22:05 2009 +0000 @@ -230,6 +230,7 @@ "The children TAG expands to." (semantic-html-components tag)) +;;;###autoload (defun semantic-default-html-setup () "Set up a buffer for parsing of HTML files." ;; This will use our parser. @@ -253,6 +254,7 @@ t) ) +;;;###autoload (add-hook 'html-mode-hook 'semantic-default-html-setup) (define-child-mode html-helper-mode html-mode @@ -260,4 +262,10 @@ (provide 'semantic/html) +;; Local variables: +;; generated-autoload-file: "loaddefs.el" +;; generated-autoload-feature: semantic/loaddefs +;; generated-autoload-load-name: "semantic/html" +;; End: + ;;; semantic/html.el ends here
--- a/lisp/cedet/semantic/idle.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/idle.el Sun Sep 06 21:22:05 2009 +0000 @@ -41,7 +41,6 @@ (require 'semantic/ctxt) (require 'semantic/format) (require 'semantic/tag) -;(require 'semantic/util-modes) (require 'timer) ;; For the semantic-find-tags-by-name macro.
--- a/lisp/cedet/semantic/scope.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/scope.el Sun Sep 06 21:22:05 2009 +0000 @@ -49,7 +49,7 @@ (require 'semantic/analyze/fcn) (require 'semantic/ctxt) -(eval-when-compile (require 'semantic/find)) ; For semantic-find-* macros +(eval-when-compile (require 'semantic/find)) (declare-function data-debug-show "eieio-datadebug") (declare-function semantic-analyze-find-tag "semantic/analyze")
--- a/lisp/cedet/semantic/tag.el Sun Sep 06 02:18:37 2009 +0000 +++ b/lisp/cedet/semantic/tag.el Sun Sep 06 21:22:05 2009 +0000 @@ -333,6 +333,14 @@ That is the value of the `:members' attribute." (semantic-tag-get-attribute tag :members)) +(defsubst semantic-tag-type (tag) + "Return the value of the `:type' attribute of TAG. +For a function it would be the data type of the return value. +For a variable, it is the storage type of that variable. +For a data type, the type is the style of datatype, such as +struct or union." + (semantic-tag-get-attribute tag :type)) + (defun semantic-tag-with-position-p (tag) "Return non-nil if TAG has positional information." (and (semantic-tag-p tag) @@ -356,14 +364,6 @@ (equal (semantic-tag-bounds tag1) (semantic-tag-bounds tag2)))))) -(defsubst semantic-tag-type (tag) - "Return the value of the `:type' attribute of TAG. -For a function it would be the data type of the return value. -For a variable, it is the storage type of that variable. -For a data type, the type is the style of datatype, such as -struct or union." - (semantic-tag-get-attribute tag :type)) - (defun semantic-tag-similar-p (tag1 tag2 &rest ignorable-attributes) "Test to see if TAG1 and TAG2 are similar. Two tags are similar if their name, datatype, and various attributes @@ -752,7 +752,6 @@ ;;; Common ;; - (defsubst semantic-tag-modifiers (tag) "Return the value of the `:typemodifiers' attribute of TAG." (semantic-tag-get-attribute tag :typemodifiers)) @@ -814,6 +813,7 @@ in SUPERS." (let ((stag nil)) (setq stag (semantic-find-first-tag-by-name name supers)) + (when (not stag) (require 'semantic/analyze/fcn) (dolist (S supers) @@ -1112,7 +1112,6 @@ ;; Overlays are used so that we can quickly identify tags from ;; buffer positions and regions using built in Emacs commands. ;; - (defsubst semantic--tag-unlink-list-from-buffer (tags) "Convert TAGS from using an overlay to using an overlay proxy. This function is for internal use only."