2009-08-18 01:21:01 +00:00
|
|
|
|
;;; texinfo.el --- major mode for editing Texinfo files -*- coding: utf-8 -*-
|
1995-10-30 17:35:01 +00:00
|
|
|
|
|
2011-01-25 04:08:28 +00:00
|
|
|
|
;; Copyright (C) 1985, 1988-1993, 1996-1997, 2000-2011
|
2009-09-01 07:46:01 +00:00
|
|
|
|
;; Free Software Foundation, Inc.
|
1990-12-14 21:08:30 +00:00
|
|
|
|
|
1997-05-24 21:18:25 +00:00
|
|
|
|
;; Author: Robert J. Chassell
|
2000-10-10 19:35:00 +00:00
|
|
|
|
;; Date: [See date below for texinfo-version]
|
2003-12-30 10:59:36 +00:00
|
|
|
|
;; Maintainer: FSF
|
1997-05-24 21:18:25 +00:00
|
|
|
|
;; Keywords: maint, tex, docs
|
1992-07-22 02:58:21 +00:00
|
|
|
|
|
1995-10-30 17:35:01 +00:00
|
|
|
|
;; This file is part of GNU Emacs.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
2008-05-06 04:34:22 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
1990-06-28 21:32:49 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 04:34:22 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2008-05-06 04:34:22 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
2001-10-25 03:54:21 +00:00
|
|
|
|
;;; Todo:
|
|
|
|
|
|
|
|
|
|
;; - facemenu support.
|
2003-07-13 17:15:47 +00:00
|
|
|
|
;; - command completion.
|
2001-10-25 03:54:21 +00:00
|
|
|
|
|
2001-07-16 12:23:00 +00:00
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
1997-05-24 21:18:25 +00:00
|
|
|
|
;;; Code:
|
|
|
|
|
|
2000-12-08 16:31:50 +00:00
|
|
|
|
(eval-when-compile (require 'tex-mode) (require 'cl))
|
2005-08-31 10:32:55 +00:00
|
|
|
|
(defvar outline-heading-alist)
|
2000-12-06 19:34:15 +00:00
|
|
|
|
|
1997-04-12 02:51:38 +00:00
|
|
|
|
(defgroup texinfo nil
|
2005-07-04 03:45:56 +00:00
|
|
|
|
"Texinfo Mode."
|
2005-11-17 07:40:11 +00:00
|
|
|
|
:link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
|
1997-04-12 02:51:38 +00:00
|
|
|
|
:group 'docs)
|
|
|
|
|
|
2000-12-02 15:33:30 +00:00
|
|
|
|
;;;###autoload
|
2009-11-11 19:24:20 +00:00
|
|
|
|
(defcustom texinfo-open-quote (purecopy "``")
|
2007-09-10 04:02:09 +00:00
|
|
|
|
"String inserted by typing \\[texinfo-insert-quote] to open a quotation."
|
2000-12-02 15:33:30 +00:00
|
|
|
|
:type 'string
|
|
|
|
|
:group 'texinfo)
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2009-11-11 19:24:20 +00:00
|
|
|
|
(defcustom texinfo-close-quote (purecopy "''")
|
2007-09-10 04:02:09 +00:00
|
|
|
|
"String inserted by typing \\[texinfo-insert-quote] to close a quotation."
|
2000-12-02 15:33:30 +00:00
|
|
|
|
:type 'string
|
|
|
|
|
:group 'texinfo)
|
|
|
|
|
|
2003-12-30 10:59:36 +00:00
|
|
|
|
(defcustom texinfo-mode-hook nil
|
|
|
|
|
"Normal hook run when entering Texinfo mode."
|
|
|
|
|
:type 'hook
|
|
|
|
|
:options '(turn-on-auto-fill flyspell-mode)
|
|
|
|
|
:group 'texinfo)
|
|
|
|
|
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
;;; Autoloads:
|
|
|
|
|
|
|
|
|
|
(autoload 'makeinfo-region
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"makeinfo"
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Make Info file from region of current Texinfo file, and switch to it.
|
|
|
|
|
|
|
|
|
|
This command does not offer the `next-error' feature since it would
|
|
|
|
|
apply to a temporary file, not the original; use the `makeinfo-buffer'
|
|
|
|
|
command to gain use of `next-error'."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'makeinfo-buffer
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"makeinfo"
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Make Info file from current buffer.
|
|
|
|
|
|
1997-05-24 21:18:25 +00:00
|
|
|
|
Use the \\[next-error] command to move to the next error
|
1993-06-25 06:41:54 +00:00
|
|
|
|
\(if there are errors\)."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'kill-compilation
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"compile"
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Kill the process made by the \\[compile] command."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'makeinfo-recenter-compilation-buffer
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"makeinfo"
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Redisplay `*compilation*' buffer so most recent output can be seen.
|
|
|
|
|
The last line of the buffer is displayed on
|
|
|
|
|
line LINE of the window, or centered if LINE is nil."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-update-node
|
|
|
|
|
"texnfo-upd"
|
|
|
|
|
"Without any prefix argument, update the node in which point is located.
|
|
|
|
|
Non-nil argument (prefix, if interactive) means update the nodes in the
|
|
|
|
|
marked region.
|
|
|
|
|
|
|
|
|
|
The functions for creating or updating nodes and menus, and their
|
|
|
|
|
keybindings, are:
|
|
|
|
|
|
2000-12-06 19:34:15 +00:00
|
|
|
|
`texinfo-update-node' (&optional region-p) \\[texinfo-update-node]
|
|
|
|
|
`texinfo-every-node-update' () \\[texinfo-every-node-update]
|
|
|
|
|
`texinfo-sequential-node-update' (&optional region-p)
|
1997-05-24 21:18:25 +00:00
|
|
|
|
|
2000-12-06 19:34:15 +00:00
|
|
|
|
`texinfo-make-menu' (&optional region-p) \\[texinfo-make-menu]
|
|
|
|
|
`texinfo-all-menus-update' () \\[texinfo-all-menus-update]
|
|
|
|
|
`texinfo-master-menu' ()
|
1997-05-24 21:18:25 +00:00
|
|
|
|
|
2000-12-06 19:34:15 +00:00
|
|
|
|
`texinfo-indent-menu-description' (column &optional region-p)
|
1997-05-24 21:18:25 +00:00
|
|
|
|
|
|
|
|
|
The `texinfo-column-for-description' variable specifies the column to
|
|
|
|
|
which menu descriptions are indented. Its default value is 32."
|
|
|
|
|
t nil)
|
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-every-node-update
|
|
|
|
|
"texnfo-upd"
|
|
|
|
|
"Update every node in a Texinfo file."
|
|
|
|
|
t nil)
|
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-sequential-node-update
|
|
|
|
|
"texnfo-upd"
|
|
|
|
|
"Update one node (or many) in a Texinfo file with sequential pointers.
|
|
|
|
|
|
|
|
|
|
This function causes the `Next' or `Previous' pointer to point to the
|
|
|
|
|
immediately preceding or following node, even if it is at a higher or
|
|
|
|
|
lower hierarchical level in the document. Continually pressing `n' or
|
|
|
|
|
`p' takes you straight through the file.
|
|
|
|
|
|
|
|
|
|
Without any prefix argument, update the node in which point is located.
|
|
|
|
|
Non-nil argument (prefix, if interactive) means update the nodes in the
|
|
|
|
|
marked region.
|
|
|
|
|
|
|
|
|
|
This command makes it awkward to navigate among sections and
|
|
|
|
|
subsections; it should be used only for those documents that are meant
|
|
|
|
|
to be read like a novel rather than a reference, and for which the
|
|
|
|
|
Info `g*' command is inadequate."
|
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-make-menu
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"texnfo-upd"
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Without any prefix argument, make or update a menu.
|
|
|
|
|
Make the menu for the section enclosing the node found following point.
|
|
|
|
|
|
|
|
|
|
Non-nil argument (prefix, if interactive) means make or update menus
|
|
|
|
|
for nodes within or part of the marked region.
|
|
|
|
|
|
|
|
|
|
Whenever a menu exists, and is being updated, the descriptions that
|
|
|
|
|
are associated with node names in the pre-existing menu are
|
|
|
|
|
incorporated into the new menu. Otherwise, the nodes' section titles
|
|
|
|
|
are inserted as descriptions."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-all-menus-update
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"texnfo-upd"
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Update every regular menu in a Texinfo file.
|
|
|
|
|
Remove pre-existing master menu, if there is one.
|
|
|
|
|
|
|
|
|
|
If called with a non-nil argument, this function first updates all the
|
|
|
|
|
nodes in the buffer before updating the menus."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-master-menu
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"texnfo-upd"
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Make a master menu for a whole Texinfo file.
|
|
|
|
|
Non-nil argument (prefix, if interactive) means first update all
|
|
|
|
|
existing nodes and menus. Remove pre-existing master menu, if there is one.
|
|
|
|
|
|
|
|
|
|
This function creates a master menu that follows the top node. The
|
|
|
|
|
master menu includes every entry from all the other menus. It
|
|
|
|
|
replaces any existing ordinary menu that follows the top node.
|
|
|
|
|
|
|
|
|
|
If called with a non-nil argument, this function first updates all the
|
|
|
|
|
menus in the buffer (incorporating descriptions from pre-existing
|
|
|
|
|
menus) before it constructs the master menu.
|
|
|
|
|
|
|
|
|
|
The function removes the detailed part of an already existing master
|
1996-01-04 23:50:14 +00:00
|
|
|
|
menu. This action depends on the pre-existing master menu using the
|
1993-06-25 06:41:54 +00:00
|
|
|
|
standard `texinfo-master-menu-header'.
|
|
|
|
|
|
|
|
|
|
The master menu has the following format, which is adapted from the
|
|
|
|
|
recommendation in the Texinfo Manual:
|
|
|
|
|
|
|
|
|
|
* The first part contains the major nodes in the Texinfo file: the
|
|
|
|
|
nodes for the chapters, chapter-like sections, and the major
|
|
|
|
|
appendices. This includes the indices, so long as they are in
|
|
|
|
|
chapter-like sections, such as unnumbered sections.
|
|
|
|
|
|
|
|
|
|
* The second and subsequent parts contain a listing of the other,
|
|
|
|
|
lower level menus, in order. This way, an inquirer can go
|
|
|
|
|
directly to a particular node if he or she is searching for
|
|
|
|
|
specific information.
|
|
|
|
|
|
|
|
|
|
Each of the menus in the detailed node listing is introduced by the
|
|
|
|
|
title of the section containing the menu."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-indent-menu-description
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"texnfo-upd"
|
|
|
|
|
"Indent every description in menu following point to COLUMN.
|
1993-06-25 06:41:54 +00:00
|
|
|
|
Non-nil argument (prefix, if interactive) means indent every
|
|
|
|
|
description in every menu in the region. Does not indent second and
|
|
|
|
|
subsequent lines of a multi-line description."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-insert-node-lines
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"texnfo-upd"
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert missing `@node' lines in region of Texinfo file.
|
|
|
|
|
Non-nil argument (prefix, if interactive) means also to insert the
|
|
|
|
|
section titles as node names; and also to insert the section titles as
|
|
|
|
|
node names in pre-existing @node lines that lack names."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-start-menu-description
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"texnfo-upd"
|
|
|
|
|
"In this menu entry, insert the node's section title as a description.
|
1993-06-25 06:41:54 +00:00
|
|
|
|
Position point at beginning of description ready for editing.
|
|
|
|
|
Do not insert a title if the line contains an existing description.
|
|
|
|
|
|
|
|
|
|
You will need to edit the inserted text since a useful description
|
|
|
|
|
complements the node name rather than repeats it as a title does."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(autoload 'texinfo-multiple-files-update
|
1997-05-24 21:18:25 +00:00
|
|
|
|
"texnfo-upd"
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Update first node pointers in each file included in OUTER-FILE;
|
1997-05-24 21:18:25 +00:00
|
|
|
|
create or update main menu in the outer file that refers to such nodes.
|
1993-06-25 06:41:54 +00:00
|
|
|
|
This does not create or update menus or pointers within the included files.
|
|
|
|
|
|
|
|
|
|
With optional MAKE-MASTER-MENU argument (prefix arg, if interactive),
|
|
|
|
|
insert a master menu in OUTER-FILE. This does not create or update
|
|
|
|
|
menus or pointers within the included files.
|
|
|
|
|
|
|
|
|
|
With optional UPDATE-EVERYTHING argument (numeric prefix arg, if
|
|
|
|
|
interactive), update all the menus and all the `Next', `Previous', and
|
|
|
|
|
`Up' pointers of all the files included in OUTER-FILE before inserting
|
|
|
|
|
a master menu in OUTER-FILE.
|
|
|
|
|
|
|
|
|
|
The command also updates the `Top' level node pointers of OUTER-FILE.
|
|
|
|
|
|
1997-05-24 21:18:25 +00:00
|
|
|
|
Notes:
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
* this command does NOT save any files--you must save the
|
|
|
|
|
outer file and any modified, included files.
|
|
|
|
|
|
|
|
|
|
* except for the `Top' node, this command does NOT handle any
|
|
|
|
|
pre-existing nodes in the outer file; hence, indices must be
|
|
|
|
|
enclosed in an included file.
|
|
|
|
|
|
|
|
|
|
Requirements:
|
|
|
|
|
|
|
|
|
|
* each of the included files must contain exactly one highest
|
1997-05-24 21:18:25 +00:00
|
|
|
|
hierarchical level node,
|
1993-06-25 06:41:54 +00:00
|
|
|
|
* this highest node must be the first node in the included file,
|
|
|
|
|
* each highest hierarchical level node must be of the same type.
|
|
|
|
|
|
|
|
|
|
Thus, normally, each included file contains one, and only one,
|
|
|
|
|
chapter."
|
1997-05-24 21:18:25 +00:00
|
|
|
|
t nil)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
|
1992-07-16 21:47:34 +00:00
|
|
|
|
;;; Code:
|
|
|
|
|
|
1993-05-16 21:14:05 +00:00
|
|
|
|
;;; Don't you dare insert any `require' calls at top level in this file--rms.
|
1993-05-16 21:11:54 +00:00
|
|
|
|
|
2000-10-01 00:30:52 +00:00
|
|
|
|
(defvar texinfo-section-list
|
|
|
|
|
'(("top" 1)
|
|
|
|
|
("chapter" 2)
|
|
|
|
|
("section" 3)
|
|
|
|
|
("subsection" 4)
|
|
|
|
|
("subsubsection" 5)
|
2003-03-14 22:29:13 +00:00
|
|
|
|
("unnumbered" 2)
|
|
|
|
|
("unnumberedsec" 3)
|
|
|
|
|
("unnumberedsubsec" 4)
|
2000-10-01 00:30:52 +00:00
|
|
|
|
("unnumberedsubsubsec" 5)
|
2003-03-14 22:29:13 +00:00
|
|
|
|
("appendix" 2)
|
|
|
|
|
("appendixsec" 3)
|
2003-07-13 17:15:47 +00:00
|
|
|
|
("appendixsection" 3)
|
2003-03-14 22:29:13 +00:00
|
|
|
|
("appendixsubsec" 4)
|
2000-10-01 00:30:52 +00:00
|
|
|
|
("appendixsubsubsec" 5)
|
2003-03-14 22:29:13 +00:00
|
|
|
|
("majorheading" 2)
|
|
|
|
|
("chapheading" 2)
|
|
|
|
|
("heading" 3)
|
|
|
|
|
("subheading" 4)
|
2000-10-01 00:30:52 +00:00
|
|
|
|
("subsubheading" 5))
|
|
|
|
|
"Alist of sectioning commands and their relative level.")
|
|
|
|
|
|
1993-06-25 06:41:54 +00:00
|
|
|
|
;;; Syntax table
|
1993-05-19 16:52:19 +00:00
|
|
|
|
|
2007-09-10 04:02:09 +00:00
|
|
|
|
(defvar texinfo-mode-syntax-table
|
|
|
|
|
(let ((st (make-syntax-table)))
|
|
|
|
|
(modify-syntax-entry ?\" "." st)
|
|
|
|
|
(modify-syntax-entry ?\\ "." st)
|
|
|
|
|
(modify-syntax-entry ?@ "\\" st)
|
|
|
|
|
(modify-syntax-entry ?\^q "\\" st)
|
|
|
|
|
(modify-syntax-entry ?\[ "(]" st)
|
|
|
|
|
(modify-syntax-entry ?\] ")[" st)
|
|
|
|
|
(modify-syntax-entry ?{ "(}" st)
|
|
|
|
|
(modify-syntax-entry ?} "){" st)
|
|
|
|
|
(modify-syntax-entry ?\n ">" st)
|
|
|
|
|
(modify-syntax-entry ?\' "w" st)
|
|
|
|
|
st))
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
1995-07-28 00:24:14 +00:00
|
|
|
|
;; Written by Wolfgang Bangerth <zcg51122@rpool1.rus.uni-stuttgart.de>
|
1996-01-04 23:50:14 +00:00
|
|
|
|
;; To override this example, set either `imenu-generic-expression'
|
1995-07-28 00:24:14 +00:00
|
|
|
|
;; or `imenu-create-index-function'.
|
|
|
|
|
(defvar texinfo-imenu-generic-expression
|
2000-12-06 19:34:15 +00:00
|
|
|
|
'((nil "^@\\(node\\|anchor\\)[ \t]+\\([^,\n]*\\)" 2)
|
1995-07-28 00:24:14 +00:00
|
|
|
|
("Chapters" "^@chapter[ \t]+\\(.*\\)$" 1))
|
2004-01-20 01:28:15 +00:00
|
|
|
|
"Imenu generic expression for Texinfo mode. See `imenu-generic-expression'.")
|
1995-07-28 00:24:14 +00:00
|
|
|
|
|
New syntax-propertize functionality.
* lisp/font-lock.el (font-lock-syntactic-keywords): Make obsolete.
(font-lock-fontify-syntactic-keywords-region): Move handling of
font-lock-syntactically-fontified to...
(font-lock-default-fontify-region): ...here.
Let syntax-propertize-function take precedence.
(font-lock-fontify-syntactically-region): Cal syntax-propertize.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-depth): Skip named groups.
* lisp/emacs-lisp/syntax.el (syntax-propertize-function)
(syntax-propertize-chunk-size, syntax-propertize--done)
(syntax-propertize-extend-region-functions): New vars.
(syntax-propertize-wholelines, syntax-propertize-multiline)
(syntax-propertize--shift-groups, syntax-propertize-via-font-lock)
(syntax-propertize): New functions.
(syntax-propertize-rules): New macro.
(syntax-ppss-flush-cache): Set syntax-propertize--done.
(syntax-ppss): Call syntax-propertize.
* lisp/progmodes/ada-mode.el (ada-set-syntax-table-properties)
(ada-after-change-function, ada-initialize-syntax-table-properties)
(ada-handle-syntax-table-properties): Only define when
syntax-propertize is not available.
(ada-mode): Use syntax-propertize-function.
* lisp/progmodes/autoconf.el (autoconf-mode):
Use syntax-propertize-function.
(autoconf-font-lock-syntactic-keywords): Remove.
* lisp/progmodes/cfengine.el (cfengine-mode):
Use syntax-propertize-function.
(cfengine-font-lock-syntactic-keywords): Remove.
* lisp/progmodes/cperl-mode.el (cperl-mode): Use syntax-propertize-function.
* lisp/progmodes/fortran.el (fortran-mode): Use syntax-propertize-function.
(fortran--font-lock-syntactic-keywords): New var.
(fortran-line-length): Update syntax-propertize-function and
fortran--font-lock-syntactic-keywords.
* lisp/progmodes/gud.el (gdb-script-syntax-propertize-function): New var;
replaces gdb-script-font-lock-syntactic-keywords.
(gdb-script-mode): Use it.
* lisp/progmodes/js.el (js--regexp-literal): Define while compiling.
(js-syntax-propertize-function): New var; replaces
js-font-lock-syntactic-keywords.
(js-mode): Use it.
* lisp/progmodes/make-mode.el (makefile-syntax-propertize-function):
New var; replaces makefile-font-lock-syntactic-keywords.
(makefile-mode): Use it.
(makefile-imake-mode): Adjust.
* lisp/progmodes/mixal-mode.el (mixal-syntax-propertize-function): New var;
replaces mixal-font-lock-syntactic-keywords.
(mixal-mode): Use it.
* lisp/progmodes/octave-mod.el (octave-syntax-propertize-sqs): New function
to replace octave-font-lock-close-quotes.
(octave-syntax-propertize-function): New function to replace
octave-font-lock-syntactic-keywords.
(octave-mode): Use it.
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): New fun to
replace perl-font-lock-syntactic-keywords.
(perl-syntax-propertize-special-constructs): New fun to replace
perl-font-lock-special-syntactic-constructs.
(perl-font-lock-syntactic-face-function): New fun.
(perl-mode): Use it.
* lisp/progmodes/python.el (python-syntax-propertize-function): New var to
replace python-font-lock-syntactic-keywords.
(python-mode): Use it.
(python-quote-syntax): Simplify and adjust to new use.
* lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-re):
Define while compiling.
(ruby-here-doc-end-re, ruby-here-doc-beg-match)
(ruby-font-lock-syntactic-keywords, ruby-comment-beg-syntax)
(syntax-ppss, ruby-in-ppss-context-p, ruby-in-here-doc-p)
(ruby-here-doc-find-end, ruby-here-doc-beg-syntax)
(ruby-here-doc-end-syntax): Only define when
syntax-propertize is not available.
(ruby-syntax-propertize-function, ruby-syntax-propertize-heredoc):
New functions.
(ruby-in-ppss-context-p): Update to new syntax of heredocs.
(electric-indent-chars): Silence bytecompiler.
(ruby-mode): Use prog-mode, syntax-propertize-function, and
electric-indent-chars.
* lisp/progmodes/sh-script.el (sh-st-symbol): Remove.
(sh-font-lock-close-heredoc, sh-font-lock-open-heredoc): Add eol arg.
(sh-font-lock-flush-syntax-ppss-cache, sh-font-lock-here-doc): Remove.
(sh-font-lock-quoted-subshell): Assume we've already matched $(.
(sh-font-lock-paren): Set syntax-multiline.
(sh-font-lock-syntactic-keywords): Remove.
(sh-syntax-propertize-function): New function to replace it.
(sh-mode): Use it.
* lisp/progmodes/simula.el (simula-syntax-propertize-function): New var to
replace simula-font-lock-syntactic-keywords.
(simula-mode): Use it.
* lisp/progmodes/tcl.el (tcl-syntax-propertize-function): New var to
replace tcl-font-lock-syntactic-keywords.
(tcl-mode): Use it.
* lisp/progmodes/vhdl-mode.el (vhdl-mode): Use syntax-propertize-function
if available.
(vhdl-fontify-buffer): Adjust.
* lisp/textmodes/bibtex.el (bibtex-mode): Use syntax-propertize-function.
* lisp/textmodes/reftex.el (font-lock-syntactic-keywords): Don't declare
since we don't use it.
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-function): New var to
replace sgml-font-lock-syntactic-keywords.
(sgml-mode): Use it.
* lisp/textmodes/tex-mode.el (tex-common-initialization, doctex-mode):
Use syntax-propertize-function.
* lisp/textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun
to replace texinfo-font-lock-syntactic-keywords.
(texinfo-mode): Use it.
* test/indent/octave.m: Remove some `fixindent' not needed any more.
2010-09-10 23:13:42 +00:00
|
|
|
|
(defconst texinfo-syntax-propertize-function
|
|
|
|
|
(syntax-propertize-rules
|
|
|
|
|
("\\(@\\)c\\(omment\\)?\\>" (1 "<"))
|
|
|
|
|
("^\\(@\\)ignore\\>" (1 "< b"))
|
|
|
|
|
("^@end ignore\\(\n\\)" (1 "> b")))
|
2000-04-17 11:45:39 +00:00
|
|
|
|
"Syntactic keywords to catch comment delimiters in `texinfo-mode'.")
|
|
|
|
|
|
2001-10-25 03:54:21 +00:00
|
|
|
|
(defconst texinfo-environments
|
2003-02-04 13:30:45 +00:00
|
|
|
|
'("cartouche" "copying" "defcv" "deffn" "defivar" "defmac"
|
2002-10-29 07:52:32 +00:00
|
|
|
|
"defmethod" "defop" "defopt" "defspec" "deftp" "deftypefn"
|
|
|
|
|
"deftypefun" "deftypevar" "deftypevr" "defun" "defvar"
|
|
|
|
|
"defvr" "description" "detailmenu" "direntry" "display"
|
|
|
|
|
"documentdescription" "enumerate" "example" "flushleft"
|
|
|
|
|
"flushright" "format" "ftable" "group" "ifclear" "ifset"
|
|
|
|
|
"ifhtml" "ifinfo" "ifnothtml" "ifnotinfo" "ifnotplaintext"
|
|
|
|
|
"ifnottex" "ifplaintext" "iftex" "ignore" "itemize" "lisp"
|
|
|
|
|
"macro" "menu" "multitable" "quotation" "smalldisplay"
|
|
|
|
|
"smallexample" "smallformat" "smalllisp" "table" "tex"
|
|
|
|
|
"titlepage" "verbatim" "vtable")
|
2004-01-20 01:28:15 +00:00
|
|
|
|
"List of Texinfo environments.")
|
2001-10-25 03:54:21 +00:00
|
|
|
|
|
|
|
|
|
(defconst texinfo-environment-regexp
|
|
|
|
|
(concat "^@" (regexp-opt (cons "end" texinfo-environments) t) "\\>")
|
2004-01-20 01:28:15 +00:00
|
|
|
|
"Regexp for environment-like Texinfo list commands.
|
2001-10-25 03:54:21 +00:00
|
|
|
|
Subexpression 1 is what goes into the corresponding `@end' statement.")
|
|
|
|
|
|
2005-06-10 10:46:19 +00:00
|
|
|
|
(defface texinfo-heading
|
2000-10-01 00:30:52 +00:00
|
|
|
|
'((t (:inherit font-lock-function-name-face)))
|
2005-05-27 13:09:37 +00:00
|
|
|
|
"Face used for section headings in `texinfo-mode'."
|
|
|
|
|
:group 'texinfo)
|
2009-09-01 07:46:01 +00:00
|
|
|
|
(define-obsolete-face-alias 'texinfo-heading-face 'texinfo-heading "22.1")
|
2005-06-10 10:46:19 +00:00
|
|
|
|
(defvar texinfo-heading-face 'texinfo-heading)
|
2000-10-01 00:30:52 +00:00
|
|
|
|
|
1994-10-07 10:05:49 +00:00
|
|
|
|
(defvar texinfo-font-lock-keywords
|
2000-10-01 00:30:52 +00:00
|
|
|
|
`(;; All but the first had an OVERRIDE of t.
|
1996-01-25 10:40:02 +00:00
|
|
|
|
;; It didn't seem to be any better, and it's slower--simon.
|
1999-08-16 04:04:27 +00:00
|
|
|
|
;; Robert J. Chassell <bob@gnu.org> says remove this line.
|
1997-05-24 21:18:25 +00:00
|
|
|
|
;;("\\$\\([^$]*\\)\\$" 1 font-lock-string-face t)
|
|
|
|
|
("@\\([a-zA-Z]+\\|[^ \t\n]\\)" 1 font-lock-keyword-face) ;commands
|
2001-10-25 03:54:21 +00:00
|
|
|
|
("^\\*\\([^\n:]*\\)" 1 font-lock-function-name-face t) ;menu items
|
|
|
|
|
("@\\(emph\\|i\\|sc\\){\\([^}]+\\)" 2 'italic)
|
|
|
|
|
("@\\(strong\\|b\\){\\([^}]+\\)" 2 'bold)
|
|
|
|
|
("@\\(kbd\\|key\\|url\\|uref\\){\\([^}]+\\)" 2 font-lock-string-face)
|
2001-04-11 08:02:51 +00:00
|
|
|
|
;; The following two groups have an OVERRIDE of `keep' because
|
|
|
|
|
;; their arguments frequently include a @@, and we don't want that
|
|
|
|
|
;; to overwrite the normal fontification of the argument.
|
|
|
|
|
("@\\(file\\|email\\){\\([^}]+\\)" 2 font-lock-string-face keep)
|
1999-09-14 10:15:51 +00:00
|
|
|
|
("@\\(samp\\|code\\|var\\|math\\|env\\|command\\|option\\){\\([^}]+\\)"
|
2001-04-11 08:02:51 +00:00
|
|
|
|
2 font-lock-variable-name-face keep)
|
|
|
|
|
("@\\(cite\\|x?ref\\|pxref\\|dfn\\|inforef\\){\\([^}]+\\)"
|
|
|
|
|
2 font-lock-constant-face)
|
|
|
|
|
("@\\(anchor\\){\\([^}]+\\)" 2 font-lock-type-face)
|
|
|
|
|
("@\\(dmn\\|acronym\\|value\\){\\([^}]+\\)" 2 font-lock-builtin-face)
|
2001-10-25 03:54:21 +00:00
|
|
|
|
("@\\(end\\|itemx?\\) +\\(.+\\)" 2 font-lock-keyword-face keep)
|
2002-07-07 20:14:28 +00:00
|
|
|
|
;; (,texinfo-environment-regexp
|
|
|
|
|
;; 1 (texinfo-clone-environment (match-beginning 1) (match-end 1)) keep)
|
2000-10-01 00:30:52 +00:00
|
|
|
|
(,(concat "^@" (regexp-opt (mapcar 'car texinfo-section-list) t)
|
2000-12-06 19:34:15 +00:00
|
|
|
|
".*\n") 0 texinfo-heading-face t))
|
2004-01-20 01:28:15 +00:00
|
|
|
|
"Additional expressions to highlight in Texinfo mode.")
|
1996-03-05 21:42:17 +00:00
|
|
|
|
|
2001-10-25 03:54:21 +00:00
|
|
|
|
(defun texinfo-clone-environment (start end)
|
|
|
|
|
(let ((endp nil))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(ignore-errors
|
|
|
|
|
(goto-char start)
|
|
|
|
|
(when (looking-at "end\\Sw+\\(\\sw+\\)")
|
|
|
|
|
(setq endp t start (match-beginning 1) end (match-end 1)))
|
|
|
|
|
(unless (get-char-property start 'text-clones)
|
|
|
|
|
(if endp
|
|
|
|
|
(texinfo-last-unended-begin)
|
|
|
|
|
(forward-word 1)
|
|
|
|
|
(texinfo-next-unmatched-end))
|
|
|
|
|
(skip-syntax-forward "^w")
|
2002-07-07 20:14:28 +00:00
|
|
|
|
(when (looking-at
|
|
|
|
|
(concat (regexp-quote (buffer-substring start end)) "\\>"))
|
2001-10-25 03:54:21 +00:00
|
|
|
|
(text-clone-create start end 'spread "\\w*")))))))
|
|
|
|
|
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
;;; Keybindings
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
1993-06-25 06:41:54 +00:00
|
|
|
|
;;; Keys common both to Texinfo mode and to TeX shell.
|
|
|
|
|
|
|
|
|
|
(defun texinfo-define-common-keys (keymap)
|
|
|
|
|
"Define the keys both in Texinfo mode and in the texinfo-tex-shell."
|
|
|
|
|
(define-key keymap "\C-c\C-t\C-k" 'tex-kill-job)
|
|
|
|
|
(define-key keymap "\C-c\C-t\C-x" 'texinfo-quit-job)
|
|
|
|
|
(define-key keymap "\C-c\C-t\C-l" 'tex-recenter-output-buffer)
|
|
|
|
|
(define-key keymap "\C-c\C-t\C-d" 'texinfo-delete-from-print-queue)
|
|
|
|
|
(define-key keymap "\C-c\C-t\C-q" 'tex-show-print-queue)
|
|
|
|
|
(define-key keymap "\C-c\C-t\C-p" 'texinfo-tex-print)
|
1997-01-02 20:49:15 +00:00
|
|
|
|
(define-key keymap "\C-c\C-t\C-v" 'texinfo-tex-view)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
(define-key keymap "\C-c\C-t\C-i" 'texinfo-texindex)
|
|
|
|
|
|
|
|
|
|
(define-key keymap "\C-c\C-t\C-r" 'texinfo-tex-region)
|
|
|
|
|
(define-key keymap "\C-c\C-t\C-b" 'texinfo-tex-buffer))
|
|
|
|
|
|
1997-05-24 21:18:25 +00:00
|
|
|
|
;; Mode documentation displays commands in reverse order
|
1990-06-28 21:32:49 +00:00
|
|
|
|
;; from how they are listed in the texinfo-mode-map.
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
2007-09-10 04:02:09 +00:00
|
|
|
|
(defvar texinfo-mode-map
|
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
|
|
|
|
|
|
;; bindings for `texnfo-tex.el'
|
|
|
|
|
(texinfo-define-common-keys map)
|
|
|
|
|
|
|
|
|
|
(define-key map "\"" 'texinfo-insert-quote)
|
|
|
|
|
|
|
|
|
|
;; bindings for `makeinfo.el'
|
|
|
|
|
(define-key map "\C-c\C-m\C-k" 'kill-compilation)
|
|
|
|
|
(define-key map "\C-c\C-m\C-l"
|
|
|
|
|
'makeinfo-recenter-compilation-buffer)
|
|
|
|
|
(define-key map "\C-c\C-m\C-r" 'makeinfo-region)
|
|
|
|
|
(define-key map "\C-c\C-m\C-b" 'makeinfo-buffer)
|
|
|
|
|
|
|
|
|
|
;; bindings for `texinfmt.el'
|
|
|
|
|
(define-key map "\C-c\C-e\C-r" 'texinfo-format-region)
|
|
|
|
|
(define-key map "\C-c\C-e\C-b" 'texinfo-format-buffer)
|
|
|
|
|
|
|
|
|
|
;; AUCTeX-like bindings
|
|
|
|
|
(define-key map "\e\r" 'texinfo-insert-@item)
|
|
|
|
|
|
|
|
|
|
;; bindings for updating nodes and menus
|
|
|
|
|
|
|
|
|
|
(define-key map "\C-c\C-um" 'texinfo-master-menu)
|
|
|
|
|
|
|
|
|
|
(define-key map "\C-c\C-u\C-m" 'texinfo-make-menu)
|
|
|
|
|
(define-key map "\C-c\C-u\C-n" 'texinfo-update-node)
|
|
|
|
|
(define-key map "\C-c\C-u\C-e" 'texinfo-every-node-update)
|
|
|
|
|
(define-key map "\C-c\C-u\C-a" 'texinfo-all-menus-update)
|
|
|
|
|
|
|
|
|
|
(define-key map "\C-c\C-s" 'texinfo-show-structure)
|
|
|
|
|
|
|
|
|
|
(define-key map "\C-c}" 'up-list)
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
;; FIXME: This is often used for "close block" aka texinfo-insert-@end.
|
2007-09-10 04:02:09 +00:00
|
|
|
|
(define-key map "\C-c]" 'up-list)
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-key map "\C-c/" 'texinfo-insert-@end)
|
2007-09-10 04:02:09 +00:00
|
|
|
|
(define-key map "\C-c{" 'texinfo-insert-braces)
|
|
|
|
|
|
|
|
|
|
;; bindings for inserting strings
|
|
|
|
|
(define-key map "\C-c\C-o" 'texinfo-insert-block)
|
|
|
|
|
(define-key map "\C-c\C-c\C-d" 'texinfo-start-menu-description)
|
|
|
|
|
(define-key map "\C-c\C-c\C-s" 'texinfo-insert-@strong)
|
|
|
|
|
(define-key map "\C-c\C-c\C-e" 'texinfo-insert-@emph)
|
|
|
|
|
|
|
|
|
|
(define-key map "\C-c\C-cv" 'texinfo-insert-@var)
|
|
|
|
|
(define-key map "\C-c\C-cu" 'texinfo-insert-@uref)
|
|
|
|
|
(define-key map "\C-c\C-ct" 'texinfo-insert-@table)
|
|
|
|
|
(define-key map "\C-c\C-cs" 'texinfo-insert-@samp)
|
|
|
|
|
(define-key map "\C-c\C-cq" 'texinfo-insert-@quotation)
|
|
|
|
|
(define-key map "\C-c\C-co" 'texinfo-insert-@noindent)
|
|
|
|
|
(define-key map "\C-c\C-cn" 'texinfo-insert-@node)
|
|
|
|
|
(define-key map "\C-c\C-cm" 'texinfo-insert-@email)
|
|
|
|
|
(define-key map "\C-c\C-ck" 'texinfo-insert-@kbd)
|
|
|
|
|
(define-key map "\C-c\C-ci" 'texinfo-insert-@item)
|
|
|
|
|
(define-key map "\C-c\C-cf" 'texinfo-insert-@file)
|
|
|
|
|
(define-key map "\C-c\C-cx" 'texinfo-insert-@example)
|
|
|
|
|
(define-key map "\C-c\C-ce" 'texinfo-insert-@end)
|
|
|
|
|
(define-key map "\C-c\C-cd" 'texinfo-insert-@dfn)
|
|
|
|
|
(define-key map "\C-c\C-cc" 'texinfo-insert-@code)
|
|
|
|
|
map))
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
2000-10-01 00:30:52 +00:00
|
|
|
|
(easy-menu-define texinfo-mode-menu
|
|
|
|
|
texinfo-mode-map
|
|
|
|
|
"Menu used for `texinfo-mode'."
|
|
|
|
|
'("Texinfo"
|
|
|
|
|
["Insert block" texinfo-insert-block t]
|
|
|
|
|
;; ["Insert node" texinfo-insert-@node t]
|
|
|
|
|
"----"
|
2000-10-03 18:33:10 +00:00
|
|
|
|
["Update All" (lambda () (interactive) (texinfo-master-menu t))
|
|
|
|
|
:keys "\\[universal-argument] \\[texinfo-master-menu]"]
|
2000-10-01 00:30:52 +00:00
|
|
|
|
["Update every node" texinfo-every-node-update t]
|
|
|
|
|
["Update node" texinfo-update-node t]
|
|
|
|
|
["Make Master menu" texinfo-master-menu t]
|
|
|
|
|
["Make menu" texinfo-make-menu t]
|
|
|
|
|
["Update all menus" texinfo-all-menus-update t]
|
|
|
|
|
"----"
|
|
|
|
|
["Show structure" texinfo-show-structure t]
|
|
|
|
|
["Format region" texinfo-format-region t]
|
|
|
|
|
["Format buffer" texinfo-format-buffer t]
|
|
|
|
|
["Makeinfo region" makeinfo-region t]
|
|
|
|
|
["Makeinfo buffer" makeinfo-buffer t]))
|
|
|
|
|
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
2000-12-08 16:31:50 +00:00
|
|
|
|
(defun texinfo-filter (section list)
|
|
|
|
|
(let (res)
|
|
|
|
|
(dolist (x list) (if (eq section (cadr x)) (push (car x) res)))
|
|
|
|
|
res))
|
|
|
|
|
|
|
|
|
|
(defvar texinfo-chapter-level-regexp
|
|
|
|
|
(regexp-opt (texinfo-filter 2 texinfo-section-list))
|
|
|
|
|
"Regular expression matching just the Texinfo chapter level headings.")
|
|
|
|
|
|
1993-06-25 06:41:54 +00:00
|
|
|
|
;;; Texinfo mode
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
1991-05-09 21:50:55 +00:00
|
|
|
|
;;;###autoload
|
2000-04-17 11:45:39 +00:00
|
|
|
|
(define-derived-mode texinfo-mode text-mode "Texinfo"
|
1990-07-27 16:01:02 +00:00
|
|
|
|
"Major mode for editing Texinfo files.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
It has these extra commands:
|
|
|
|
|
\\{texinfo-mode-map}
|
|
|
|
|
|
1990-07-27 16:01:02 +00:00
|
|
|
|
These are files that are used as input for TeX to make printed manuals
|
1993-06-25 06:41:54 +00:00
|
|
|
|
and also to be turned into Info files with \\[makeinfo-buffer] or
|
|
|
|
|
the `makeinfo' program. These files must be written in a very restricted and
|
1990-07-27 16:01:02 +00:00
|
|
|
|
modified version of TeX input format.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
Editing commands are like text-mode except that the syntax table is
|
1990-07-27 16:01:02 +00:00
|
|
|
|
set up so expression commands skip Texinfo bracket groups. To see
|
|
|
|
|
what the Info version of a region of the Texinfo file will look like,
|
1993-06-25 06:41:54 +00:00
|
|
|
|
use \\[makeinfo-region], which runs `makeinfo' on the current region.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
1990-07-27 16:01:02 +00:00
|
|
|
|
You can show the structure of a Texinfo file with \\[texinfo-show-structure].
|
|
|
|
|
This command shows the structure of a Texinfo file by listing the
|
|
|
|
|
lines with the @-sign commands for @chapter, @section, and the like.
|
|
|
|
|
These lines are displayed in another window called the *Occur* window.
|
|
|
|
|
In that window, you can position the cursor over one of the lines and
|
|
|
|
|
use \\[occur-mode-goto-occurrence], to jump to the corresponding spot
|
|
|
|
|
in the Texinfo file.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
1990-07-27 16:01:02 +00:00
|
|
|
|
In addition, Texinfo mode provides commands that insert various
|
1990-06-28 21:32:49 +00:00
|
|
|
|
frequently used @-sign commands into the buffer. You can use these
|
|
|
|
|
commands to save keystrokes. And you can insert balanced braces with
|
|
|
|
|
\\[texinfo-insert-braces] and later use the command \\[up-list] to
|
|
|
|
|
move forward past the closing brace.
|
|
|
|
|
|
1990-07-27 16:01:02 +00:00
|
|
|
|
Also, Texinfo mode provides functions for automatically creating or
|
1990-06-28 21:32:49 +00:00
|
|
|
|
updating menus and node pointers. These functions
|
|
|
|
|
|
|
|
|
|
* insert the `Next', `Previous' and `Up' pointers of a node,
|
|
|
|
|
* insert or update the menu for a section, and
|
1990-07-27 16:01:02 +00:00
|
|
|
|
* create a master menu for a Texinfo source file.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
Here are the functions:
|
|
|
|
|
|
|
|
|
|
texinfo-update-node \\[texinfo-update-node]
|
|
|
|
|
texinfo-every-node-update \\[texinfo-every-node-update]
|
1997-05-24 21:18:25 +00:00
|
|
|
|
texinfo-sequential-node-update
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
texinfo-make-menu \\[texinfo-make-menu]
|
|
|
|
|
texinfo-all-menus-update \\[texinfo-all-menus-update]
|
|
|
|
|
texinfo-master-menu
|
|
|
|
|
|
|
|
|
|
texinfo-indent-menu-description (column &optional region-p)
|
|
|
|
|
|
|
|
|
|
The `texinfo-column-for-description' variable specifies the column to
|
1997-05-24 21:18:25 +00:00
|
|
|
|
which menu descriptions are indented.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
Passed an argument (a prefix argument, if interactive), the
|
|
|
|
|
`texinfo-update-node' and `texinfo-make-menu' functions do their jobs
|
|
|
|
|
in the region.
|
|
|
|
|
|
1990-07-27 16:01:02 +00:00
|
|
|
|
To use the updating commands, you must structure your Texinfo file
|
1990-06-28 21:32:49 +00:00
|
|
|
|
hierarchically, such that each `@node' line, with the exception of the
|
1990-07-27 16:01:02 +00:00
|
|
|
|
Top node, is accompanied by some kind of section line, such as an
|
1990-06-28 21:32:49 +00:00
|
|
|
|
`@chapter' or `@section' line.
|
|
|
|
|
|
|
|
|
|
If the file has a `top' node, it must be called `top' or `Top' and
|
|
|
|
|
be the first node in the file.
|
|
|
|
|
|
2000-04-17 11:45:39 +00:00
|
|
|
|
Entering Texinfo mode calls the value of `text-mode-hook', and then the
|
|
|
|
|
value of `texinfo-mode-hook'."
|
2000-12-08 16:31:50 +00:00
|
|
|
|
(set (make-local-variable 'page-delimiter)
|
|
|
|
|
(concat
|
|
|
|
|
"^@node [ \t]*[Tt]op\\|^@\\("
|
|
|
|
|
texinfo-chapter-level-regexp
|
|
|
|
|
"\\)\\>"))
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(make-local-variable 'require-final-newline)
|
2004-12-31 14:58:20 +00:00
|
|
|
|
(setq require-final-newline mode-require-final-newline)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
(make-local-variable 'indent-tabs-mode)
|
|
|
|
|
(setq indent-tabs-mode nil)
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(make-local-variable 'paragraph-separate)
|
1997-05-24 21:18:25 +00:00
|
|
|
|
(setq paragraph-separate
|
|
|
|
|
(concat "\b\\|@[a-zA-Z]*[ \n]\\|" paragraph-separate))
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(make-local-variable 'paragraph-start)
|
1995-03-02 15:48:20 +00:00
|
|
|
|
(setq paragraph-start (concat "\b\\|@[a-zA-Z]*[ \n]\\|" paragraph-start))
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(set (make-local-variable 'sentence-end-base)
|
2009-08-18 01:21:01 +00:00
|
|
|
|
"\\(@\\(end\\)?dots{}\\|[.?!]\\)[]\"'”)}]*")
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(make-local-variable 'fill-column)
|
2000-12-27 16:12:51 +00:00
|
|
|
|
(setq fill-column 70)
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(make-local-variable 'comment-start)
|
|
|
|
|
(setq comment-start "@c ")
|
|
|
|
|
(make-local-variable 'comment-start-skip)
|
2000-04-17 11:45:39 +00:00
|
|
|
|
(setq comment-start-skip "@c +\\|@comment +")
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(make-local-variable 'words-include-escapes)
|
|
|
|
|
(setq words-include-escapes t)
|
1995-07-28 00:24:14 +00:00
|
|
|
|
(make-local-variable 'imenu-generic-expression)
|
|
|
|
|
(setq imenu-generic-expression texinfo-imenu-generic-expression)
|
1997-12-12 17:10:08 +00:00
|
|
|
|
(setq imenu-case-fold-search nil)
|
1994-10-12 09:21:47 +00:00
|
|
|
|
(make-local-variable 'font-lock-defaults)
|
2000-04-17 11:45:39 +00:00
|
|
|
|
(setq font-lock-defaults
|
New syntax-propertize functionality.
* lisp/font-lock.el (font-lock-syntactic-keywords): Make obsolete.
(font-lock-fontify-syntactic-keywords-region): Move handling of
font-lock-syntactically-fontified to...
(font-lock-default-fontify-region): ...here.
Let syntax-propertize-function take precedence.
(font-lock-fontify-syntactically-region): Cal syntax-propertize.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-depth): Skip named groups.
* lisp/emacs-lisp/syntax.el (syntax-propertize-function)
(syntax-propertize-chunk-size, syntax-propertize--done)
(syntax-propertize-extend-region-functions): New vars.
(syntax-propertize-wholelines, syntax-propertize-multiline)
(syntax-propertize--shift-groups, syntax-propertize-via-font-lock)
(syntax-propertize): New functions.
(syntax-propertize-rules): New macro.
(syntax-ppss-flush-cache): Set syntax-propertize--done.
(syntax-ppss): Call syntax-propertize.
* lisp/progmodes/ada-mode.el (ada-set-syntax-table-properties)
(ada-after-change-function, ada-initialize-syntax-table-properties)
(ada-handle-syntax-table-properties): Only define when
syntax-propertize is not available.
(ada-mode): Use syntax-propertize-function.
* lisp/progmodes/autoconf.el (autoconf-mode):
Use syntax-propertize-function.
(autoconf-font-lock-syntactic-keywords): Remove.
* lisp/progmodes/cfengine.el (cfengine-mode):
Use syntax-propertize-function.
(cfengine-font-lock-syntactic-keywords): Remove.
* lisp/progmodes/cperl-mode.el (cperl-mode): Use syntax-propertize-function.
* lisp/progmodes/fortran.el (fortran-mode): Use syntax-propertize-function.
(fortran--font-lock-syntactic-keywords): New var.
(fortran-line-length): Update syntax-propertize-function and
fortran--font-lock-syntactic-keywords.
* lisp/progmodes/gud.el (gdb-script-syntax-propertize-function): New var;
replaces gdb-script-font-lock-syntactic-keywords.
(gdb-script-mode): Use it.
* lisp/progmodes/js.el (js--regexp-literal): Define while compiling.
(js-syntax-propertize-function): New var; replaces
js-font-lock-syntactic-keywords.
(js-mode): Use it.
* lisp/progmodes/make-mode.el (makefile-syntax-propertize-function):
New var; replaces makefile-font-lock-syntactic-keywords.
(makefile-mode): Use it.
(makefile-imake-mode): Adjust.
* lisp/progmodes/mixal-mode.el (mixal-syntax-propertize-function): New var;
replaces mixal-font-lock-syntactic-keywords.
(mixal-mode): Use it.
* lisp/progmodes/octave-mod.el (octave-syntax-propertize-sqs): New function
to replace octave-font-lock-close-quotes.
(octave-syntax-propertize-function): New function to replace
octave-font-lock-syntactic-keywords.
(octave-mode): Use it.
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): New fun to
replace perl-font-lock-syntactic-keywords.
(perl-syntax-propertize-special-constructs): New fun to replace
perl-font-lock-special-syntactic-constructs.
(perl-font-lock-syntactic-face-function): New fun.
(perl-mode): Use it.
* lisp/progmodes/python.el (python-syntax-propertize-function): New var to
replace python-font-lock-syntactic-keywords.
(python-mode): Use it.
(python-quote-syntax): Simplify and adjust to new use.
* lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-re):
Define while compiling.
(ruby-here-doc-end-re, ruby-here-doc-beg-match)
(ruby-font-lock-syntactic-keywords, ruby-comment-beg-syntax)
(syntax-ppss, ruby-in-ppss-context-p, ruby-in-here-doc-p)
(ruby-here-doc-find-end, ruby-here-doc-beg-syntax)
(ruby-here-doc-end-syntax): Only define when
syntax-propertize is not available.
(ruby-syntax-propertize-function, ruby-syntax-propertize-heredoc):
New functions.
(ruby-in-ppss-context-p): Update to new syntax of heredocs.
(electric-indent-chars): Silence bytecompiler.
(ruby-mode): Use prog-mode, syntax-propertize-function, and
electric-indent-chars.
* lisp/progmodes/sh-script.el (sh-st-symbol): Remove.
(sh-font-lock-close-heredoc, sh-font-lock-open-heredoc): Add eol arg.
(sh-font-lock-flush-syntax-ppss-cache, sh-font-lock-here-doc): Remove.
(sh-font-lock-quoted-subshell): Assume we've already matched $(.
(sh-font-lock-paren): Set syntax-multiline.
(sh-font-lock-syntactic-keywords): Remove.
(sh-syntax-propertize-function): New function to replace it.
(sh-mode): Use it.
* lisp/progmodes/simula.el (simula-syntax-propertize-function): New var to
replace simula-font-lock-syntactic-keywords.
(simula-mode): Use it.
* lisp/progmodes/tcl.el (tcl-syntax-propertize-function): New var to
replace tcl-font-lock-syntactic-keywords.
(tcl-mode): Use it.
* lisp/progmodes/vhdl-mode.el (vhdl-mode): Use syntax-propertize-function
if available.
(vhdl-fontify-buffer): Adjust.
* lisp/textmodes/bibtex.el (bibtex-mode): Use syntax-propertize-function.
* lisp/textmodes/reftex.el (font-lock-syntactic-keywords): Don't declare
since we don't use it.
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-function): New var to
replace sgml-font-lock-syntactic-keywords.
(sgml-mode): Use it.
* lisp/textmodes/tex-mode.el (tex-common-initialization, doctex-mode):
Use syntax-propertize-function.
* lisp/textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun
to replace texinfo-font-lock-syntactic-keywords.
(texinfo-mode): Use it.
* test/indent/octave.m: Remove some `fixindent' not needed any more.
2010-09-10 23:13:42 +00:00
|
|
|
|
'(texinfo-font-lock-keywords nil nil nil backward-paragraph))
|
|
|
|
|
(set (make-local-variable 'syntax-propertize-function)
|
|
|
|
|
texinfo-syntax-propertize-function)
|
2000-04-17 11:45:39 +00:00
|
|
|
|
(set (make-local-variable 'parse-sexp-lookup-properties) t)
|
2003-03-14 22:29:13 +00:00
|
|
|
|
|
|
|
|
|
;; Outline settings.
|
|
|
|
|
(set (make-local-variable 'outline-heading-alist)
|
|
|
|
|
;; We should merge outline-heading-alist and texinfo-section-list
|
|
|
|
|
;; but in the mean time, let's just generate one from the other.
|
|
|
|
|
(mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
|
|
|
|
|
texinfo-section-list))
|
|
|
|
|
(set (make-local-variable 'outline-regexp)
|
2004-01-21 03:09:06 +00:00
|
|
|
|
(concat (regexp-opt (mapcar 'car outline-heading-alist) t)
|
2003-03-14 22:29:13 +00:00
|
|
|
|
"\\>"))
|
|
|
|
|
|
1993-07-17 17:27:02 +00:00
|
|
|
|
(make-local-variable 'tex-start-of-header)
|
1997-01-02 20:49:15 +00:00
|
|
|
|
(setq tex-start-of-header "%\\*\\*start")
|
1993-07-17 17:27:02 +00:00
|
|
|
|
(make-local-variable 'tex-end-of-header)
|
1997-01-02 20:49:15 +00:00
|
|
|
|
(setq tex-end-of-header "%\\*\\*end")
|
|
|
|
|
(make-local-variable 'tex-first-line-header-regexp)
|
|
|
|
|
(setq tex-first-line-header-regexp "^\\\\input")
|
|
|
|
|
(make-local-variable 'tex-trailer)
|
2000-09-25 11:16:43 +00:00
|
|
|
|
(setq tex-trailer "@bye\n")
|
|
|
|
|
|
|
|
|
|
;; Prevent filling certain lines, in addition to ones specified
|
|
|
|
|
;; by the user.
|
|
|
|
|
(let ((prevent-filling "^@\\(def\\|multitable\\)"))
|
2000-12-08 16:31:50 +00:00
|
|
|
|
(set (make-local-variable 'auto-fill-inhibit-regexp)
|
|
|
|
|
(if (null auto-fill-inhibit-regexp)
|
|
|
|
|
prevent-filling
|
2001-10-25 03:54:21 +00:00
|
|
|
|
(concat auto-fill-inhibit-regexp "\\|" prevent-filling)))))
|
2003-02-04 13:30:45 +00:00
|
|
|
|
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
|
1993-06-25 06:41:54 +00:00
|
|
|
|
;;; Insert string commands
|
|
|
|
|
|
2000-11-10 11:55:06 +00:00
|
|
|
|
(defvar texinfo-block-default "example")
|
|
|
|
|
|
2000-04-17 11:45:39 +00:00
|
|
|
|
(define-skeleton texinfo-insert-block
|
|
|
|
|
"Create a matching pair @<cmd> .. @end <cmd> at point.
|
|
|
|
|
Puts point on a blank line between them."
|
2000-11-10 11:55:06 +00:00
|
|
|
|
(setq texinfo-block-default
|
|
|
|
|
(completing-read (format "Block name [%s]: " texinfo-block-default)
|
2003-03-14 22:29:13 +00:00
|
|
|
|
texinfo-environments
|
2000-11-10 11:55:06 +00:00
|
|
|
|
nil nil nil nil texinfo-block-default))
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
\n "@" str
|
|
|
|
|
;; Blocks that take parameters: all the def* blocks take parameters,
|
|
|
|
|
;; plus a few others.
|
|
|
|
|
(if (or (string-match "\\`def" str)
|
|
|
|
|
(member str '("table" "ftable" "vtable")))
|
|
|
|
|
'(nil " " -))
|
|
|
|
|
\n _ \n "@end " str \n)
|
2000-04-17 11:45:39 +00:00
|
|
|
|
|
2000-10-01 00:30:52 +00:00
|
|
|
|
(defun texinfo-inside-macro-p (macro &optional bound)
|
|
|
|
|
"Non-nil if inside a macro matching the regexp MACRO."
|
2000-12-06 19:34:15 +00:00
|
|
|
|
(condition-case nil
|
|
|
|
|
(save-excursion
|
|
|
|
|
(save-restriction
|
|
|
|
|
(narrow-to-region bound (point))
|
|
|
|
|
(while (progn
|
|
|
|
|
(up-list -1)
|
|
|
|
|
(not (condition-case nil
|
|
|
|
|
(save-excursion
|
|
|
|
|
(backward-sexp 1)
|
|
|
|
|
(looking-at macro))
|
2000-12-08 16:31:50 +00:00
|
|
|
|
(scan-error nil)))))
|
2000-12-06 19:34:15 +00:00
|
|
|
|
t))
|
2000-12-08 16:31:50 +00:00
|
|
|
|
(scan-error nil)))
|
2000-10-01 00:30:52 +00:00
|
|
|
|
|
|
|
|
|
(defun texinfo-inside-env-p (env &optional bound)
|
|
|
|
|
"Non-nil if inside an environment matching the regexp @ENV."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(and (re-search-backward (concat "@\\(end\\s +\\)?" env) bound t)
|
2000-12-08 16:31:50 +00:00
|
|
|
|
(not (match-end 1)))))
|
2000-10-01 00:30:52 +00:00
|
|
|
|
|
2003-06-08 01:17:04 +00:00
|
|
|
|
(defvar texinfo-enable-quote-macros "@\\(code\\|samp\\|kbd\\)\\>")
|
2003-03-14 22:29:13 +00:00
|
|
|
|
(defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>"))
|
2000-10-01 00:30:52 +00:00
|
|
|
|
(defun texinfo-insert-quote (&optional arg)
|
2004-01-20 01:28:15 +00:00
|
|
|
|
"Insert the appropriate quote mark for Texinfo.
|
2000-12-02 15:33:30 +00:00
|
|
|
|
Usually inserts the value of `texinfo-open-quote' (normally ``) or
|
|
|
|
|
`texinfo-close-quote' (normally ''), depending on the context.
|
|
|
|
|
With prefix argument or inside @code or @example, inserts a plain \"."
|
2000-10-01 00:30:52 +00:00
|
|
|
|
(interactive "*P")
|
|
|
|
|
(let ((top (or (save-excursion (re-search-backward "@node\\>" nil t))
|
|
|
|
|
(point-min))))
|
2000-12-02 15:33:30 +00:00
|
|
|
|
(if (or arg
|
2001-10-25 03:54:21 +00:00
|
|
|
|
(= (preceding-char) ?\\)
|
|
|
|
|
(save-excursion
|
2008-12-02 03:36:25 +00:00
|
|
|
|
;; Might be near the start of a (narrowed) buffer.
|
|
|
|
|
(ignore-errors (backward-char (length texinfo-open-quote)))
|
2001-10-25 03:54:21 +00:00
|
|
|
|
(when (or (looking-at texinfo-open-quote)
|
|
|
|
|
(looking-at texinfo-close-quote))
|
|
|
|
|
(delete-char (length texinfo-open-quote))
|
|
|
|
|
t))
|
2003-03-14 22:29:13 +00:00
|
|
|
|
(texinfo-inside-macro-p texinfo-enable-quote-macros top)
|
|
|
|
|
(let ((in-env nil))
|
|
|
|
|
(dolist (env texinfo-enable-quote-envs in-env)
|
|
|
|
|
(if (texinfo-inside-env-p env top)
|
|
|
|
|
(setq in-env t)))))
|
2000-10-01 00:30:52 +00:00
|
|
|
|
(self-insert-command (prefix-numeric-value arg))
|
2000-12-02 15:33:30 +00:00
|
|
|
|
(insert
|
2008-12-02 03:34:19 +00:00
|
|
|
|
(if (or (bobp)
|
|
|
|
|
(memq (char-syntax (preceding-char)) '(?\( ?> ?\s)))
|
2001-10-25 03:54:21 +00:00
|
|
|
|
texinfo-open-quote
|
|
|
|
|
texinfo-close-quote)))))
|
2003-02-04 13:30:45 +00:00
|
|
|
|
|
1997-05-24 21:18:25 +00:00
|
|
|
|
;; The following texinfo-insert-@end command not only inserts a SPC
|
|
|
|
|
;; after the @end, but tries to find out what belongs there. It is
|
|
|
|
|
;; not very smart: it does not understand nested lists.
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
2001-10-25 03:54:21 +00:00
|
|
|
|
(defun texinfo-last-unended-begin ()
|
|
|
|
|
(while (and (re-search-backward texinfo-environment-regexp)
|
|
|
|
|
(looking-at "@end"))
|
|
|
|
|
(texinfo-last-unended-begin)))
|
|
|
|
|
|
|
|
|
|
(defun texinfo-next-unmatched-end ()
|
|
|
|
|
(while (and (re-search-forward texinfo-environment-regexp)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (match-beginning 0))
|
|
|
|
|
(not (looking-at "@end"))))
|
|
|
|
|
(texinfo-next-unmatched-end)))
|
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@end
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert the matching `@end' for the last Texinfo command that needs one."
|
2001-10-25 03:54:21 +00:00
|
|
|
|
(ignore-errors
|
|
|
|
|
(save-excursion
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(backward-word 1)
|
2001-10-25 03:54:21 +00:00
|
|
|
|
(texinfo-last-unended-begin)
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(or (match-string 1) '-)))
|
|
|
|
|
\n "@end " str \n)
|
|
|
|
|
|
|
|
|
|
(define-skeleton texinfo-insert-braces
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Make a pair of braces and be poised to type inside of them.
|
|
|
|
|
Use \\[up-list] to move forward out of the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"{" _ "}")
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@code
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert a `@code{...}' command in a Texinfo buffer.
|
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@code{" _ "}")
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@dfn
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert a `@dfn{...}' command in a Texinfo buffer.
|
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@dfn{" _ "}")
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@email
|
2000-04-17 15:23:08 +00:00
|
|
|
|
"Insert a `@email{...}' command in a Texinfo buffer.
|
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@email{" _ "}")
|
2000-04-17 15:23:08 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@emph
|
2000-04-17 15:23:08 +00:00
|
|
|
|
"Insert a `@emph{...}' command in a Texinfo buffer.
|
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@emph{" _ "}")
|
2000-04-17 15:23:08 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@example
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert the string `@example' in a Texinfo buffer."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
\n "@example" \n)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@file
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert a `@file{...}' command in a Texinfo buffer.
|
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@file{" _ "}")
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@item
|
2004-02-21 13:51:34 +00:00
|
|
|
|
"Insert the string `@item' in a Texinfo buffer.
|
|
|
|
|
If in a table defined by @table, follow said string with a space.
|
|
|
|
|
Otherwise, follow with a newline."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
\n "@item"
|
2004-02-21 13:51:34 +00:00
|
|
|
|
(if (equal (ignore-errors
|
|
|
|
|
(save-excursion
|
|
|
|
|
(texinfo-last-unended-begin)
|
|
|
|
|
(match-string 1)))
|
|
|
|
|
"table")
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
" " '\n)
|
|
|
|
|
_ \n)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@kbd
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert a `@kbd{...}' command in a Texinfo buffer.
|
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@kbd{" _ "}")
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@node
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert the string `@node' in a Texinfo buffer.
|
2002-04-29 12:59:26 +00:00
|
|
|
|
Insert a comment on the following line indicating the order of
|
|
|
|
|
arguments to @node. Insert a carriage return after the comment line.
|
|
|
|
|
Leave point after `@node'."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
\n "@node " _ \n)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@noindent
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert the string `@noindent' in a Texinfo buffer."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
\n "@noindent" \n)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@quotation
|
2000-04-17 15:23:08 +00:00
|
|
|
|
"Insert the string `@quotation' in a Texinfo buffer."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
\n "@quotation" \n)
|
2000-04-17 15:23:08 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@samp
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert a `@samp{...}' command in a Texinfo buffer.
|
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@samp{" _ "}")
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@strong
|
2000-04-17 15:23:08 +00:00
|
|
|
|
"Insert a `@strong{...}' command in a Texinfo buffer.
|
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@strong{" _ "}")
|
2000-04-17 15:23:08 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@table
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert the string `@table' in a Texinfo buffer."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
\n "@table " _ \n)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@var
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Insert a `@var{}' command in a Texinfo buffer.
|
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@var{" _ "}")
|
2000-04-17 15:23:08 +00:00
|
|
|
|
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
(define-skeleton texinfo-insert-@uref
|
2000-12-06 19:34:15 +00:00
|
|
|
|
"Insert a `@uref{}' command in a Texinfo buffer.
|
2000-04-17 15:23:08 +00:00
|
|
|
|
A numeric argument says how many words the braces should surround.
|
|
|
|
|
The default is not to surround any existing words with the braces."
|
* lisp/textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
(texinfo-mode): Don't disable adaptive-fill-mode.
(texinfo-insert-block): Adjust cursor placement for blocks with arg.
(texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
(texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
(texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
(texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
(texinfo-insert-@quotation, texinfo-insert-@samp)
(texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
(texinfo-insert-@uref): Use define-skeleton.
(texinfo-insert-@-with-arg): Delete.
2010-12-10 14:10:08 +00:00
|
|
|
|
nil
|
|
|
|
|
"@uref{" _ "}")
|
2000-11-15 13:57:50 +00:00
|
|
|
|
(defalias 'texinfo-insert-@url 'texinfo-insert-@uref)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
;;; Texinfo file structure
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
1997-05-24 21:18:25 +00:00
|
|
|
|
(defun texinfo-show-structure (&optional nodes-too)
|
1990-06-28 21:32:49 +00:00
|
|
|
|
"Show the structure of a Texinfo file.
|
1990-07-27 16:01:02 +00:00
|
|
|
|
List the lines in the file that begin with the @-sign commands for
|
|
|
|
|
@chapter, @section, and the like.
|
|
|
|
|
|
|
|
|
|
With optional argument (prefix if interactive), list both the lines
|
|
|
|
|
with @-sign commands for @chapter, @section, and the like, and list
|
|
|
|
|
@node lines.
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
Lines with structuring commands beginning in them are displayed in
|
1993-06-25 06:41:54 +00:00
|
|
|
|
another buffer named `*Occur*'. In that buffer, you can move point to
|
2003-02-04 13:30:45 +00:00
|
|
|
|
one of those lines and then use
|
2001-12-25 16:16:22 +00:00
|
|
|
|
\\<occur-mode-map>\\[occur-mode-goto-occurrence],
|
1993-06-25 06:41:54 +00:00
|
|
|
|
to jump to the corresponding spot in the Texinfo source file."
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
(interactive "P")
|
2001-12-25 16:16:22 +00:00
|
|
|
|
;; First, remember current location
|
2003-06-08 01:17:04 +00:00
|
|
|
|
(let (current-location)
|
2001-12-25 16:16:22 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(end-of-line) ; so as to find section on current line
|
2003-02-04 13:30:45 +00:00
|
|
|
|
(if (re-search-backward
|
2001-12-25 16:16:22 +00:00
|
|
|
|
;; do not require `texinfo-section-types-regexp' in texnfo-upd.el
|
|
|
|
|
"^@\\(chapter \\|sect\\|subs\\|subh\\|unnum\\|major\\|chapheading \\|heading \\|appendix\\)"
|
|
|
|
|
nil t)
|
|
|
|
|
(setq current-location
|
|
|
|
|
(progn
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(buffer-substring (point) (progn (end-of-line) (point)))))
|
2003-06-08 01:17:04 +00:00
|
|
|
|
;; else point is located before any section command.
|
2001-12-25 16:16:22 +00:00
|
|
|
|
(setq current-location "tex")))
|
|
|
|
|
;; Second, create and format an *Occur* buffer
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-min))
|
2004-01-21 03:09:06 +00:00
|
|
|
|
(occur (concat "^\\(?:" (if nodes-too "@node\\>\\|")
|
|
|
|
|
outline-regexp "\\)")))
|
2001-12-25 16:16:22 +00:00
|
|
|
|
(pop-to-buffer "*Occur*")
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(goto-char (point-min))
|
2001-12-25 16:16:22 +00:00
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
|
(flush-lines "-----")
|
|
|
|
|
;; Now format the "*Occur*" buffer to show the structure.
|
|
|
|
|
;; Thanks to ceder@signum.se (Per Cederqvist)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(let (level)
|
|
|
|
|
(while (re-search-backward "^ *[0-9]*:@\\(\\sw+\\)" nil 0)
|
|
|
|
|
(goto-char (1- (match-beginning 1)))
|
|
|
|
|
(setq level
|
|
|
|
|
(or (cadr (assoc (match-string 1) texinfo-section-list)) 2))
|
|
|
|
|
(indent-to-column (+ (current-column) (* 4 (- level 2))))
|
|
|
|
|
(beginning-of-line))))
|
|
|
|
|
;; Third, go to line corresponding to location in source file
|
2003-02-04 13:30:45 +00:00
|
|
|
|
;; potential bug: two exactly similar `current-location' lines ...
|
2001-12-25 16:16:22 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(re-search-forward current-location nil t)
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
))
|
|
|
|
|
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
;;; The tex and print function definitions:
|
|
|
|
|
|
1997-04-12 02:51:38 +00:00
|
|
|
|
(defcustom texinfo-texi2dvi-command "texi2dvi"
|
2007-09-10 04:02:09 +00:00
|
|
|
|
"Command used by `texinfo-tex-buffer' to run TeX and texindex on a buffer."
|
1997-04-12 02:51:38 +00:00
|
|
|
|
:type 'string
|
|
|
|
|
:group 'texinfo)
|
1993-11-11 07:52:56 +00:00
|
|
|
|
|
1997-04-12 02:51:38 +00:00
|
|
|
|
(defcustom texinfo-tex-command "tex"
|
2007-09-10 04:02:09 +00:00
|
|
|
|
"Command used by `texinfo-tex-region' to run TeX on a region."
|
1997-04-12 02:51:38 +00:00
|
|
|
|
:type 'string
|
|
|
|
|
:group 'texinfo)
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
1997-04-12 02:51:38 +00:00
|
|
|
|
(defcustom texinfo-texindex-command "texindex"
|
2007-09-10 04:02:09 +00:00
|
|
|
|
"Command used by `texinfo-texindex' to sort unsorted index files."
|
1997-04-12 02:51:38 +00:00
|
|
|
|
:type 'string
|
|
|
|
|
:group 'texinfo)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
1997-04-12 02:51:38 +00:00
|
|
|
|
(defcustom texinfo-delete-from-print-queue-command "lprm"
|
2007-09-10 04:02:09 +00:00
|
|
|
|
"Command string used to delete a job from the line printer queue.
|
1993-06-25 06:41:54 +00:00
|
|
|
|
Command is used by \\[texinfo-delete-from-print-queue] based on
|
|
|
|
|
number provided by a previous \\[tex-show-print-queue]
|
1997-04-12 02:51:38 +00:00
|
|
|
|
command."
|
|
|
|
|
:type 'string
|
|
|
|
|
:group 'texinfo)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(defvar texinfo-tex-trailer "@bye"
|
|
|
|
|
"String appended after a region sent to TeX by `texinfo-tex-region'.")
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
(defun texinfo-tex-region (beg end)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Run TeX on the current region.
|
|
|
|
|
This works by writing a temporary file (`tex-zap-file') in the directory
|
|
|
|
|
that is the value of `tex-directory', then running TeX on that file.
|
|
|
|
|
|
|
|
|
|
The first line of the buffer is copied to the
|
1992-11-10 20:01:10 +00:00
|
|
|
|
temporary file; and if the buffer has a header, it is written to the
|
|
|
|
|
temporary file before the region itself. The buffer's header is all lines
|
|
|
|
|
between the strings defined by `tex-start-of-header' and `tex-end-of-header'
|
1993-06-25 06:41:54 +00:00
|
|
|
|
inclusive. The header must start in the first 100 lines.
|
|
|
|
|
|
|
|
|
|
The value of `texinfo-tex-trailer' is appended to the temporary file after the region."
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(interactive "r")
|
1993-05-16 21:11:54 +00:00
|
|
|
|
(require 'tex-mode)
|
1997-01-02 20:49:15 +00:00
|
|
|
|
(let ((tex-command texinfo-tex-command)
|
1998-12-14 10:17:50 +00:00
|
|
|
|
(tex-trailer texinfo-tex-trailer))
|
1997-01-02 20:49:15 +00:00
|
|
|
|
(tex-region beg end)))
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
(defun texinfo-tex-buffer ()
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Run TeX on visited file, once or twice, to make a correct `.dvi' file."
|
|
|
|
|
(interactive)
|
1993-08-10 08:24:55 +00:00
|
|
|
|
(require 'tex-mode)
|
1998-12-14 10:17:50 +00:00
|
|
|
|
(let ((tex-command texinfo-texi2dvi-command)
|
|
|
|
|
;; Disable tex-start-options-string. texi2dvi would not
|
|
|
|
|
;; understand anything specified here.
|
|
|
|
|
(tex-start-options-string ""))
|
1997-01-02 20:49:15 +00:00
|
|
|
|
(tex-buffer)))
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(defun texinfo-texindex ()
|
|
|
|
|
"Run `texindex' on unsorted index files.
|
|
|
|
|
The index files are made by \\[texinfo-tex-region] or \\[texinfo-tex-buffer].
|
|
|
|
|
This runs the shell command defined by `texinfo-texindex-command'."
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(interactive)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
(require 'tex-mode)
|
1993-11-20 22:21:58 +00:00
|
|
|
|
(tex-send-command texinfo-texindex-command (concat tex-zap-file ".??"))
|
1997-05-24 21:18:25 +00:00
|
|
|
|
;; alternatively
|
|
|
|
|
;; (send-string "tex-shell"
|
|
|
|
|
;; (concat texinfo-texindex-command
|
|
|
|
|
;; " " tex-zap-file ".??" "\n"))
|
1993-06-25 06:41:54 +00:00
|
|
|
|
(tex-recenter-output-buffer nil))
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
|
|
|
|
(defun texinfo-tex-print ()
|
1993-06-25 06:41:54 +00:00
|
|
|
|
"Print `.dvi' file made by \\[texinfo-tex-region] or \\[texinfo-tex-buffer].
|
|
|
|
|
This runs the shell command defined by `tex-dvi-print-command'."
|
1990-06-28 21:32:49 +00:00
|
|
|
|
(interactive)
|
1993-05-16 21:11:54 +00:00
|
|
|
|
(require 'tex-mode)
|
1997-01-02 20:49:15 +00:00
|
|
|
|
(tex-print))
|
|
|
|
|
|
|
|
|
|
(defun texinfo-tex-view ()
|
|
|
|
|
"View `.dvi' file made by \\[texinfo-tex-region] or \\[texinfo-tex-buffer].
|
|
|
|
|
This runs the shell command defined by `tex-dvi-view-command'."
|
|
|
|
|
(interactive)
|
|
|
|
|
(require 'tex-mode)
|
|
|
|
|
(tex-view))
|
1990-06-28 21:32:49 +00:00
|
|
|
|
|
1993-06-25 06:41:54 +00:00
|
|
|
|
(defun texinfo-quit-job ()
|
|
|
|
|
"Quit currently running TeX job, by sending an `x' to it."
|
|
|
|
|
(interactive)
|
|
|
|
|
(if (not (get-process "tex-shell"))
|
|
|
|
|
(error "No TeX shell running"))
|
1993-11-20 22:21:58 +00:00
|
|
|
|
(tex-send-command "x"))
|
1997-05-24 21:18:25 +00:00
|
|
|
|
;; alternatively:
|
|
|
|
|
;; save-excursion
|
|
|
|
|
;; (set-buffer (get-buffer "*tex-shell*"))
|
|
|
|
|
;; (goto-char (point-max))
|
|
|
|
|
;; (insert "x")
|
|
|
|
|
;; (comint-send-input)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
|
|
|
|
|
(defun texinfo-delete-from-print-queue (job-number)
|
|
|
|
|
"Delete job from the line printer spooling queue.
|
|
|
|
|
You are prompted for the job number (use a number shown by a previous
|
1997-05-24 21:18:25 +00:00
|
|
|
|
\\[tex-show-print-queue] command)."
|
1993-06-25 06:41:54 +00:00
|
|
|
|
(interactive "nPrinter job number for deletion: ")
|
1993-08-10 08:24:55 +00:00
|
|
|
|
(require 'tex-mode)
|
1993-06-25 06:41:54 +00:00
|
|
|
|
(if (tex-shell-running)
|
|
|
|
|
(tex-kill-job)
|
|
|
|
|
(tex-start-shell))
|
1993-11-20 22:21:58 +00:00
|
|
|
|
(tex-send-command texinfo-delete-from-print-queue-command job-number)
|
1997-05-24 21:18:25 +00:00
|
|
|
|
;; alternatively
|
|
|
|
|
;; (send-string "tex-shell"
|
|
|
|
|
;; (concat
|
|
|
|
|
;; texinfo-delete-from-print-queue-command
|
|
|
|
|
;; " "
|
|
|
|
|
;; job-number"\n"))
|
1993-06-25 06:41:54 +00:00
|
|
|
|
(tex-recenter-output-buffer nil))
|
|
|
|
|
|
1992-03-16 20:39:07 +00:00
|
|
|
|
(provide 'texinfo)
|
|
|
|
|
|
1992-05-30 20:24:49 +00:00
|
|
|
|
;;; texinfo.el ends here
|