[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/texinfmt.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/texinfmt.el |
Date: |
Tue, 04 Feb 2003 08:30:49 -0500 |
Index: emacs/lisp/textmodes/texinfmt.el
diff -c emacs/lisp/textmodes/texinfmt.el:1.66
emacs/lisp/textmodes/texinfmt.el:1.67
*** emacs/lisp/textmodes/texinfmt.el:1.66 Sun Dec 22 17:04:01 2002
--- emacs/lisp/textmodes/texinfmt.el Tue Feb 4 08:30:45 2003
***************
*** 1,6 ****
;;; texinfmt.el --- format Texinfo files into Info files
! ;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993,
;; 1994, 1995, 1996, 1997, 1998, 2000, 2001
;; Free Software Foundation, Inc.
--- 1,6 ----
;;; texinfmt.el --- format Texinfo files into Info files
! ;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993,
;; 1994, 1995, 1996, 1997, 1998, 2000, 2001
;; Free Software Foundation, Inc.
***************
*** 43,51 ****
"Show the version of texinfmt.el in the minibuffer.
If optional argument HERE is non-nil, insert info at point."
(interactive "P")
! (let ((version-string
(format "Version of \`texinfmt.el\': %s" texinfmt-version)))
! (if here
(insert version-string)
(if (interactive-p)
(message "%s" version-string)
--- 43,51 ----
"Show the version of texinfmt.el in the minibuffer.
If optional argument HERE is non-nil, insert info at point."
(interactive "P")
! (let ((version-string
(format "Version of \`texinfmt.el\': %s" texinfmt-version)))
! (if here
(insert version-string)
(if (interactive-p)
(message "%s" version-string)
***************
*** 169,176 ****
(header-text "")
(header-beginning 1)
(header-end 1))
!
! ;;; Copy lines between beginning and end of header lines,
;;; if any, or else copy the address@hidden' line, if any.
(save-excursion
(save-restriction
--- 169,176 ----
(header-text "")
(header-beginning 1)
(header-end 1))
!
! ;;; Copy lines between beginning and end of header lines,
;;; if any, or else copy the address@hidden' line, if any.
(save-excursion
(save-restriction
***************
*** 179,191 ****
(let ((search-end (save-excursion (forward-line 100) (point))))
(if (or
;; Either copy header text.
! (and
! (prog1
(search-forward tex-start-of-header search-end t)
(forward-line 1)
;; Mark beginning of header.
(setq header-beginning (point)))
! (prog1
(search-forward tex-end-of-header nil t)
(beginning-of-line)
;; Mark end of header
--- 179,191 ----
(let ((search-end (save-excursion (forward-line 100) (point))))
(if (or
;; Either copy header text.
! (and
! (prog1
(search-forward tex-start-of-header search-end t)
(forward-line 1)
;; Mark beginning of header.
(setq header-beginning (point)))
! (prog1
(search-forward tex-end-of-header nil t)
(beginning-of-line)
;; Mark end of header
***************
*** 198,205 ****
(setq header-beginning (point))
(forward-line 1)
(setq header-end (point))))
!
! ;; Copy header
(setq header-text
(buffer-substring-no-properties
(min header-beginning region-beginning)
--- 198,205 ----
(setq header-beginning (point))
(forward-line 1)
(setq header-end (point))))
!
! ;; Copy header
(setq header-text
(buffer-substring-no-properties
(min header-beginning region-beginning)
***************
*** 218,224 ****
;; Make sure region ends in a newline.
(or (= (preceding-char) ?\n)
(insert "\n"))
!
(goto-char (point-min))
(texinfo-mode)
(message "Converting region to Info format...")
--- 218,224 ----
;; Make sure region ends in a newline.
(or (= (preceding-char) ?\n)
(insert "\n"))
!
(goto-char (point-min))
(texinfo-mode)
(message "Converting region to Info format...")
***************
*** 228,234 ****
;; Insert @include files so `texinfo-raise-lower-sections' can
;; work on them without losing track of multiple
! ;; @raise/@lowersections commands.
(while (re-search-forward "address@hidden" nil t)
(setq texinfo-command-end (point))
(let ((filename (concat input-directory
--- 228,234 ----
;; Insert @include files so `texinfo-raise-lower-sections' can
;; work on them without losing track of multiple
! ;; @raise/@lowersections commands.
(while (re-search-forward "address@hidden" nil t)
(setq texinfo-command-end (point))
(let ((filename (concat input-directory
***************
*** 244,250 ****
(goto-char (point-min))
;; Remove address@hidden' line from included file, if any,
;; so @setfilename command not duplicated.
! (if (re-search-forward
"address@hidden" (save-excursion (forward-line 100) (point))
t)
(progn
(beginning-of-line)
--- 244,250 ----
(goto-char (point-min))
;; Remove address@hidden' line from included file, if any,
;; so @setfilename command not duplicated.
! (if (re-search-forward
"address@hidden" (save-excursion (forward-line 100) (point))
t)
(progn
(beginning-of-line)
***************
*** 275,281 ****
;; Insert Info region title text.
(goto-char (point-min))
! (if (search-forward
"@setfilename" (save-excursion (forward-line 100) (point)) t)
(progn
(setq texinfo-command-end (point))
--- 275,281 ----
;; Insert Info region title text.
(goto-char (point-min))
! (if (search-forward
"@setfilename" (save-excursion (forward-line 100) (point)) t)
(progn
(setq texinfo-command-end (point))
***************
*** 284,290 ****
(let ((arg (texinfo-parse-arg-discard)))
(insert " "
texinfo-region-buffer-name
! " buffer for: `")
(insert (file-name-nondirectory (expand-file-name arg)))
(insert "', -*-Text-*-\n")))
;; Else no address@hidden' line
--- 284,290 ----
(let ((arg (texinfo-parse-arg-discard)))
(insert " "
texinfo-region-buffer-name
! " buffer for: `")
(insert (file-name-nondirectory (expand-file-name arg)))
(insert "', -*-Text-*-\n")))
;; Else no address@hidden' line
***************
*** 385,394 ****
(insert-buffer-substring input-buffer)
(message "Converting %s to Info format..." (buffer-name input-buffer))
!
;; Insert @include files so `texinfo-raise-lower-sections' can
;; work on them without losing track of multiple
! ;; @raise/@lowersections commands.
(goto-char (point-min))
(while (re-search-forward "address@hidden" nil t)
(setq texinfo-command-end (point))
--- 385,394 ----
(insert-buffer-substring input-buffer)
(message "Converting %s to Info format..." (buffer-name input-buffer))
!
;; Insert @include files so `texinfo-raise-lower-sections' can
;; work on them without losing track of multiple
! ;; @raise/@lowersections commands.
(goto-char (point-min))
(while (re-search-forward "address@hidden" nil t)
(setq texinfo-command-end (point))
***************
*** 405,411 ****
(goto-char (point-min))
;; Remove address@hidden' line from included file, if any,
;; so @setfilename command not duplicated.
! (if (re-search-forward
"address@hidden"
(save-excursion (forward-line 100) (point)) t)
(progn
--- 405,411 ----
(goto-char (point-min))
;; Remove address@hidden' line from included file, if any,
;; so @setfilename command not duplicated.
! (if (re-search-forward
"address@hidden"
(save-excursion (forward-line 100) (point)) t)
(progn
***************
*** 482,488 ****
"^@"
"\\("
;; add "itemize\\|" (from experiment of 2001 Nov 28)
! ;; because of a problem with @end address@hidden
;; I don't know if this causes other problems.
;; I suspect itemized lists don't get filled properly and a
;; more precise fix is required. Bob
--- 482,488 ----
"^@"
"\\("
;; add "itemize\\|" (from experiment of 2001 Nov 28)
! ;; because of a problem with @end address@hidden
;; I don't know if this causes other problems.
;; I suspect itemized lists don't get filled properly and a
;; more precise fix is required. Bob
***************
*** 584,611 ****
(defun texinfo-append-refill ()
"Append @refill at end of each paragraph that should be filled.
! Do not append @refill to paragraphs within @example and similar environments.
Do not append @refill to paragraphs containing @w{TEXT} or @*."
;; It is necessary to append @refill before other processing because
;; the other processing removes information that tells Texinfo
;; whether the text should or should not be filled.
!
(while (< (point) (point-max))
(let ((refill-blank-lines "^[ \t\n]*$")
(case-fold-search nil)) ; Don't confuse @TeX and @tex....
(beginning-of-line)
;; 1. Skip over blank lines;
! ;; skip over lines beginning with @-commands,
;; but do not skip over lines
;; that are no-refill environments such as @example or
;; that begin with within-paragraph @-commands such as @code.
(while (and (looking-at (concat "address@hidden|^\\\\\\|"
refill-blank-lines))
! (not (looking-at
(concat
! "\\("
texinfo-no-refill-regexp
! "\\|"
texinfo-part-of-para-regexp
"\\)")))
(< (point) (point-max)))
--- 584,611 ----
(defun texinfo-append-refill ()
"Append @refill at end of each paragraph that should be filled.
! Do not append @refill to paragraphs within @example and similar environments.
Do not append @refill to paragraphs containing @w{TEXT} or @*."
;; It is necessary to append @refill before other processing because
;; the other processing removes information that tells Texinfo
;; whether the text should or should not be filled.
!
(while (< (point) (point-max))
(let ((refill-blank-lines "^[ \t\n]*$")
(case-fold-search nil)) ; Don't confuse @TeX and @tex....
(beginning-of-line)
;; 1. Skip over blank lines;
! ;; skip over lines beginning with @-commands,
;; but do not skip over lines
;; that are no-refill environments such as @example or
;; that begin with within-paragraph @-commands such as @code.
(while (and (looking-at (concat "address@hidden|^\\\\\\|"
refill-blank-lines))
! (not (looking-at
(concat
! "\\("
texinfo-no-refill-regexp
! "\\|"
texinfo-part-of-para-regexp
"\\)")))
(< (point) (point-max)))
***************
*** 621,634 ****
;; with @<newline> followed by a newline.
(if (or
(>= (point) (point-max))
! (re-search-forward
! "@w{\\|@\\*\\|@\n\n"
(save-excursion
(forward-paragraph)
(forward-line 1)
(point)) t))
;; Go to end of paragraph and do nothing.
! (forward-paragraph)
;; 4. Else go to end of paragraph and insert @refill
(forward-paragraph)
(forward-line -1)
--- 621,634 ----
;; with @<newline> followed by a newline.
(if (or
(>= (point) (point-max))
! (re-search-forward
! "@w{\\|@\\*\\|@\n\n"
(save-excursion
(forward-paragraph)
(forward-line 1)
(point)) t))
;; Go to end of paragraph and do nothing.
! (forward-paragraph)
;; 4. Else go to end of paragraph and insert @refill
(forward-paragraph)
(forward-line -1)
***************
*** 648,655 ****
;;; Handle address@hidden' and address@hidden' commands
;; These commands change the hierarchical level of chapter structuring
! ;; commands.
! ;;
;; @raisesections changes @subsection to @section,
;; @section to @chapter,
;; etc.
--- 648,655 ----
;;; Handle address@hidden' and address@hidden' commands
;; These commands change the hierarchical level of chapter structuring
! ;; commands.
! ;;
;; @raisesections changes @subsection to @section,
;; @section to @chapter,
;; etc.
***************
*** 664,670 ****
;;
;; Repeated @raisesections/@lowersections continue to raise or lower
;; the heading level.
! ;;
;; An @lowersections command cancels an @raisesections command, and
;; vice versa.
;;
--- 664,670 ----
;;
;; Repeated @raisesections/@lowersections continue to raise or lower
;; the heading level.
! ;;
;; An @lowersections command cancels an @raisesections command, and
;; vice versa.
;;
***************
*** 675,681 ****
;; @section produce chapter headings).
(defun texinfo-raise-lower-sections ()
! "Raise or lower the hierarchical level of chapters, sections, etc.
This function acts according to address@hidden' and address@hidden'
commands in the Texinfo file.
--- 675,681 ----
;; @section produce chapter headings).
(defun texinfo-raise-lower-sections ()
! "Raise or lower the hierarchical level of chapters, sections, etc.
This function acts according to address@hidden' and address@hidden'
commands in the Texinfo file.
***************
*** 709,721 ****
An attempt to raise above `chapters' reproduces chapter commands; an
attempt to lower below subsubsections reproduces subsubsection
commands."
!
;; `texinfo-section-types-regexp' is defined in `texnfo-upd.el';
;; it is a regexp matching chapter, section, other headings
;; (but not the top node).
(let (type (level 0))
! (while
(re-search-forward
(concat
"\\(\\(address@hidden(raise\\|lower\\)sections\\)\\|\\("
--- 709,721 ----
An attempt to raise above `chapters' reproduces chapter commands; an
attempt to lower below subsubsections reproduces subsubsection
commands."
!
;; `texinfo-section-types-regexp' is defined in `texnfo-upd.el';
;; it is a regexp matching chapter, section, other headings
;; (but not the top node).
(let (type (level 0))
! (while
(re-search-forward
(concat
"\\(\\(address@hidden(raise\\|lower\\)sections\\)\\|\\("
***************
*** 724,746 ****
nil t)
(beginning-of-line)
(save-excursion (setq type (read (current-buffer))))
! (cond
!
;; 1. Increment level
((eq type '@raisesections)
(setq level (1+ level))
(delete-region
(point) (save-excursion (forward-line 1) (point))))
!
;; 2. Decrement level
((eq type '@lowersections)
(setq level (1- level))
(delete-region
(point) (save-excursion (forward-line 1) (point))))
!
;; Now handle structuring commands
((cond
!
;; 3. Raise level when positive
((> level 0)
(let ((count level)
--- 724,746 ----
nil t)
(beginning-of-line)
(save-excursion (setq type (read (current-buffer))))
! (cond
!
;; 1. Increment level
((eq type '@raisesections)
(setq level (1+ level))
(delete-region
(point) (save-excursion (forward-line 1) (point))))
!
;; 2. Decrement level
((eq type '@lowersections)
(setq level (1- level))
(delete-region
(point) (save-excursion (forward-line 1) (point))))
!
;; Now handle structuring commands
((cond
!
;; 3. Raise level when positive
((> level 0)
(let ((count level)
***************
*** 751,760 ****
(setq count (1- count)))
(kill-word 1)
(insert (symbol-name new-level))))
!
;; 4. Do nothing except move point when level is zero
((= level 0) (forward-line 1))
!
;; 5. Lower level when positive
((< level 0)
(let ((count level)
--- 751,760 ----
(setq count (1- count)))
(kill-word 1)
(insert (symbol-name new-level))))
!
;; 4. Do nothing except move point when level is zero
((= level 0) (forward-line 1))
!
;; 5. Lower level when positive
((< level 0)
(let ((count level)
***************
*** 774,790 ****
(@majorheading . @majorheading)
(@chapheading . @chapheading)
(@appendix . @appendix)
!
(@section . @chapter)
(@unnumberedsec . @unnumbered)
(@heading . @chapheading)
(@appendixsec . @appendix)
!
(@subsection . @section)
(@unnumberedsubsec . @unnumberedsec)
(@subheading . @heading)
(@appendixsubsec . @appendixsec)
!
(@subsubsection . @subsection)
(@unnumberedsubsubsec . @unnumberedsubsec)
(@subsubheading . @subheading)
--- 774,790 ----
(@majorheading . @majorheading)
(@chapheading . @chapheading)
(@appendix . @appendix)
!
(@section . @chapter)
(@unnumberedsec . @unnumbered)
(@heading . @chapheading)
(@appendixsec . @appendix)
!
(@subsection . @section)
(@unnumberedsubsec . @unnumberedsec)
(@subheading . @heading)
(@appendixsubsec . @appendixsec)
!
(@subsubsection . @subsection)
(@unnumberedsubsubsec . @unnumberedsubsec)
(@subsubheading . @subheading)
***************
*** 796,818 ****
higher types.")
(defvar texinfo-lowersections-alist
! '((@chapter . @section)
(@unnumbered . @unnumberedsec)
(@centerchap . @unnumberedsec)
(@majorheading . @heading)
(@chapheading . @heading)
(@appendix . @appendixsec)
!
(@section . @subsection)
(@unnumberedsec . @unnumberedsubsec)
(@heading . @subheading)
(@appendixsec . @appendixsubsec)
!
(@subsection . @subsubsection)
(@unnumberedsubsec . @unnumberedsubsubsec)
(@subheading . @subsubheading)
(@appendixsubsec . @appendixsubsubsec)
!
(@subsubsection . @subsubsection) ; Cannot go lower.
(@unnumberedsubsubsec . @unnumberedsubsubsec)
(@subsubheading . @subsubheading)
--- 796,818 ----
higher types.")
(defvar texinfo-lowersections-alist
! '((@chapter . @section)
(@unnumbered . @unnumberedsec)
(@centerchap . @unnumberedsec)
(@majorheading . @heading)
(@chapheading . @heading)
(@appendix . @appendixsec)
!
(@section . @subsection)
(@unnumberedsec . @unnumberedsubsec)
(@heading . @subheading)
(@appendixsec . @appendixsubsec)
!
(@subsection . @subsubsection)
(@unnumberedsubsec . @unnumberedsubsubsec)
(@subheading . @subsubheading)
(@appendixsubsec . @appendixsubsubsec)
!
(@subsubsection . @subsubsection) ; Cannot go lower.
(@unnumberedsubsubsec . @unnumberedsubsubsec)
(@subsubheading . @subsubheading)
***************
*** 845,859 ****
;; These are the single-character accent commands: @^ @` @' @" @= @~
;; In Info, they are simply quoted and the @ deleted.
;; Other single-character commands:
! ;; @* forces a line break,
;; @- is a discretionary hyphenation point; does nothing in Info.
;; @<space>, @<tab>, @<newline> each produce a single space,
;; unless followed by a newline.
! ;;
;; Old version 2.34 expression: (looking-at "address@hidden'` *\"?!]")
(if (looking-at "address@hidden'`\"=~ \t\n*?!-]")
;; @*, causes a line break.
! (cond
;; @*, a line break
((= (following-char) ?*)
;; remove command
--- 845,859 ----
;; These are the single-character accent commands: @^ @` @' @" @= @~
;; In Info, they are simply quoted and the @ deleted.
;; Other single-character commands:
! ;; @* forces a line break,
;; @- is a discretionary hyphenation point; does nothing in Info.
;; @<space>, @<tab>, @<newline> each produce a single space,
;; unless followed by a newline.
! ;;
;; Old version 2.34 expression: (looking-at "address@hidden'` *\"?!]")
(if (looking-at "address@hidden'`\"=~ \t\n*?!-]")
;; @*, causes a line break.
! (cond
;; @*, a line break
((= (following-char) ?*)
;; remove command
***************
*** 861,867 ****
;; insert return if not at end of line;
;; else line is already broken.
(if (not (= (following-char) ?\n))
! (insert ?\n)))
;; @-, deleted
((= (following-char) ?-)
(delete-region (1- (point)) (1+ (point))))
--- 861,867 ----
;; insert return if not at end of line;
;; else line is already broken.
(if (not (= (following-char) ?\n))
! (insert ?\n)))
;; @-, deleted
((= (following-char) ?-)
(delete-region (1- (point)) (1+ (point))))
***************
*** 872,878 ****
;; insert single space if not at end of line;
;; else line is already broken.
(if (not (= (following-char) ?\n))
! (insert ? )))
((= (following-char) ?\t)
(delete-region (1- (point)) (1+ (point)))
;; insert single space if not at end of line;
--- 872,878 ----
;; insert single space if not at end of line;
;; else line is already broken.
(if (not (= (following-char) ?\n))
! (insert ? )))
((= (following-char) ?\t)
(delete-region (1- (point)) (1+ (point)))
;; insert single space if not at end of line;
***************
*** 921,927 ****
;; Handle let aliasing
(setq texinfo-command-name
(let (trial
! (cmdname
(buffer-substring-no-properties
(1+ texinfo-command-start) texinfo-command-end)))
(while (setq trial (assoc cmdname texinfo-alias-list))
--- 921,927 ----
;; Handle let aliasing
(setq texinfo-command-name
(let (trial
! (cmdname
(buffer-substring-no-properties
(1+ texinfo-command-start) texinfo-command-end)))
(while (setq trial (assoc cmdname texinfo-alias-list))
***************
*** 935,947 ****
(if enclosure-type
(progn
(insert
! (car (car (cdr enclosure-type)))
(texinfo-parse-arg-discard)
(car (cdr (car (cdr enclosure-type)))))
(goto-char texinfo-command-start))
(let ((cmd (get texinfo-command-name 'texinfo-format)))
(if cmd (funcall cmd) (texinfo-unsupported)))))))
!
(cond (texinfo-stack
(goto-char (nth 2 (car texinfo-stack)))
(error "Unterminated @%s" (car (car texinfo-stack)))))
--- 935,947 ----
(if enclosure-type
(progn
(insert
! (car (car (cdr enclosure-type)))
(texinfo-parse-arg-discard)
(car (cdr (car (cdr enclosure-type)))))
(goto-char texinfo-command-start))
(let ((cmd (get texinfo-command-name 'texinfo-format)))
(if cmd (funcall cmd) (texinfo-unsupported)))))))
!
(cond (texinfo-stack
(goto-char (nth 2 (car texinfo-stack)))
(error "Unterminated @%s" (car (car texinfo-stack)))))
***************
*** 949,960 ****
;; Remove excess whitespace
(whitespace-cleanup))
! (defvar texinfo-copying-text ""
"Text of the copyright notice and copying permissions.")
(defun texinfo-copying ()
! "Copy the copyright notice and copying permissions from the Texinfo file,
! as indicated by the @copying ... @end copying command;
insert the text with the @insertcopying command."
(let ((beg (progn (beginning-of-line) (point)))
(end (progn (re-search-forward "address@hidden copying[ \t]*\n")
(point))))
--- 949,960 ----
;; Remove excess whitespace
(whitespace-cleanup))
! (defvar texinfo-copying-text ""
"Text of the copyright notice and copying permissions.")
(defun texinfo-copying ()
! "Copy the copyright notice and copying permissions from the Texinfo file,
! as indicated by the @copying ... @end copying command;
insert the text with the @insertcopying command."
(let ((beg (progn (beginning-of-line) (point)))
(end (progn (re-search-forward "address@hidden copying[ \t]*\n")
(point))))
***************
*** 965,971 ****
(delete-region beg end)))
(defun texinfo-insertcopying ()
! "Insert the copyright notice and copying permissions from the Texinfo file,
which are indicated by the @copying ... @end copying command."
(insert (concat "\n" texinfo-copying-text)))
--- 965,971 ----
(delete-region beg end)))
(defun texinfo-insertcopying ()
! "Insert the copyright notice and copying permissions from the Texinfo file,
which are indicated by the @copying ... @end copying command."
(insert (concat "\n" texinfo-copying-text)))
***************
*** 987,993 ****
(defun texinfo-parse-line-arg ()
"Return argument of @-command as string.
! Argument is separated from command either by a space or by a brace.
If a space, return rest of line, with beginning and ending white
space removed. If a brace, return string between braces.
Leave point after argument."
--- 987,993 ----
(defun texinfo-parse-line-arg ()
"Return argument of @-command as string.
! Argument is separated from command either by a space or by a brace.
If a space, return rest of line, with beginning and ending white
space removed. If a brace, return string between braces.
Leave point after argument."
***************
*** 1091,1103 ****
args)
(search-forward "{")
(save-excursion
! (texinfo-format-expand-region
(point)
(save-excursion (up-list 1) (1- (point)))))
;; The following does not handle cross references of the form:
;; address@hidden, , @code{@@address@hidden@}}.' because the
;; re-search-forward finds the first right brace after the second
! ;; comma.
(while (/= (preceding-char) ?\})
(skip-chars-forward " \t\n")
(setq beg (point))
--- 1091,1103 ----
args)
(search-forward "{")
(save-excursion
! (texinfo-format-expand-region
(point)
(save-excursion (up-list 1) (1- (point)))))
;; The following does not handle cross references of the form:
;; address@hidden, , @code{@@address@hidden@}}.' because the
;; re-search-forward finds the first right brace after the second
! ;; comma.
(while (/= (preceding-char) ?\})
(skip-chars-forward " \t\n")
(setq beg (point))
***************
*** 1164,1170 ****
;; Only `texinfo-format-buffer' handles @setfilename with this
;; definition; `texinfo-format-region' handles @setfilename, if any,
! ;; specially.
(put 'setfilename 'texinfo-format 'texinfo-format-setfilename)
(defun texinfo-format-setfilename ()
(texinfo-parse-arg-discard))
--- 1164,1170 ----
;; Only `texinfo-format-buffer' handles @setfilename with this
;; definition; `texinfo-format-region' handles @setfilename, if any,
! ;; specially.
(put 'setfilename 'texinfo-format 'texinfo-format-setfilename)
(defun texinfo-format-setfilename ()
(texinfo-parse-arg-discard))
***************
*** 1200,1213 ****
(put 'anchor 'texinfo-format 'texinfo-anchor)
(defun texinfo-anchor ()
! (let (anchor-string
(here (- (point) 7)) ; save location of beginning of address@hidden'
(arg (texinfo-parse-arg-discard)))
(if (looking-at " ") ; since a space may be left after -discard
(delete-char 1))
! (forward-paragraph)
(let ((end (point)))
! (if (save-excursion
(backward-word 1)
(search-forward "@refill" end t))
(setq anchor-string "@anchor-yes-refill")
--- 1200,1213 ----
(put 'anchor 'texinfo-format 'texinfo-anchor)
(defun texinfo-anchor ()
! (let (anchor-string
(here (- (point) 7)) ; save location of beginning of address@hidden'
(arg (texinfo-parse-arg-discard)))
(if (looking-at " ") ; since a space may be left after -discard
(delete-char 1))
! (forward-paragraph)
(let ((end (point)))
! (if (save-excursion
(backward-word 1)
(search-forward "@refill" end t))
(setq anchor-string "@anchor-yes-refill")
***************
*** 1225,1236 ****
;; The @detailmenu should be removed eventually.
;; According to Karl Berry, 31 August 1996:
! ;;
;; You don't like, I don't like it. I agree, it would be better just to
;; fix the bug [in `makeinfo']. .. At this point, since inserting those
;; two commands in the Elisp fn is trivial, I don't especially want to
;; expend more effort...
! ;;
;; I added a couple sentences of documentation to the manual (putting the
;; blame on makeinfo where it belongs :-().
--- 1225,1236 ----
;; The @detailmenu should be removed eventually.
;; According to Karl Berry, 31 August 1996:
! ;;
;; You don't like, I don't like it. I agree, it would be better just to
;; fix the bug [in `makeinfo']. .. At this point, since inserting those
;; two commands in the Elisp fn is trivial, I don't especially want to
;; expend more effort...
! ;;
;; I added a couple sentences of documentation to the manual (putting the
;; blame on makeinfo where it belongs :-().
***************
*** 1296,1313 ****
;;; URL Reference: @uref
! ;; @uref produces a reference to a uniform resource locator (URL).
! ;; It takes one mandatory argument, the URL, and one optional argument,
! ;; the text to display (the default is the URL itself).
(put 'uref 'texinfo-format 'texinfo-format-uref)
(defun texinfo-format-uref ()
"Format URL and optional URL-TITLE.
! Insert ` ... ' around URL if no URL-TITLE argument;
otherwise, insert URL-TITLE followed by URL in parentheses."
(let ((args (texinfo-format-parse-args)))
(texinfo-discard-command)
! ;; if url-title
(if (nth 1 args)
(insert (nth 1 args) " (" (nth 0 args) ")")
(insert "`" (nth 0 args) "'"))
--- 1296,1313 ----
;;; URL Reference: @uref
! ;; @uref produces a reference to a uniform resource locator (URL).
! ;; It takes one mandatory argument, the URL, and one optional argument,
! ;; the text to display (the default is the URL itself).
(put 'uref 'texinfo-format 'texinfo-format-uref)
(defun texinfo-format-uref ()
"Format URL and optional URL-TITLE.
! Insert ` ... ' around URL if no URL-TITLE argument;
otherwise, insert URL-TITLE followed by URL in parentheses."
(let ((args (texinfo-format-parse-args)))
(texinfo-discard-command)
! ;; if url-title
(if (nth 1 args)
(insert (nth 1 args) " (" (nth 0 args) ")")
(insert "`" (nth 0 args) "'"))
***************
*** 1397,1404 ****
;;; @kbdinputstyle, @vskip, headings & footings
;; These commands for not for Info and should never
! ;; appear in an Info environment; but if they do,
! ;; this causes them to be discarded.
;; @kbdinputstyle
(put 'kbdinputstyle 'texinfo-format 'texinfo-discard-line-with-args)
--- 1397,1404 ----
;;; @kbdinputstyle, @vskip, headings & footings
;; These commands for not for Info and should never
! ;; appear in an Info environment; but if they do,
! ;; this causes them to be discarded.
;; @kbdinputstyle
(put 'kbdinputstyle 'texinfo-format 'texinfo-discard-line-with-args)
***************
*** 1417,1424 ****
;;; @documentdescription ... @end documentdescription
;; This command is for HTML output and should never
! ;; appear in an Info environment; but if it does,
! ;; this causes it to be discarded.
(put 'documentdescription 'texinfo-format 'texinfo-format-documentdescription)
(defun texinfo-format-documentdescription ()
--- 1417,1424 ----
;;; @documentdescription ... @end documentdescription
;; This command is for HTML output and should never
! ;; appear in an Info environment; but if it does,
! ;; this causes it to be discarded.
(put 'documentdescription 'texinfo-format 'texinfo-format-documentdescription)
(defun texinfo-format-documentdescription ()
***************
*** 1465,1480 ****
;; This command is followed immediately by a left brace, then by the text of
;; the footnote, and then by a terminating right brace. The
;; template for a footnote is:
! ;;
;; @footnote{TEXT}
;;
;; Info has two footnote styles:
! ;;
;; * In the End of node style, all the footnotes for a single node
;; are placed at the end of that node. The footnotes are
;; separated from the rest of the node by a line of dashes with
;; the word `Footnotes' within it.
! ;;
;; * In the Separate node style, all the footnotes for a single node
;; are placed in an automatically constructed node of their own.
--- 1465,1480 ----
;; This command is followed immediately by a left brace, then by the text of
;; the footnote, and then by a terminating right brace. The
;; template for a footnote is:
! ;;
;; @footnote{TEXT}
;;
;; Info has two footnote styles:
! ;;
;; * In the End of node style, all the footnotes for a single node
;; are placed at the end of that node. The footnotes are
;; separated from the rest of the node by a line of dashes with
;; the word `Footnotes' within it.
! ;;
;; * In the Separate node style, all the footnotes for a single node
;; are placed in an automatically constructed node of their own.
***************
*** 1482,1491 ****
;; @footnotestyle separate
;; or
;; @footnotestyle end
! ;;
;; The default is separate
! (defvar texinfo-footnote-style "separate"
"Footnote style, either separate or end.")
(put 'footnotestyle 'texinfo-format 'texinfo-footnotestyle)
--- 1482,1491 ----
;; @footnotestyle separate
;; or
;; @footnotestyle end
! ;;
;; The default is separate
! (defvar texinfo-footnote-style "separate"
"Footnote style, either separate or end.")
(put 'footnotestyle 'texinfo-format 'texinfo-footnotestyle)
***************
*** 1538,1544 ****
(forward-line -1))
;; two cases: for the first footnote, we must insert a node header;
! ;; for the second and subsequent footnotes, we need only insert
;; the text of the footnote.
(if (save-excursion
--- 1538,1544 ----
(forward-line -1))
;; two cases: for the first footnote, we must insert a node header;
! ;; for the second and subsequent footnotes, we need only insert
;; the text of the footnote.
(if (save-excursion
***************
*** 1635,1641 ****
(put 'enumerate 'texinfo-format 'texinfo-enumerate)
(defun texinfo-enumerate ()
(texinfo-push-stack
! 'enumerate
(progn (skip-chars-forward " \t")
(if (eolp)
1
--- 1635,1641 ----
(put 'enumerate 'texinfo-format 'texinfo-enumerate)
(defun texinfo-enumerate ()
(texinfo-push-stack
! 'enumerate
(progn (skip-chars-forward " \t")
(if (eolp)
1
***************
*** 1735,1741 ****
(setcar (cdr (car texinfo-stack))
(make-symbol
(char-to-string
! (1+
(string-to-char enumerating-symbol))))))
(t
(error
--- 1735,1741 ----
(setcar (cdr (car texinfo-stack))
(make-symbol
(char-to-string
! (1+
(string-to-char enumerating-symbol))))))
(t
(error
***************
*** 1769,1776 ****
(put 'table 'texinfo-format 'texinfo-table)
(defun texinfo-table ()
! (texinfo-push-stack
! 'table
(progn (skip-chars-forward " \t")
(if (eolp)
"@asis"
--- 1769,1776 ----
(put 'table 'texinfo-format 'texinfo-table)
(defun texinfo-table ()
! (texinfo-push-stack
! 'table
(progn (skip-chars-forward " \t")
(if (eolp)
"@asis"
***************
*** 1884,1897 ****
;;
;; Long lines of text are filled within columns.
;;
! ;; Using the Emacs Lisp formatter, texinfmt.el,
;; the whitespace between columns can be increased by setting
;; `texinfo-extra-inter-column-width' to a value greater than 0. By default,
;; there is at least one blank space between columns.
;;
;; The Emacs Lisp formatter, texinfmt.el, ignores the following four
;; commands that are defined in texinfo.tex for printed output.
! ;;
;; @multitableparskip,
;; @multitableparindent,
;; @multitablecolmargin,
--- 1884,1897 ----
;;
;; Long lines of text are filled within columns.
;;
! ;; Using the Emacs Lisp formatter, texinfmt.el,
;; the whitespace between columns can be increased by setting
;; `texinfo-extra-inter-column-width' to a value greater than 0. By default,
;; there is at least one blank space between columns.
;;
;; The Emacs Lisp formatter, texinfmt.el, ignores the following four
;; commands that are defined in texinfo.tex for printed output.
! ;;
;; @multitableparskip,
;; @multitableparindent,
;; @multitablecolmargin,
***************
*** 1899,1938 ****
;; How @multitable works.
;; =====================
! ;;
;; `texinfo-multitable' reads the @multitable line and determines from it
! ;; how wide each column should be.
! ;;
;; Also, it pushes this information, along with an identifying symbol,
;; onto the `texinfo-stack'. At the @end multitable command, the stack
;; is checked for its matching @multitable command, and then popped, or
;; else an error is signaled. Also, this command pushes the location of
;; the start of the table onto the stack.
! ;;
;; `texinfo-end-multitable' checks the `texinfo-stack' that the @end
;; multitable truly is ending a corresponding beginning, and if it is,
;; pops the stack.
! ;;
! ;; `texinfo-multitable-widths' is called by `texinfo-multitable'.
;; The function returns a list of the widths of each column in a
;; multi-column table, based on the information supplied by the arguments
;; to the @multitable command (by arguments, I mean the text on the rest
;; of the @multitable line, not the remainder of the multi-column table
;; environment).
! ;;
;; `texinfo-multitable-item' formats a row within a multicolumn table.
;; This command is executed when texinfmt sees @item inside @multitable.
;; Cells in row are separated by address@hidden's. Widths of cells are
specified
;; by the arguments in the @multitable line. Cells are filled. All cells
;; are made to be the same height by padding their bottoms, as needed,
;; with blanks.
! ;;
! ;; `texinfo-multitable-extract-row' is called by `texinfo-multitable-item'.
;; This function returns the text in a multitable row, as a string.
;; The start of a row is marked by an @item and the end of row is the
;; beginning of next @item or beginning of the @end multitable line.
;; Cells within a row are separated by @tab.
! ;;
;; Note that @tab, the cell separators, are not treated as independent
;; Texinfo commands.
--- 1899,1938 ----
;; How @multitable works.
;; =====================
! ;;
;; `texinfo-multitable' reads the @multitable line and determines from it
! ;; how wide each column should be.
! ;;
;; Also, it pushes this information, along with an identifying symbol,
;; onto the `texinfo-stack'. At the @end multitable command, the stack
;; is checked for its matching @multitable command, and then popped, or
;; else an error is signaled. Also, this command pushes the location of
;; the start of the table onto the stack.
! ;;
;; `texinfo-end-multitable' checks the `texinfo-stack' that the @end
;; multitable truly is ending a corresponding beginning, and if it is,
;; pops the stack.
! ;;
! ;; `texinfo-multitable-widths' is called by `texinfo-multitable'.
;; The function returns a list of the widths of each column in a
;; multi-column table, based on the information supplied by the arguments
;; to the @multitable command (by arguments, I mean the text on the rest
;; of the @multitable line, not the remainder of the multi-column table
;; environment).
! ;;
;; `texinfo-multitable-item' formats a row within a multicolumn table.
;; This command is executed when texinfmt sees @item inside @multitable.
;; Cells in row are separated by address@hidden's. Widths of cells are
specified
;; by the arguments in the @multitable line. Cells are filled. All cells
;; are made to be the same height by padding their bottoms, as needed,
;; with blanks.
! ;;
! ;; `texinfo-multitable-extract-row' is called by `texinfo-multitable-item'.
;; This function returns the text in a multitable row, as a string.
;; The start of a row is marked by an @item and the end of row is the
;; beginning of next @item or beginning of the @end multitable line.
;; Cells within a row are separated by @tab.
! ;;
;; Note that @tab, the cell separators, are not treated as independent
;; Texinfo commands.
***************
*** 1976,1982 ****
Long lines of text are filled within columns.
! Using the Emacs Lisp formatter, texinfmt.el,
the whitespace between columns can be increased by setting
`texinfo-extra-inter-column-width' to a value greater than 0. By default,
there is at least one blank space between columns.
--- 1976,1982 ----
Long lines of text are filled within columns.
! Using the Emacs Lisp formatter, texinfmt.el,
the whitespace between columns can be increased by setting
`texinfo-extra-inter-column-width' to a value greater than 0. By default,
there is at least one blank space between columns.
***************
*** 2018,2024 ****
;; @multitable {Column 1 template} {Column 2} {Column 3 example}
;; Place point before first argument
(skip-chars-forward " \t")
! (cond
;; Check for common misspelling
((looking-at "@columnfraction ")
(error "In @multitable, @columnfractions misspelled"))
--- 2018,2024 ----
;; @multitable {Column 1 template} {Column 2} {Column 3 example}
;; Place point before first argument
(skip-chars-forward " \t")
! (cond
;; Check for common misspelling
((looking-at "@columnfraction ")
(error "In @multitable, @columnfractions misspelled"))
***************
*** 2325,2331 ****
;;; @timestamp{}
! ;; Produce `Day Month Year Hour:Min' style of output.
;; eg `1 Jan 1900 13:52'
(put 'timestamp 'texinfo-format 'texinfo-format-timestamp)
--- 2325,2331 ----
;;; @timestamp{}
! ;; Produce `Day Month Year Hour:Min' style of output.
;; eg `1 Jan 1900 13:52'
(put 'timestamp 'texinfo-format 'texinfo-format-timestamp)
***************
*** 2355,2365 ****
;; command for Info, but not for TeX. A command defined using
;; address@hidden' marks text by enclosing it in strings that precede
;; and follow the text.
! ;;
;; Presumably, if you define a command with address@hidden for Info,
;; you will also define the same command in the TeX definitions file,
;; `texinfo.tex' in a manner appropriate for typesetting.
! ;;
;; Write a address@hidden' command on a line and follow it with three
;; arguments separated by commas (commas are used as separators in an
;; address@hidden' line in the same way). The first argument to
--- 2355,2365 ----
;; command for Info, but not for TeX. A command defined using
;; address@hidden' marks text by enclosing it in strings that precede
;; and follow the text.
! ;;
;; Presumably, if you define a command with address@hidden for Info,
;; you will also define the same command in the TeX definitions file,
;; `texinfo.tex' in a manner appropriate for typesetting.
! ;;
;; Write a address@hidden' command on a line and follow it with three
;; arguments separated by commas (commas are used as separators in an
;; address@hidden' line in the same way). The first argument to
***************
*** 2376,2382 ****
;; If you do a @definfoenclose{} on the name of a pre-defined macro (such
;; as @emph{}, @strong{}, @tt{}, or @i{}) the enclosure definition will
;; override the built-in definition.
! ;;
;; An enclosure command defined this way takes one argument in braces.
;;
;; For example, you can write:
--- 2376,2382 ----
;; If you do a @definfoenclose{} on the name of a pre-defined macro (such
;; as @emph{}, @strong{}, @tt{}, or @i{}) the enclosure definition will
;; override the built-in definition.
! ;;
;; An enclosure command defined this way takes one argument in braces.
;;
;; For example, you can write:
***************
*** 2390,2396 ****
;; before and `\\' after the argument to address@hidden'. You can then write
;; address@hidden' wherever you want `//bar\\' highlighted in Info.
;;
! ;; Also, for TeX formatting, you could write
;;
;; @iftex
;; @address@hidden@address@hidden
--- 2390,2396 ----
;; before and `\\' after the argument to address@hidden'. You can then write
;; address@hidden' wherever you want `//bar\\' highlighted in Info.
;;
! ;; Also, for TeX formatting, you could write
;;
;; @iftex
;; @address@hidden@address@hidden
***************
*** 2524,2530 ****
Enclose the verbatim text, including the delimiters, in braces. Print
text exactly as written (but not the delimiters) in a fixed-width.
! For example, @verb\{|@|\} results in @ and
@verb\{+@'e?`!`+} results in @'e?`!`."
(let ((delimiter (buffer-substring-no-properties
--- 2524,2530 ----
Enclose the verbatim text, including the delimiters, in braces. Print
text exactly as written (but not the delimiters) in a fixed-width.
! For example, @verb\{|@|\} results in @ and
@verb\{+@'e?`!`+} results in @'e?`!`."
(let ((delimiter (buffer-substring-no-properties
***************
*** 2556,2562 ****
;;; @kbd
! ;; Inside of @example ... @end example and similar environments,
;; @kbd does nothing; but outside of such environments, it places
;; single quotation marks around its argument.
--- 2556,2562 ----
;;; @kbd
! ;; Inside of @example ... @end example and similar environments,
;; @kbd does nothing; but outside of such environments, it places
;; single quotation marks around its argument.
***************
*** 2591,2597 ****
"Place single quote marks around arg, except in @example and similar."
;; Search forward for @end example closer than an @example.
;; Can stop search at nearest @node or texinfo-section-types-regexp
! (let* ((stop
(save-excursion
(re-search-forward
(concat "address@hidden|\\(" texinfo-section-types-regexp "\\)")
--- 2591,2597 ----
"Place single quote marks around arg, except in @example and similar."
;; Search forward for @end example closer than an @example.
;; Can stop search at nearest @node or texinfo-section-types-regexp
! (let* ((stop
(save-excursion
(re-search-forward
(concat "address@hidden|\\(" texinfo-section-types-regexp "\\)")
***************
*** 2683,2689 ****
(point)))
(insert "INFO-DIR-SECTION " str "\n")))
! ;;; @cartouche
;; The @cartouche command is a noop in Info; in a printed manual,
;; it makes a box with rounded corners.
--- 2683,2689 ----
(point)))
(insert "INFO-DIR-SECTION " str "\n")))
! ;;; @cartouche
;; The @cartouche command is a noop in Info; in a printed manual,
;; it makes a box with rounded corners.
***************
*** 2744,2753 ****
(make-string
(- fill-column
(save-excursion
! (end-of-line)
(skip-chars-backward " \t")
(delete-region (point) (progn (end-of-line) (point)))
! (current-column)))
? )))))
--- 2744,2753 ----
(make-string
(- fill-column
(save-excursion
! (end-of-line)
(skip-chars-backward " \t")
(delete-region (point) (progn (end-of-line) (point)))
! (current-column)))
? )))))
***************
*** 2794,2800 ****
;;; Refilling and indenting: @refill, @paragraphindent, @noindent
;;; Indent only those paragraphs that are refilled as a result of an
! ;;; @refill command.
;; * If the value is `asis', do not change the existing indentation at
;; the starts of paragraphs.
--- 2794,2800 ----
;;; Refilling and indenting: @refill, @paragraphindent, @noindent
;;; Indent only those paragraphs that are refilled as a result of an
! ;;; @refill command.
;; * If the value is `asis', do not change the existing indentation at
;; the starts of paragraphs.
***************
*** 2826,2851 ****
Default is to leave paragraph indentation as is."
(texinfo-discard-command)
(let ((position (point-marker)))
! (forward-paragraph -1)
(if (looking-at "[ \t\n]*$") (forward-line 1))
;; Do not indent if an entry in a list, table, or deffn,
;; or if paragraph is preceded by @noindent.
;; Otherwise, indent
! (cond
;; delete a @noindent line and do not indent paragraph
((save-excursion (forward-line -1)
! (looking-at "address@hidden"))
(forward-line -1)
(delete-region (point) (progn (forward-line 1) (point))))
;; do nothing if "asis"
((equal texinfo-paragraph-indent "asis"))
;; do no indenting in list, etc.
! ((> texinfo-stack-depth 0))
;; otherwise delete existing whitespace and indent
! (t
(delete-region (point) (progn (skip-chars-forward " \t") (point)))
(insert (make-string texinfo-paragraph-indent ? ))))
! (forward-paragraph 1)
(forward-line -1)
(end-of-line)
;; Do not fill a section title line with asterisks, hyphens, etc. that
--- 2826,2851 ----
Default is to leave paragraph indentation as is."
(texinfo-discard-command)
(let ((position (point-marker)))
! (forward-paragraph -1)
(if (looking-at "[ \t\n]*$") (forward-line 1))
;; Do not indent if an entry in a list, table, or deffn,
;; or if paragraph is preceded by @noindent.
;; Otherwise, indent
! (cond
;; delete a @noindent line and do not indent paragraph
((save-excursion (forward-line -1)
! (looking-at "address@hidden"))
(forward-line -1)
(delete-region (point) (progn (forward-line 1) (point))))
;; do nothing if "asis"
((equal texinfo-paragraph-indent "asis"))
;; do no indenting in list, etc.
! ((> texinfo-stack-depth 0))
;; otherwise delete existing whitespace and indent
! (t
(delete-region (point) (progn (skip-chars-forward " \t") (point)))
(insert (make-string texinfo-paragraph-indent ? ))))
! (forward-paragraph 1)
(forward-line -1)
(end-of-line)
;; Do not fill a section title line with asterisks, hyphens, etc. that
***************
*** 2855,2861 ****
(paragraph-separate
(concat paragraph-separate "\\|[-=.]+\\|\\*\\*+"))
(previous-paragraph-start paragraph-start)
! (paragraph-start
(concat paragraph-start "\\|[-=.]+\\|\\*\\*+")))
(unwind-protect
(fill-paragraph nil)
--- 2855,2861 ----
(paragraph-separate
(concat paragraph-separate "\\|[-=.]+\\|\\*\\*+"))
(previous-paragraph-start paragraph-start)
! (paragraph-start
(concat paragraph-start "\\|[-=.]+\\|\\*\\*+")))
(unwind-protect
(fill-paragraph nil)
***************
*** 2864,2871 ****
(goto-char position)))
(put 'noindent 'texinfo-format 'texinfo-noindent)
! (defun texinfo-noindent ()
! (save-excursion
(forward-paragraph 1)
(if (search-backward "@refill"
(save-excursion (forward-line -1) (point)) t)
--- 2864,2871 ----
(goto-char position)))
(put 'noindent 'texinfo-format 'texinfo-noindent)
! (defun texinfo-noindent ()
! (save-excursion
(forward-paragraph 1)
(if (search-backward "@refill"
(save-excursion (forward-line -1) (point)) t)
***************
*** 2949,2955 ****
(fset index-formatting-command
(list 'lambda 'nil
! (list 'texinfo-index
(list 'quote index-alist-name))))))
--- 2949,2955 ----
(fset index-formatting-command
(list 'lambda 'nil
! (list 'texinfo-index
(list 'quote index-alist-name))))))
***************
*** 3103,3109 ****
;; See the `texinfo-accent-commands' variable
;; in the section for `texinfo-append-refill'.
! ;; Also, see the defun for `texinfo-format-scan'
;; for single-character accent commands.
;; Command Info output Name
--- 3103,3109 ----
;; See the `texinfo-accent-commands' variable
;; in the section for `texinfo-append-refill'.
! ;; Also, see the defun for `texinfo-format-scan'
;; for single-character accent commands.
;; Command Info output Name
***************
*** 3148,3154 ****
;; Note: The defun texinfo-format-scan
;; looks at "address@hidden'`\",=~ *?!-]"
! ;; In the case of @*, a line break is inserted;
;; in the other cases, the characters are simply quoted and the @ is deleted.
;; Thus, `texinfo-format-scan' handles the following
;; single-character accent commands: @^ @` @' @" @, @- @= @~
--- 3148,3154 ----
;; Note: The defun texinfo-format-scan
;; looks at "address@hidden'`\",=~ *?!-]"
! ;; In the case of @*, a line break is inserted;
;; in the other cases, the characters are simply quoted and the @ is deleted.
;; Thus, `texinfo-format-scan' handles the following
;; single-character accent commands: @^ @` @' @" @, @- @= @~
***************
*** 3158,3176 ****
;; (defun texinfo-format-circumflex-accent ()
;; (texinfo-discard-command)
;; (insert "^"))
! ;;
;; @` ==> ` grave accent
;; (put '\` 'texinfo-format 'texinfo-format-grave-accent)
;; (defun texinfo-format-grave-accent ()
;; (texinfo-discard-command)
;; (insert "\`"))
! ;;
;; @' ==> ' acute accent
;; (put '\' 'texinfo-format 'texinfo-format-acute-accent)
;; (defun texinfo-format-acute-accent ()
;; (texinfo-discard-command)
;; (insert "'"))
! ;;
;; @" ==> " umlaut accent
;; (put '\" 'texinfo-format 'texinfo-format-umlaut-accent)
;; (defun texinfo-format-umlaut-accent ()
--- 3158,3176 ----
;; (defun texinfo-format-circumflex-accent ()
;; (texinfo-discard-command)
;; (insert "^"))
! ;;
;; @` ==> ` grave accent
;; (put '\` 'texinfo-format 'texinfo-format-grave-accent)
;; (defun texinfo-format-grave-accent ()
;; (texinfo-discard-command)
;; (insert "\`"))
! ;;
;; @' ==> ' acute accent
;; (put '\' 'texinfo-format 'texinfo-format-acute-accent)
;; (defun texinfo-format-acute-accent ()
;; (texinfo-discard-command)
;; (insert "'"))
! ;;
;; @" ==> " umlaut accent
;; (put '\" 'texinfo-format 'texinfo-format-umlaut-accent)
;; (defun texinfo-format-umlaut-accent ()
***************
*** 3182,3188 ****
;; (defun texinfo-format-overbar-accent ()
;; (texinfo-discard-command)
;; (insert "="))
! ;;
;; @~ ==> ~ tilde accent
;; (put '~ 'texinfo-format 'texinfo-format-tilde-accent)
;; (defun texinfo-format-tilde-accent ()
--- 3182,3188 ----
;; (defun texinfo-format-overbar-accent ()
;; (texinfo-discard-command)
;; (insert "="))
! ;;
;; @~ ==> ~ tilde accent
;; (put '~ 'texinfo-format 'texinfo-format-tilde-accent)
;; (defun texinfo-format-tilde-accent ()
***************
*** 3342,3348 ****
;; In Info, `Category: name ARGS'
;; In index: name: node. line#.
;;
! ;; @defvr category name
;; In Info, `Category: name'
;; In index: name: node. line#.
;;
--- 3342,3348 ----
;; In Info, `Category: name ARGS'
;; In index: name: node. line#.
;;
! ;; @defvr category name
;; In Info, `Category: name'
;; In index: name: node. line#.
;;
***************
*** 3363,3392 ****
;; Generalized typed-function-like or typed-variable-like entity:
;; @deftypefn category data-type name args...
;; In Info, `Category: data-type name args...'
! ;; @deftypevr category data-type name
;; In Info, `Category: data-type name'
;; In index: name: node. line#.
;;
;; Specialized typed-function-like or typed-variable-like entity:
;; @deftypefun data-type name args...
;; In Info, `Function: data-type name ARGS'
! ;; In index: name: node. line#.
;;
! ;; @deftypevar data-type name
;; In Info, `Variable: data-type name'
;; In index: name: node. line#. but include args after name!?
;;
! ;; Generalized object oriented entity:
;; @defop category class name args...
;; In Info, `Category on class: name ARG'
;; In index: name on class: node. line#.
;;
! ;; @defcv category class name
;; In Info, `Category of class: name'
;; In index: name of class: node. line#.
;;
;; Specialized object oriented entity:
! ;; @defmethod class name args...
;; In Info, `Method on class: name ARGS'
;; In index: name on class: node. line#.
;;
--- 3363,3392 ----
;; Generalized typed-function-like or typed-variable-like entity:
;; @deftypefn category data-type name args...
;; In Info, `Category: data-type name args...'
! ;; @deftypevr category data-type name
;; In Info, `Category: data-type name'
;; In index: name: node. line#.
;;
;; Specialized typed-function-like or typed-variable-like entity:
;; @deftypefun data-type name args...
;; In Info, `Function: data-type name ARGS'
! ;; In index: name: node. line#.
;;
! ;; @deftypevar data-type name
;; In Info, `Variable: data-type name'
;; In index: name: node. line#. but include args after name!?
;;
! ;; Generalized object oriented entity:
;; @defop category class name args...
;; In Info, `Category on class: name ARG'
;; In index: name on class: node. line#.
;;
! ;; @defcv category class name
;; In Info, `Category of class: name'
;; In index: name of class: node. line#.
;;
;; Specialized object oriented entity:
! ;; @defmethod class name args...
;; In Info, `Method on class: name ARGS'
;; In index: name on class: node. line#.
;;
***************
*** 3505,3511 ****
;; Generalized typed-function-like or typed-variable-like entity:
;; @deftypefn category data-type name args...
;; In Info, `Category: data-type name args...'
! ;; @deftypevr category data-type name
;; In Info, `Category: data-type name'
;; Note: args in lower case, unless modified in command line.
(let ((category (car parsed-args))
--- 3505,3511 ----
;; Generalized typed-function-like or typed-variable-like entity:
;; @deftypefn category data-type name args...
;; In Info, `Category: data-type name args...'
! ;; @deftypevr category data-type name
;; In Info, `Category: data-type name'
;; Note: args in lower case, unless modified in command line.
(let ((category (car parsed-args))
***************
*** 3528,3534 ****
;; Specialized typed-function-like or typed-variable-like entity:
;; @deftypefun data-type name args...
;; In Info, `Function: data-type name ARGS'
! ;; @deftypevar data-type name
;; In Info, `Variable: data-type name'
;; Note: args in lower case, unless modified in command line.
;; Use cdr of texinfo-defun-type to determine category:
--- 3528,3534 ----
;; Specialized typed-function-like or typed-variable-like entity:
;; @deftypefun data-type name args...
;; In Info, `Function: data-type name ARGS'
! ;; @deftypevar data-type name
;; In Info, `Variable: data-type name'
;; Note: args in lower case, unless modified in command line.
;; Use cdr of texinfo-defun-type to determine category:
***************
*** 3545,3551 ****
(put 'defop 'texinfo-deffn-formatting-property 'texinfo-format-defop)
(put 'defopx 'texinfo-deffn-formatting-property 'texinfo-format-defop)
(defun texinfo-format-defop (parsed-args)
! ;; Generalized object oriented entity:
;; @defop category class name args...
;; In Info, `Category on class: name ARG'
;; Note: args in upper case; use of `on'
--- 3545,3551 ----
(put 'defop 'texinfo-deffn-formatting-property 'texinfo-format-defop)
(put 'defopx 'texinfo-deffn-formatting-property 'texinfo-format-defop)
(defun texinfo-format-defop (parsed-args)
! ;; Generalized object oriented entity:
;; @defop category class name args...
;; In Info, `Category on class: name ARG'
;; Note: args in upper case; use of `on'
***************
*** 3562,3569 ****
(put 'defcv 'texinfo-deffn-formatting-property 'texinfo-format-defcv)
(put 'defcvx 'texinfo-deffn-formatting-property 'texinfo-format-defcv)
(defun texinfo-format-defcv (parsed-args)
! ;; Generalized object oriented entity:
! ;; @defcv category class name
;; In Info, `Category of class: name'
;; Note: args in upper case; use of `of'
(let ((category (car parsed-args))
--- 3562,3569 ----
(put 'defcv 'texinfo-deffn-formatting-property 'texinfo-format-defcv)
(put 'defcvx 'texinfo-deffn-formatting-property 'texinfo-format-defcv)
(defun texinfo-format-defcv (parsed-args)
! ;; Generalized object oriented entity:
! ;; @defcv category class name
;; In Info, `Category of class: name'
;; Note: args in upper case; use of `of'
(let ((category (car parsed-args))
***************
*** 3580,3586 ****
(put 'defmethodx 'texinfo-deffn-formatting-property 'texinfo-format-defmethod)
(defun texinfo-format-defmethod (parsed-args)
;; Specialized object oriented entity:
! ;; @defmethod class name args...
;; In Info, `Method on class: name ARGS'
;; Note: args in upper case; use of `on'
;; Use cdr of texinfo-defun-type to determine category:
--- 3580,3586 ----
(put 'defmethodx 'texinfo-deffn-formatting-property 'texinfo-format-defmethod)
(defun texinfo-format-defmethod (parsed-args)
;; Specialized object oriented entity:
! ;; @defmethod class name args...
;; In Info, `Method on class: name ARGS'
;; Note: args in upper case; use of `on'
;; Use cdr of texinfo-defun-type to determine category:
***************
*** 3618,3644 ****
;; line number. Depending on the which command is used, the entry is
;; formatted differently:
;;
! ;; @defun,
! ;; @defmac,
! ;; @defspec,
! ;; @defvar,
! ;; @defopt all use their 1st argument as the entry-proper
! ;;
! ;; @deffn,
! ;; @defvr,
! ;; @deftp
;; @deftypefun
;; @deftypevar all use their 2nd argument as the entry-proper
;;
! ;; @deftypefn,
! ;; @deftypevr both use their 3rd argument as the entry-proper
;;
! ;; @defmethod uses its 2nd and 1st arguments as an entry-proper
;; formatted: NAME on CLASS
! ;; @defop uses its 3rd and 2nd arguments as an entry-proper
;; formatted: NAME on CLASS
! ;;
;; @defivar uses its 2nd and 1st arguments as an entry-proper
;; formatted: NAME of CLASS
;;
--- 3618,3644 ----
;; line number. Depending on the which command is used, the entry is
;; formatted differently:
;;
! ;; @defun,
! ;; @defmac,
! ;; @defspec,
! ;; @defvar,
! ;; @defopt all use their 1st argument as the entry-proper
! ;;
! ;; @deffn,
! ;; @defvr,
! ;; @deftp
;; @deftypefun
;; @deftypevar all use their 2nd argument as the entry-proper
;;
! ;; @deftypefn,
! ;; @deftypevr both use their 3rd argument as the entry-proper
;;
! ;; @defmethod uses its 2nd and 1st arguments as an entry-proper
;; formatted: NAME on CLASS
! ;; @defop uses its 3rd and 2nd arguments as an entry-proper
;; formatted: NAME on CLASS
! ;;
;; @defivar uses its 2nd and 1st arguments as an entry-proper
;; formatted: NAME of CLASS
;;
***************
*** 3660,3666 ****
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
(car parsed-args)
--- 3660,3666 ----
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
(car parsed-args)
***************
*** 3681,3692 ****
(put 'deftypefunx 'texinfo-defun-indexing-property 'texinfo-index-deffn)
(put 'deftypevar 'texinfo-defun-indexing-property 'texinfo-index-deffn)
(put 'deftypevarx 'texinfo-defun-indexing-property 'texinfo-index-deffn)
! (defun texinfo-index-deffn (parsed-args)
;; use 2nd parsed-arg as entry-proper
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
(car (cdr parsed-args))
--- 3681,3692 ----
(put 'deftypefunx 'texinfo-defun-indexing-property 'texinfo-index-deffn)
(put 'deftypevar 'texinfo-defun-indexing-property 'texinfo-index-deffn)
(put 'deftypevarx 'texinfo-defun-indexing-property 'texinfo-index-deffn)
! (defun texinfo-index-deffn (parsed-args)
;; use 2nd parsed-arg as entry-proper
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
(car (cdr parsed-args))
***************
*** 3706,3712 ****
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
(car (cdr (cdr parsed-args)))
--- 3706,3712 ----
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
(car (cdr (cdr parsed-args)))
***************
*** 3724,3733 ****
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
! (format "%s on %s"
(car (cdr parsed-args))
(car parsed-args))
texinfo-last-node
--- 3724,3733 ----
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
! (format "%s on %s"
(car (cdr parsed-args))
(car parsed-args))
texinfo-last-node
***************
*** 3744,3753 ****
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
! (format "%s on %s"
(car (cdr (cdr parsed-args)))
(car (cdr parsed-args)))
texinfo-last-node
--- 3744,3753 ----
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
! (format "%s on %s"
(car (cdr (cdr parsed-args)))
(car (cdr parsed-args)))
texinfo-last-node
***************
*** 3764,3773 ****
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
! (format "%s of %s"
(car (cdr parsed-args))
(car parsed-args))
texinfo-last-node
--- 3764,3773 ----
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
! (format "%s of %s"
(car (cdr parsed-args))
(car parsed-args))
texinfo-last-node
***************
*** 3784,3793 ****
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
! (format "%s of %s"
(car (cdr (cdr parsed-args)))
(car (cdr parsed-args)))
texinfo-last-node
--- 3784,3793 ----
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
! (cons
;; Three elements: entry-proper, node-name, line-number
(list
! (format "%s of %s"
(car (cdr (cdr parsed-args)))
(car (cdr parsed-args)))
texinfo-last-node
***************
*** 3975,3984 ****
;; @set FLAG, then the text is not formatted; it is ignored. @ifclear
;; is the opposite of @ifset.
! ;; If a flag is set to a string with @set FLAG,
;; replace @value{FLAG} with the string.
! ;; If a flag with a value is cleared,
! ;; @value{FLAG} is invalid,
;; as if there had never been any @set FLAG previously.
(put 'clear 'texinfo-format 'texinfo-clear)
--- 3975,3984 ----
;; @set FLAG, then the text is not formatted; it is ignored. @ifclear
;; is the opposite of @ifset.
! ;; If a flag is set to a string with @set FLAG,
;; replace @value{FLAG} with the string.
! ;; If a flag with a value is cleared,
! ;; @value{FLAG} is invalid,
;; as if there had never been any @set FLAG previously.
(put 'clear 'texinfo-format 'texinfo-clear)
***************
*** 4016,4022 ****
'flag-set)
(get (car (read-from-string arg)) 'texinfo-set-value))
(insert (get (car (read-from-string arg)) 'texinfo-set-value)))
! ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
'flag-cleared)
(insert (format "{No value for \"%s\"}" arg)))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) nil)
--- 4016,4022 ----
'flag-set)
(get (car (read-from-string arg)) 'texinfo-set-value))
(insert (get (car (read-from-string arg)) 'texinfo-set-value)))
! ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
'flag-cleared)
(insert (format "{No value for \"%s\"}" arg)))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) nil)
***************
*** 4040,4046 ****
(point))))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
nil)
! ;; In this case flag is neither set nor cleared.
;; Act as if set, i.e. do nothing.
()))))
--- 4040,4046 ----
(point))))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
nil)
! ;; In this case flag is neither set nor cleared.
;; Act as if set, i.e. do nothing.
()))))
***************
*** 4062,4068 ****
())
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
nil)
! ;; In this case flag is neither set nor cleared.
;; Act as if clear, i.e. do nothing.
()))))
--- 4062,4068 ----
())
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
nil)
! ;; In this case flag is neither set nor cleared.
;; Act as if clear, i.e. do nothing.
()))))
- [Emacs-diffs] Changes to emacs/lisp/textmodes/texinfmt.el,
Juanma Barranquero <=