* files.el (auto-mode-alist): Add .srt and Project.ede.
* cedet/semantic.el (semantic-mode): Handle
srecode-template-mode-hook as well.
* cedet/srecode/template.el: Remove hook variable.
* cedet/ede/proj-comp.el: Require ede/pmake when compiling.
* cedet/ede.el (ede-target-forms-menu): Don't enable if no
projects exist.
* cedet/srecode/map.el (srecode-map-base-template-dir): Look for
templates in data-directory.
* cedet/ede/srecode.el (ede-srecode-setup): Use default templates
directory.
* cedet/semantic/util-modes.el (semantic-highlight-func-mode): Doc
fix.
* cedet/ede/proj-comp.el (ede-proj-makefile-insert-variables):
Only insert each variable once.
* cedet/ede/pmake.el (ede-pmake-insert-variable-once): New macro.
(ede-pmake-insert-variable-shared): Use it.
* cedet/ede/cpp-root.el (ede-preprocessor-map): Do not deref table
for lexical table iff table is nil.
+2009-10-03 Chong Yidong <cyd@stupidchicken.com>
+
+ * cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix.
+
+ * files.el (auto-mode-alist): Add .srt and Project.ede.
+
+ * cedet/semantic.el (semantic-mode): Handle
+ srecode-template-mode-hook as well.
+
+ * cedet/srecode/template.el: Remove hook variable.
+
+ * cedet/ede/proj-comp.el: Require ede/pmake when compiling.
+
+ * cedet/ede.el (ede-target-forms-menu): Don't enable if no
+ projects exist.
+
+ * cedet/srecode/map.el (srecode-map-base-template-dir): Look for
+ templates in data-directory.
+
+ * cedet/ede/srecode.el (ede-srecode-setup): Use default templates
+ directory.
+
+2009-09-30 Eric Ludlam <zappo@gnu.org>
+
+ * cedet/semantic/util-modes.el (semantic-highlight-func-mode): Doc
+ fix.
+
+ * cedet/ede/proj-comp.el (ede-proj-makefile-insert-variables):
+ Only insert each variable once.
+
+ * cedet/ede/pmake.el (ede-pmake-insert-variable-once): New macro.
+ (ede-pmake-insert-variable-shared): Use it.
+
+ * cedet/ede/cpp-root.el (ede-preprocessor-map): Do not deref table
+ for lexical table iff table is nil.
+
2009-10-03 Dan Nicolaescu <dann@ics.uci.edu>
* vc.el: Remove commented out code.
"Target Forms"
(let ((obj (or ede-selected-object ede-object)))
(append
- '([ "Add File" ede-add-file (ede-current-project) ]
+ '([ "Add File" ede-add-file
+ (and (ede-current-project)
+ (oref (ede-current-project) targets)) ]
[ "Remove File" ede-remove-file
(and ede-object
(or (listp ede-object)
(when (not table)
(message "Cannot find file %s in project." F))
(when (and table (semanticdb-needs-refresh-p table))
- (semanticdb-refresh-table table))
- (setq spp (append spp (oref table lexical-table)))))
+ (semanticdb-refresh-table table)
+ (setq spp (append spp (oref table lexical-table))))))
(oref this spp-files))
spp))
"Add VARNAME into the current Makefile.
Execute BODY in a location where a value can be placed."
`(let ((addcr t) (v ,varname))
- (if (re-search-backward (concat "^" v "\\s-*=") nil t)
- (progn
- (ede-pmake-end-of-variable)
- (if (< (current-column) 40)
- (if (and (/= (preceding-char) ?=)
- (/= (preceding-char) ? ))
- (insert " "))
- (insert "\\\n "))
- (setq addcr nil))
- (insert v "="))
+ (if (re-search-backward (concat "^" v "\\s-*=") nil t)
+ (progn
+ (ede-pmake-end-of-variable)
+ (if (< (current-column) 40)
+ (if (and (/= (preceding-char) ?=)
+ (/= (preceding-char) ? ))
+ (insert " "))
+ (insert "\\\n "))
+ (setq addcr nil))
+ (insert v "="))
+ ,@body
+ (if addcr (insert "\n"))
+ (goto-char (point-max))))
+(put 'ede-pmake-insert-variable-shared 'lisp-indent-function 1)
+
+(defmacro ede-pmake-insert-variable-once (varname &rest body)
+ "Add VARNAME into the current Makefile if it doesn't exist.
+Execute BODY in a location where a value can be placed."
+ `(let ((addcr t) (v ,varname))
+ (unless (re-search-backward (concat "^" v "\\s-*=") nil t)
+ (insert v "=")
,@body
(if addcr (insert "\n"))
- (goto-char (point-max))))
-(put 'ede-pmake-insert-variable-shared 'lisp-indent-function 1)
+ (goto-char (point-max)))
+ ))
+(put 'ede-pmake-insert-variable-once 'lisp-indent-function 1)
;;; SOURCE VARIABLE NAME CONSTRUCTION
(require 'ede) ;source object
(require 'ede/autoconf-edit)
+(eval-when-compile (require 'ede/pmake))
;;; Types:
(defclass ede-compilation-program (eieio-instance-inheritor)
(with-slots (variables) this
(mapcar
(lambda (var)
- (insert (car var) "=")
- (let ((cd (cdr var)))
- (if (listp cd)
- (mapc (lambda (c) (insert " " c)) cd)
- (insert cd)))
- (insert "\n"))
+ (ede-pmake-insert-variable-once (car var)
+ (let ((cd (cdr var)))
+ (if (listp cd)
+ (mapc (lambda (c) (insert " " c)) cd)
+ (insert cd)))))
variables))))
(defmethod ede-compiler-intermediate-objects-p ((this ede-compiler))
;;; Code:
(defun ede-srecode-setup ()
- "Update various paths to get SRecode to identify our macros."
- (let* ((lib (locate-library "ede.el" t))
- (ededir (file-name-directory lib))
- (tmpdir (file-name-as-directory
- (expand-file-name "templates" ededir))))
- (when (not tmpdir)
- (error "Unable to location EDE Templates directory"))
-
- ;; Rig up the map.
- (require 'srecode/map)
- (require 'srecode/find)
- (add-to-list 'srecode-map-load-path tmpdir)
- (srecode-map-update-map t)
-
- ;; We don't call this unless we need it. Load in the templates.
- (srecode-load-tables-for-mode 'makefile-mode)
- (srecode-load-tables-for-mode 'makefile-mode 'ede)
-
- ;; @todo - autoconf files.
-
- ))
+ "Initialize Srecode for EDE."
+ (require 'srecode/map)
+ (require 'srecode/find)
+ (srecode-map-update-map t)
+ ;; We don't call this unless we need it. Load in the templates.
+ (srecode-load-tables-for-mode 'makefile-mode)
+ (srecode-load-tables-for-mode 'makefile-mode 'ede))
(defmacro ede-srecode-insert-with-dictionary (template &rest forms)
"Insert TEMPLATE after executing FORMS with a dictionary.
This hook should not be used any more.
Use `semantic-after-toplevel-cache-change-hook' instead.")
-(make-obsolete-variable 'semantic-after-toplevel-bovinate-hook nil)
+(make-obsolete-variable 'semantic-after-toplevel-bovinate-hook nil "23.2")
(defvar semantic-after-toplevel-cache-change-hook nil
"Hooks run after the buffer tag list has changed.
(defun semantic-bovinate-toplevel (&optional ignored)
"Backward Compatibility Function."
(semantic-fetch-tags))
-(make-obsolete 'semantic-bovinate-toplevel 'semantic-fetch-tags)
+(make-obsolete 'semantic-bovinate-toplevel 'semantic-fetch-tags "23.2")
;; Another approach is to let Emacs call the parser on idle time, when
;; needed, use `semantic-fetch-available-tags' to only retrieve
commands, use `semantic-bovinate-from-nonterminal-full'."
(semantic-parse-region start end nonterm depth t))
(make-obsolete 'semantic-bovinate-region-until-error
- 'semantic-parse-region)
+ 'semantic-parse-region "23.2")
(defsubst semantic-bovinate-from-nonterminal
(start end nonterm &optional depth length)
a START and END part."
(semantic-parse-region start end nonterm (or depth 1)))
(make-obsolete 'semantic-bovinate-from-nonterminal-full
- 'semantic-parse-region)
+ 'semantic-parse-region "23.2")
;;; User interface
(add-hook 'makefile-mode-hook 'semantic-default-make-setup)
(add-hook 'c-mode-hook 'semantic-default-c-setup)
(add-hook 'c++-mode-hook 'semantic-default-c-setup)
- (add-hook 'html-mode-hook 'semantic-default-html-setup))
+ (add-hook 'html-mode-hook 'semantic-default-html-setup)
+ (add-hook 'html-mode-hook 'semantic-default-html-setup)
+ (add-hook 'srecode-template-mode-hook 'srecode-template-setup-parser))
;; Disable all Semantic features.
(remove-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
(remove-hook 'javascript-mode-hook 'wisent-javascript-setup-parser)
(remove-hook 'c-mode-hook 'semantic-default-c-setup)
(remove-hook 'c++-mode-hook 'semantic-default-c-setup)
(remove-hook 'html-mode-hook 'semantic-default-html-setup)
+ (remove-hook 'srecode-template-mode-hook 'srecode-template-setup-parser)
;; FIXME: handle semanticdb-load-ebrowse-caches
(dolist (mode semantic-submode-list)
the current buffer was set up for parsing. Return non-nil if the
minor mode is enabled." t nil)
+(autoload 'srecode-template-setup-parser "srecode/srecode-template"
+ "Set up buffer for parsing SRecode template files." t nil)
+
(provide 'semantic)
;; Semantic-util is a part of the semantic API. Include it last
"Setup option `semantic-stickyfunc-mode'.
For semantic enabled buffers, make the function declaration for the top most
function \"sticky\". This is accomplished by putting the first line of
-text for that function in Emacs 21's header line."
+text for that function in the header line."
(if semantic-stickyfunc-mode
(progn
(unless (and (featurep 'semantic) (semantic-active-p))
A function (or other tag class specified by
`semantic-stickyfunc-sticky-classes') has a header line, meaning the
first line which describes the rest of the construct. This first
-line is what is displayed in the Emacs 21 header line.
+line is what is displayed in the header line.
With prefix argument ARG, turn on if positive, otherwise off. The
minor mode can be turned on only if semantic feature is available and
;;;###autoload
(defun semantic-highlight-func-mode (&optional arg)
"Minor mode to highlight the first line of the current tag.
-Enables/disables making the header line of functions sticky.
+Enables/disables making the current function's first line light up.
A function (or other tag class specified by
`semantic-stickyfunc-sticky-classes') is highlighted, meaning the
first line which describes the rest of the construct.
(defun srecode-map-base-template-dir ()
"Find the base template directory for SRecode."
- (let* ((lib (locate-library "srecode.el"))
- (dir (file-name-directory lib)))
- (expand-file-name "templates/" dir)
- ))
+ (expand-file-name "srecode" data-directory))
\f
;;; Current MAP
;;
(list (srecode-map-base-template-dir)
(expand-file-name "~/.srecode/")
)
- "*Global load path for SRecode template files."
+ "Global load path for SRecode template files."
:group 'srecode
:type '(repeat file)
:set 'srecode-map-load-path-set)
;;;###autoload
(defun srecode-template-mode ()
- "Major-mode for writing srecode macros."
+ "Major-mode for writing SRecode macros."
(interactive)
(kill-all-local-variables)
(setq major-mode 'srecode-template-mode
ans)
))
+;;;###autoload
(defun srecode-template-setup-parser ()
"Setup buffer for parse."
(srecode-template-wy--install-parser)
senator-step-at-tag-classes '(function variable)
))
-;;;;###autoload
-(add-hook 'srecode-template-mode-hook 'srecode-template-setup-parser)
-
(provide 'srecode/template)
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: srecode/loaddefs
+;; generated-autoload-load-name: "srecode/template"
+;; End:
+
;; arch-tag: 037fbca7-e846-4521-b801-3463f50c3080
;;; srecode/template.el ends here
("\\.dtx\\'" . doctex-mode)
("\\.org\\'" . org-mode)
("\\.el\\'" . emacs-lisp-mode)
+ ("Project\\.ede\\'" . emacs-lisp-mode)
("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode)
("\\.l\\'" . lisp-mode)
("\\.li?sp\\'" . lisp-mode)
("\\.f9[05]\\'" . f90-mode)
("\\.indent\\.pro\\'" . fundamental-mode) ; to avoid idlwave-mode
("\\.\\(pro\\|PRO\\)\\'" . idlwave-mode)
+ ("\\.srt\\'" . srecode-template-mode)
("\\.prolog\\'" . prolog-mode)
("\\.tar\\'" . tar-mode)
;; The list of archive file extensions should be in sync with