1 |
;;; texinfo.el --- major mode for editing Texinfo files |
;;; texinfo.el --- major mode for editing Texinfo files |
2 |
|
|
3 |
;; Copyright (C) 1985, '88, '89, '90, '91, '01, |
;; Copyright (C) 1985,88,89,90,91,92,93,96,97,2000,01,03 |
4 |
;; '92, '93, '96, '97, 2000 Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Robert J. Chassell |
;; Author: Robert J. Chassell |
7 |
;; Date: [See date below for texinfo-version] |
;; Date: [See date below for texinfo-version] |
28 |
;;; Todo: |
;;; Todo: |
29 |
|
|
30 |
;; - facemenu support. |
;; - facemenu support. |
31 |
;; - command completion. |
;; - command completion. |
32 |
|
|
33 |
;;; Commentary: |
;;; Commentary: |
34 |
|
|
276 |
("unnumberedsubsubsec" 5) |
("unnumberedsubsubsec" 5) |
277 |
("appendix" 2) |
("appendix" 2) |
278 |
("appendixsec" 3) |
("appendixsec" 3) |
279 |
|
("appendixsection" 3) |
280 |
("appendixsubsec" 4) |
("appendixsubsec" 4) |
281 |
("appendixsubsubsec" 5) |
("appendixsubsubsec" 5) |
282 |
("majorheading" 2) |
("majorheading" 2) |
667 |
(and (re-search-backward (concat "@\\(end\\s +\\)?" env) bound t) |
(and (re-search-backward (concat "@\\(end\\s +\\)?" env) bound t) |
668 |
(not (match-end 1))))) |
(not (match-end 1))))) |
669 |
|
|
670 |
(defvar texinfo-enable-quote-macros '("@\\(code\\|samp\\|kbd\\)\\>")) |
(defvar texinfo-enable-quote-macros "@\\(code\\|samp\\|kbd\\)\\>") |
671 |
(defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>")) |
(defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>")) |
672 |
(defun texinfo-insert-quote (&optional arg) |
(defun texinfo-insert-quote (&optional arg) |
673 |
"Insert the appropriate quote mark for TeXinfo. |
"Insert the appropriate quote mark for TeXinfo. |
843 |
(interactive "P") |
(interactive "P") |
844 |
(texinfo-insert-@-with-arg "strong" arg)) |
(texinfo-insert-@-with-arg "strong" arg)) |
845 |
|
|
846 |
(defun texinfo-insert-@table (&optional arg) |
(defun texinfo-insert-@table () |
847 |
"Insert the string `@table' in a Texinfo buffer." |
"Insert the string `@table' in a Texinfo buffer." |
848 |
(interactive "P") |
(interactive) |
849 |
(insert "@table ")) |
(insert "@table ")) |
850 |
|
|
851 |
(defun texinfo-insert-@var (&optional arg) |
(defun texinfo-insert-@var (&optional arg) |
882 |
|
|
883 |
(interactive "P") |
(interactive "P") |
884 |
;; First, remember current location |
;; First, remember current location |
885 |
(let ((source-buffer (current-buffer)) |
(let (current-location) |
|
current-location) |
|
886 |
(save-excursion |
(save-excursion |
887 |
(end-of-line) ; so as to find section on current line |
(end-of-line) ; so as to find section on current line |
888 |
(if (re-search-backward |
(if (re-search-backward |
893 |
(progn |
(progn |
894 |
(beginning-of-line) |
(beginning-of-line) |
895 |
(buffer-substring (point) (progn (end-of-line) (point))))) |
(buffer-substring (point) (progn (end-of-line) (point))))) |
896 |
;; else point is located before before any section command |
;; else point is located before any section command. |
897 |
(setq current-location "tex"))) |
(setq current-location "tex"))) |
898 |
;; Second, create and format an *Occur* buffer |
;; Second, create and format an *Occur* buffer |
899 |
(save-excursion |
(save-excursion |
1039 |
|
|
1040 |
(provide 'texinfo) |
(provide 'texinfo) |
1041 |
|
|
1042 |
|
;;; arch-tag: 005d7c38-43b9-4b7d-aa1d-aea69bae73e1 |
1043 |
;;; texinfo.el ends here |
;;; texinfo.el ends here |