-;;; srecode-texi.el --- Srecode texinfo support.
+;;; srecode/texi.el --- Srecode texinfo support.
-;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <eric@siege-engine.com>
(define-mode-local-override semantic-insert-foreign-tag
texinfo-mode (foreign-tag)
- "Insert TAG from a foreign buffer in TAGFILE.
+ "Insert FOREIGN-TAG from a foreign buffer in TAGFILE.
Assume TAGFILE is a source buffer, and create a documentation
thingy from it using the `document' tool."
- (let ((srecode-semantic-selected-tag foreign-tag))
+ (srecode-texi-insert-tag-as-doc foreign-tag))
+
+(defun srecode-texi-insert-tag-as-doc (tag)
+ "Insert TAG into the current buffer with SRecode."
+ (when (not (eq major-mode 'texinfo-mode))
+ (error "Can only insert tags into texinfo in texinfo mode"))
+ (let ((srecode-semantic-selected-tag tag))
+ (srecode-load-tables-for-mode major-mode)
;; @todo - choose of the many types of tags to insert,
;; or put all that logic into srecode.
(srecode-insert "declaration:function")))
(if buffer
(progn (set-buffer buffer)
(srecode-texi-texify-docstring string))
- ;; Else, no buffer, so lets do something else
+ ;; Else, no buffer, so let's do something else
(with-mode-local texinfo-mode
(srecode-texi-texify-docstring string)))))
;; generated-autoload-load-name: "srecode/texi"
;; End:
-;; arch-tag: 6f0e7f45-2281-49e4-b73c-680cba477094
;;; srecode/texi.el ends here