;;; semantic/texi.el --- Semantic details for Texinfo files
-;; Copyright (C) 2001-2005, 2007-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2005, 2007-2016 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; parser plug-in is the function `semantic-texi-parse-region' that
;; overrides `semantic-parse-region'.
-(require 'semantic)
+(require 'semantic/db-find)
(require 'semantic/format)
+(require 'semantic/ctxt)
(require 'texinfo)
-(eval-when-compile
- (require 'semantic/db)
- (require 'semantic/db-find)
- (require 'semantic/ctxt)
- (require 'semantic/find)
- (require 'semantic/doc))
-
(defvar ede-minor-mode)
-(declare-function lookup-words "ispell")
+(declare-function ispell-lookup-words "ispell")
(declare-function ede-current-project "ede")
(defvar semantic-texi-super-regex
(let ((parenthetical (semantic-up-context-default))
)
(when (not parenthetical)
- ;; We are in parenthises. Are they the types of parens
+ ;; We are in parentheses. Are they the types of parens
;; belonging to a texinfo construct?
- (forward-word -1)
+ (forward-word-strictly -1)
(when (looking-at "@\\w+{")
(setq done (point))))))
;; If we are not in a parenthetical node, then find a block instead.
;; If we can't go up, we can't do this either.
t
;; We moved, so now we need to skip into whatever this thing is.
- (forward-word 1) ;; skip the command
+ (forward-word-strictly 1) ;; skip the command
(if (looking-at "\\s-*{")
;; In a short command. Go in.
(down-list 1)
((member 'word (oref context :prefixclass))
;; Do completion for words via ispell.
(require 'ispell)
- (let ((word-list (lookup-words prefix)))
+ (let ((word-list (ispell-lookup-words prefix)))
(mapcar (lambda (f) (semantic-tag f 'word)) word-list))
)
(t nil))
(defvar semantic-imenu-bucketize-file)
(defvar semantic-imenu-bucketize-type-members)
+;;;###autoload
(defun semantic-default-texi-setup ()
"Set up a buffer for parsing of Texinfo files."
;; This will use our parser.
;; This section provides specialized access into texinfo files.
;; Because texinfo files often directly refer to functions and programs
;; it is useful to access the texinfo file from the C code for document
-;; maintainance.
+;; maintenance.
(defun semantic-texi-associated-files (&optional buffer)
"Find texinfo files associated with BUFFER."
(save-excursion
;; ;; If we have a string, do the replacement.
;; (delete-region (semantic-tag-start tag)
;; (semantic-tag-end tag))
-;; ;; Use useful functions from the docaument library.
+;; ;; Use useful functions from the document library.
;; (srecode-texi-insert-tag-as-doc doctag)
;; ;(semantic-insert-foreign-tag doctag)
;; ))
(provide 'semantic/texi)
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-load-name: "semantic/texi"
+;; End:
+
;;; semantic/texi.el ends here