[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: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/texinfmt.el |
Date: |
Fri, 04 Apr 2003 01:23:10 -0500 |
Index: emacs/lisp/textmodes/texinfmt.el
diff -c emacs/lisp/textmodes/texinfmt.el:1.67
emacs/lisp/textmodes/texinfmt.el:1.68
*** emacs/lisp/textmodes/texinfmt.el:1.67 Tue Feb 4 08:30:45 2003
--- emacs/lisp/textmodes/texinfmt.el Mon Feb 10 19:37:28 2003
***************
*** 244,255 ****
(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)
! (delete-region
! (point) (save-excursion (forward-line 1) (point)))))))))
;; Raise or lower level of each section, if necessary.
(goto-char (point-min))
--- 244,252 ----
(goto-char (point-min))
;; Remove address@hidden' line from included file, if any,
;; so @setfilename command not duplicated.
! (if (re-search-forward "address@hidden" (line-end-position 100) t)
! (delete-region (line-beginning-position 1)
! (line-beginning-position 2)))))))
;; Raise or lower level of each section, if necessary.
(goto-char (point-min))
***************
*** 271,277 ****
(goto-char (point-min))
(if (looking-at "\\\\input[ \t]+texinfo")
! (delete-region (point) (save-excursion (forward-line 1) (point))))
;; Insert Info region title text.
(goto-char (point-min))
--- 268,274 ----
(goto-char (point-min))
(if (looking-at "\\\\input[ \t]+texinfo")
! (delete-region (point) (line-beginning-position 2)))
;; Insert Info region title text.
(goto-char (point-min))
***************
*** 395,401 ****
(let ((filename (concat input-directory
(texinfo-parse-line-arg))))
(re-search-backward "address@hidden")
! (delete-region (point) (save-excursion (forward-line 1) (point)))
(message "Reading included file: %s" filename)
(save-excursion
(save-restriction
--- 392,398 ----
(let ((filename (concat input-directory
(texinfo-parse-line-arg))))
(re-search-backward "address@hidden")
! (delete-region (point) (line-beginning-position 2))
(message "Reading included file: %s" filename)
(save-excursion
(save-restriction
***************
*** 405,417 ****
(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)
! (delete-region
! (point) (save-excursion (forward-line 1) (point)))))))))
;; Raise or lower level of each section, if necessary.
(goto-char (point-min))
(texinfo-raise-lower-sections)
--- 402,410 ----
(goto-char (point-min))
;; Remove address@hidden' line from included file, if any,
;; so @setfilename command not duplicated.
! (if (re-search-forward "address@hidden" (line-end-position 100) t)
! (delete-region (line-beginning-position 1)
! (line-beginning-position 2)))))))
;; Raise or lower level of each section, if necessary.
(goto-char (point-min))
(texinfo-raise-lower-sections)
***************
*** 469,476 ****
;; Convert three hyphens in a row to two.
(goto-char min)
(while (re-search-forward "\\( \\|\\w\\)\\(---\\)\\( \\|\\w\\)" max t)
! (delete-region (1+ (match-beginning 2)) (+ 2 (match-beginning
! 2)))))
;;; Handle paragraph filling
--- 462,468 ----
;; Convert three hyphens in a row to two.
(goto-char min)
(while (re-search-forward "\\( \\|\\w\\)\\(---\\)\\( \\|\\w\\)" max t)
! (delete-region (1+ (match-beginning 2)) (+ 2 (match-beginning 2)))))
;;; Handle paragraph filling
***************
*** 612,632 ****
(forward-line 1))
;; 2. Skip over @example and similar no-refill environments.
(if (looking-at texinfo-no-refill-regexp)
! (let ((environment
! (buffer-substring-no-properties (match-beginning 1)
(match-end 1))))
(progn (re-search-forward (concat "address@hidden " environment)
nil t)
(forward-line 1)))
;; Else
;; 3. Do not refill a paragraph containing @w or @*, or ending
;; 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
--- 604,620 ----
(forward-line 1))
;; 2. Skip over @example and similar no-refill environments.
(if (looking-at texinfo-no-refill-regexp)
! (let ((environment (match-string-no-properties 1)))
(progn (re-search-forward (concat "address@hidden " environment)
nil t)
(forward-line 1)))
;; Else
;; 3. Do not refill a paragraph containing @w or @*, or ending
;; 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
***************
*** 2234,2253 ****
(put 'iftex 'texinfo-format 'texinfo-format-iftex)
(defun texinfo-format-iftex ()
(delete-region texinfo-command-start
! (progn (re-search-forward "@end iftex[ \t]*\n")
! (point))))
(put 'ifhtml 'texinfo-format 'texinfo-format-ifhtml)
(defun texinfo-format-ifhtml ()
(delete-region texinfo-command-start
! (progn (re-search-forward "@end ifhtml[ \t]*\n")
! (point))))
(put 'ifplaintext 'texinfo-format 'texinfo-format-ifplaintext)
(defun texinfo-format-ifplaintext ()
(delete-region texinfo-command-start
! (progn (re-search-forward "@end ifplaintext[ \t]*\n")
! (point))))
(put 'ifxml 'texinfo-format 'texinfo-format-ifxml)
(defun texinfo-format-ifxml ()
--- 2222,2238 ----
(put 'iftex 'texinfo-format 'texinfo-format-iftex)
(defun texinfo-format-iftex ()
(delete-region texinfo-command-start
! (re-search-forward "@end iftex[ \t]*\n")))
(put 'ifhtml 'texinfo-format 'texinfo-format-ifhtml)
(defun texinfo-format-ifhtml ()
(delete-region texinfo-command-start
! (re-search-forward "@end ifhtml[ \t]*\n")))
(put 'ifplaintext 'texinfo-format 'texinfo-format-ifplaintext)
(defun texinfo-format-ifplaintext ()
(delete-region texinfo-command-start
! (re-search-forward "@end ifplaintext[ \t]*\n")))
(put 'ifxml 'texinfo-format 'texinfo-format-ifxml)
(defun texinfo-format-ifxml ()
***************
*** 2258,2271 ****
(put 'tex 'texinfo-format 'texinfo-format-tex)
(defun texinfo-format-tex ()
(delete-region texinfo-command-start
! (progn (re-search-forward "@end tex[ \t]*\n")
! (point))))
(put 'html 'texinfo-format 'texinfo-format-html)
(defun texinfo-format-html ()
(delete-region texinfo-command-start
! (progn (re-search-forward "@end html[ \t]*\n")
! (point))))
(put 'xml 'texinfo-format 'texinfo-format-xml)
(defun texinfo-format-xml ()
--- 2243,2254 ----
(put 'tex 'texinfo-format 'texinfo-format-tex)
(defun texinfo-format-tex ()
(delete-region texinfo-command-start
! (re-search-forward "@end tex[ \t]*\n")))
(put 'html 'texinfo-format 'texinfo-format-html)
(defun texinfo-format-html ()
(delete-region texinfo-command-start
! (re-search-forward "@end html[ \t]*\n")))
(put 'xml 'texinfo-format 'texinfo-format-xml)
(defun texinfo-format-xml ()
***************
*** 2276,2283 ****
(put 'ifnotinfo 'texinfo-format 'texinfo-format-ifnotinfo)
(defun texinfo-format-ifnotinfo ()
(delete-region texinfo-command-start
! (progn (re-search-forward "@end ifnotinfo[ \t]*\n")
! (point))))
(put 'ifnotplaintext 'texinfo-format 'texinfo-discard-line)
(put 'ifnotplaintext 'texinfo-end 'texinfo-discard-command)
--- 2259,2265 ----
(put 'ifnotinfo 'texinfo-format 'texinfo-format-ifnotinfo)
(defun texinfo-format-ifnotinfo ()
(delete-region texinfo-command-start
! (re-search-forward "@end ifnotinfo[ \t]*\n")))
(put 'ifnotplaintext 'texinfo-format 'texinfo-discard-line)
(put 'ifnotplaintext 'texinfo-end 'texinfo-discard-command)
***************
*** 2297,2304 ****
(put 'titlepage 'texinfo-format 'texinfo-format-titlepage)
(defun texinfo-format-titlepage ()
(delete-region texinfo-command-start
! (progn (re-search-forward "@end titlepage[ \t]*\n")
! (point))))
(put 'endtitlepage 'texinfo-format 'texinfo-discard-line)
--- 2279,2285 ----
(put 'titlepage 'texinfo-format 'texinfo-format-titlepage)
(defun texinfo-format-titlepage ()
(delete-region texinfo-command-start
! (re-search-forward "@end titlepage[ \t]*\n")))
(put 'endtitlepage 'texinfo-format 'texinfo-discard-line)
***************
*** 2307,2314 ****
(put 'titlespec 'texinfo-format 'texinfo-format-titlespec)
(defun texinfo-format-titlespec ()
(delete-region texinfo-command-start
! (progn (re-search-forward "@end titlespec[ \t]*\n")
! (point))))
(put 'endtitlespec 'texinfo-format 'texinfo-discard-line)
--- 2288,2294 ----
(put 'titlespec 'texinfo-format 'texinfo-format-titlespec)
(defun texinfo-format-titlespec ()
(delete-region texinfo-command-start
! (re-search-forward "@end titlespec[ \t]*\n")))
(put 'endtitlespec 'texinfo-format 'texinfo-discard-line)
***************
*** 2343,2350 ****
(put 'ignore 'texinfo-format 'texinfo-format-ignore)
(defun texinfo-format-ignore ()
(delete-region texinfo-command-start
! (progn (re-search-forward "@end ignore[ \t]*\n")
! (point))))
(put 'endignore 'texinfo-format 'texinfo-discard-line)
--- 2323,2329 ----
(put 'ignore 'texinfo-format 'texinfo-format-ignore)
(defun texinfo-format-ignore ()
(delete-region texinfo-command-start
! (re-search-forward "@end ignore[ \t]*\n")))
(put 'endignore 'texinfo-format 'texinfo-discard-line)
***************
*** 2439,2446 ****
(setq texinfo-alias-list
(cons
(cons
! (buffer-substring-no-properties (match-beginning 1) (match-end 1))
! (buffer-substring-no-properties (match-beginning 2) (match-end
2)))
texinfo-alias-list))
(texinfo-discard-command))
)
--- 2418,2425 ----
(setq texinfo-alias-list
(cons
(cons
! (match-string-no-properties 1)
! (match-string-no-properties 2))
texinfo-alias-list))
(texinfo-discard-command))
)
***************
*** 3007,3019 ****
;; Subroutine for sorting an index.
;; At start of a line, return a string to sort the line under.
(defun texinfo-sort-startkeyfun ()
! (let ((line
! (buffer-substring-no-properties (point) (save-excursion
(end-of-line) (point)))))
;; Canonicalize whitespace and eliminate funny chars.
(while (string-match "[ \t][ \t]+\\|[^a-z0-9 ]+" line)
(setq line (concat (substring line 0 (match-beginning 0))
" "
! (substring line (match-end 0) (length line)))))
line))
--- 2986,2997 ----
;; Subroutine for sorting an index.
;; At start of a line, return a string to sort the line under.
(defun texinfo-sort-startkeyfun ()
! (let ((line (buffer-substring-no-properties (point) (line-end-position))))
;; Canonicalize whitespace and eliminate funny chars.
(while (string-match "[ \t][ \t]+\\|[^a-z0-9 ]+" line)
(setq line (concat (substring line 0 (match-beginning 0))
" "
! (substring line (match-end 0)))))
line))
***************
*** 4036,4043 ****
'flag-cleared)
;; Clear region (i.e., cause the text to be ignored).
(delete-region texinfo-command-start
! (progn (re-search-forward "@end ifset[ \t]*\n")
! (point))))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
nil)
;; In this case flag is neither set nor cleared.
--- 4014,4020 ----
'flag-cleared)
;; Clear region (i.e., cause the text to be ignored).
(delete-region texinfo-command-start
! (re-search-forward "@end ifset[ \t]*\n")))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
nil)
;; In this case flag is neither set nor cleared.
***************
*** 4054,4061 ****
'flag-set)
;; Clear region (i.e., cause the text to be ignored).
(delete-region texinfo-command-start
! (progn (re-search-forward "@end ifclear[ \t]*\n")
! (point))))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
'flag-cleared)
;; Format the text (i.e., do not remove it); do nothing here.
--- 4031,4037 ----
'flag-set)
;; Clear region (i.e., cause the text to be ignored).
(delete-region texinfo-command-start
! (re-search-forward "@end ifclear[ \t]*\n")))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
'flag-cleared)
;; Format the text (i.e., do not remove it); do nothing here.
***************
*** 4341,4348 ****
(message ">> Error: %s" (prin1-to-string err))
(message ">> point at")
(let ((s (buffer-substring-no-properties (point)
! (min (+ (point) 100)
! (point-max))))
(tem 0))
(while (setq tem (string-match "\n+" s tem))
(setq s (concat (substring s 0 (match-beginning 0))
--- 4317,4324 ----
(message ">> Error: %s" (prin1-to-string err))
(message ">> point at")
(let ((s (buffer-substring-no-properties (point)
! (min (+ (point) 100)
! (point-max))))
(tem 0))
(while (setq tem (string-match "\n+" s tem))
(setq s (concat (substring s 0 (match-beginning 0))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/textmodes/texinfmt.el,
Miles Bader <=