diff options
| author | Robert J. Chassell | 2002-11-24 01:39:02 +0000 |
|---|---|---|
| committer | Robert J. Chassell | 2002-11-24 01:39:02 +0000 |
| commit | 289df0fc4c20396847a44ed44de6092a6e78a93e (patch) | |
| tree | 818c7a4bc088663d06369adaa05932b3bbc0054f | |
| parent | 9e06a9300911a3635da736688e4b5cdc4c5f131e (diff) | |
| download | emacs-289df0fc4c20396847a44ed44de6092a6e78a93e.tar.gz emacs-289df0fc4c20396847a44ed44de6092a6e78a93e.zip | |
(texinfo-format-separate-node): Handle node names with
properties and with regular expression symbols in them.
| -rw-r--r-- | lisp/textmodes/texinfmt.el | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index eab3405c8c3..705cf2f534d 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el | |||
| @@ -197,7 +197,7 @@ converted to Info is stored in a temporary buffer." | |||
| 197 | 197 | ||
| 198 | ;; Copy header | 198 | ;; Copy header |
| 199 | (setq header-text | 199 | (setq header-text |
| 200 | (buffer-substring | 200 | (buffer-substring-no-properties |
| 201 | (min header-beginning region-beginning) | 201 | (min header-beginning region-beginning) |
| 202 | header-end)))))) | 202 | header-end)))))) |
| 203 | 203 | ||
| @@ -603,7 +603,7 @@ Do not append @refill to paragraphs containing @w{TEXT} or @*." | |||
| 603 | ;; 2. Skip over @example and similar no-refill environments. | 603 | ;; 2. Skip over @example and similar no-refill environments. |
| 604 | (if (looking-at texinfo-no-refill-regexp) | 604 | (if (looking-at texinfo-no-refill-regexp) |
| 605 | (let ((environment | 605 | (let ((environment |
| 606 | (buffer-substring (match-beginning 1) (match-end 1)))) | 606 | (buffer-substring-no-properties (match-beginning 1) (match-end 1)))) |
| 607 | (progn (re-search-forward (concat "^@end " environment) nil t) | 607 | (progn (re-search-forward (concat "^@end " environment) nil t) |
| 608 | (forward-line 1))) | 608 | (forward-line 1))) |
| 609 | ;; Else | 609 | ;; Else |
| @@ -903,7 +903,7 @@ lower types.") | |||
| 903 | (setq texinfo-command-name | 903 | (setq texinfo-command-name |
| 904 | (let (trial | 904 | (let (trial |
| 905 | (cmdname | 905 | (cmdname |
| 906 | (buffer-substring | 906 | (buffer-substring-no-properties |
| 907 | (1+ texinfo-command-start) texinfo-command-end))) | 907 | (1+ texinfo-command-start) texinfo-command-end))) |
| 908 | (while (setq trial (assoc cmdname texinfo-alias-list)) | 908 | (while (setq trial (assoc cmdname texinfo-alias-list)) |
| 909 | (setq cmdname (cdr trial))) | 909 | (setq cmdname (cdr trial))) |
| @@ -965,7 +965,7 @@ Leave point after argument." | |||
| 965 | (forward-char -1)) | 965 | (forward-char -1)) |
| 966 | (t | 966 | (t |
| 967 | (error "Invalid texinfo command arg format"))) | 967 | (error "Invalid texinfo command arg format"))) |
| 968 | (prog1 (buffer-substring start (point)) | 968 | (prog1 (buffer-substring-no-properties start (point)) |
| 969 | (if (eolp) (forward-char 1))))) | 969 | (if (eolp) (forward-char 1))))) |
| 970 | 970 | ||
| 971 | (defun texinfo-parse-expanded-arg () | 971 | (defun texinfo-parse-expanded-arg () |
| @@ -988,7 +988,7 @@ Leave point after argument." | |||
| 988 | (texinfo-format-expand-region start (point)) | 988 | (texinfo-format-expand-region start (point)) |
| 989 | (setq texinfo-command-end (marker-position marker)) | 989 | (setq texinfo-command-end (marker-position marker)) |
| 990 | (move-marker marker nil) | 990 | (move-marker marker nil) |
| 991 | (prog1 (buffer-substring start (point)) | 991 | (prog1 (buffer-substring-no-properties start (point)) |
| 992 | (if (eolp) (forward-char 1))))) | 992 | (if (eolp) (forward-char 1))))) |
| 993 | 993 | ||
| 994 | (defun texinfo-format-expand-region (start end) | 994 | (defun texinfo-format-expand-region (start end) |
| @@ -1035,7 +1035,7 @@ Leave point after argument." | |||
| 1035 | (forward-char -1) | 1035 | (forward-char -1) |
| 1036 | (skip-chars-backward " ") | 1036 | (skip-chars-backward " ") |
| 1037 | (setq end (point)) | 1037 | (setq end (point)) |
| 1038 | (setq args (cons (if (> end beg) (buffer-substring beg end)) | 1038 | (setq args (cons (if (> end beg) (buffer-substring-no-properties beg end)) |
| 1039 | args)) | 1039 | args)) |
| 1040 | (goto-char next) | 1040 | (goto-char next) |
| 1041 | (skip-chars-forward " ")) | 1041 | (skip-chars-forward " ")) |
| @@ -1068,7 +1068,7 @@ Leave point after argument." | |||
| 1068 | (goto-char beg) | 1068 | (goto-char beg) |
| 1069 | (while (search-forward "\n" end t) | 1069 | (while (search-forward "\n" end t) |
| 1070 | (replace-match " ")))) | 1070 | (replace-match " ")))) |
| 1071 | (setq args (cons (if (> end beg) (buffer-substring beg end)) | 1071 | (setq args (cons (if (> end beg) (buffer-substring-no-properties beg end)) |
| 1072 | args)) | 1072 | args)) |
| 1073 | (goto-char next)) | 1073 | (goto-char next)) |
| 1074 | ;;(if (eolp) (forward-char 1)) | 1074 | ;;(if (eolp) (forward-char 1)) |
| @@ -1098,7 +1098,7 @@ Leave point after argument." | |||
| 1098 | (re-search-forward "[\n ]") | 1098 | (re-search-forward "[\n ]") |
| 1099 | (forward-char -1) | 1099 | (forward-char -1) |
| 1100 | (setq end (point)))) | 1100 | (setq end (point)))) |
| 1101 | (setq args (cons (buffer-substring beg end) args)) | 1101 | (setq args (cons (buffer-substring-no-properties beg end) args)) |
| 1102 | (skip-chars-forward " ")) | 1102 | (skip-chars-forward " ")) |
| 1103 | (forward-char 1) | 1103 | (forward-char 1) |
| 1104 | (nreverse args)))) | 1104 | (nreverse args)))) |
| @@ -1443,7 +1443,7 @@ The node is constructed automatically." | |||
| 1443 | (match-end 0))) | 1443 | (match-end 0))) |
| 1444 | (node-name | 1444 | (node-name |
| 1445 | (save-excursion | 1445 | (save-excursion |
| 1446 | (buffer-substring | 1446 | (buffer-substring-no-properties |
| 1447 | (progn (goto-char node-name-beginning) ; skip over node command | 1447 | (progn (goto-char node-name-beginning) ; skip over node command |
| 1448 | (skip-chars-forward " \t") ; and over spaces | 1448 | (skip-chars-forward " \t") ; and over spaces |
| 1449 | (point)) | 1449 | (point)) |
| @@ -1467,7 +1467,7 @@ The node is constructed automatically." | |||
| 1467 | ;; the text of the footnote. | 1467 | ;; the text of the footnote. |
| 1468 | 1468 | ||
| 1469 | (if (save-excursion | 1469 | (if (save-excursion |
| 1470 | (re-search-backward | 1470 | (search-backward |
| 1471 | (concat node-name "-Footnotes, Up: ") | 1471 | (concat node-name "-Footnotes, Up: ") |
| 1472 | node-name-beginning | 1472 | node-name-beginning |
| 1473 | t)) | 1473 | t)) |
| @@ -2016,7 +2016,7 @@ Cells within rows are separated by @tab." | |||
| 2016 | (skip-chars-backward " ") | 2016 | (skip-chars-backward " ") |
| 2017 | ;; remove whitespace at end of argument | 2017 | ;; remove whitespace at end of argument |
| 2018 | (delete-region (point) end) | 2018 | (delete-region (point) end) |
| 2019 | (buffer-substring start (point))))) | 2019 | (buffer-substring-no-properties start (point))))) |
| 2020 | (delete-region texinfo-command-start end) | 2020 | (delete-region texinfo-command-start end) |
| 2021 | row)) | 2021 | row)) |
| 2022 | 2022 | ||
| @@ -2328,8 +2328,8 @@ This command is executed when texinfmt sees @item inside @multitable." | |||
| 2328 | (setq texinfo-alias-list | 2328 | (setq texinfo-alias-list |
| 2329 | (cons | 2329 | (cons |
| 2330 | (cons | 2330 | (cons |
| 2331 | (buffer-substring (match-beginning 1) (match-end 1)) | 2331 | (buffer-substring-no-properties (match-beginning 1) (match-end 1)) |
| 2332 | (buffer-substring (match-beginning 2) (match-end 2))) | 2332 | (buffer-substring-no-properties (match-beginning 2) (match-end 2))) |
| 2333 | texinfo-alias-list)) | 2333 | texinfo-alias-list)) |
| 2334 | (texinfo-discard-command)) | 2334 | (texinfo-discard-command)) |
| 2335 | ) | 2335 | ) |
| @@ -2868,7 +2868,7 @@ Default is to leave paragraph indentation as is." | |||
| 2868 | ;; At start of a line, return a string to sort the line under. | 2868 | ;; At start of a line, return a string to sort the line under. |
| 2869 | (defun texinfo-sort-startkeyfun () | 2869 | (defun texinfo-sort-startkeyfun () |
| 2870 | (let ((line | 2870 | (let ((line |
| 2871 | (buffer-substring (point) (save-excursion (end-of-line) (point))))) | 2871 | (buffer-substring-no-properties (point) (save-excursion (end-of-line) (point))))) |
| 2872 | ;; Canonicalize whitespace and eliminate funny chars. | 2872 | ;; Canonicalize whitespace and eliminate funny chars. |
| 2873 | (while (string-match "[ \t][ \t]+\\|[^a-z0-9 ]+" line) | 2873 | (while (string-match "[ \t][ \t]+\\|[^a-z0-9 ]+" line) |
| 2874 | (setq line (concat (substring line 0 (match-beginning 0)) | 2874 | (setq line (concat (substring line 0 (match-beginning 0)) |
| @@ -3957,7 +3957,7 @@ the @ifeq command." | |||
| 3957 | (setq start (point)) | 3957 | (setq start (point)) |
| 3958 | (search-forward "," stop t) | 3958 | (search-forward "," stop t) |
| 3959 | (skip-chars-backward ", ") | 3959 | (skip-chars-backward ", ") |
| 3960 | (buffer-substring start (point)))) | 3960 | (buffer-substring-no-properties start (point)))) |
| 3961 | (arg2 | 3961 | (arg2 |
| 3962 | (progn | 3962 | (progn |
| 3963 | (search-forward "," stop t) | 3963 | (search-forward "," stop t) |
| @@ -3965,7 +3965,7 @@ the @ifeq command." | |||
| 3965 | (setq start (point)) | 3965 | (setq start (point)) |
| 3966 | (search-forward "," stop t) | 3966 | (search-forward "," stop t) |
| 3967 | (skip-chars-backward ", ") | 3967 | (skip-chars-backward ", ") |
| 3968 | (buffer-substring start (point)))) | 3968 | (buffer-substring-no-properties start (point)))) |
| 3969 | (texinfo-command | 3969 | (texinfo-command |
| 3970 | (progn | 3970 | (progn |
| 3971 | (search-forward "," stop t) | 3971 | (search-forward "," stop t) |
| @@ -3973,7 +3973,7 @@ the @ifeq command." | |||
| 3973 | (setq start (point)) | 3973 | (setq start (point)) |
| 3974 | (goto-char (1- stop)) | 3974 | (goto-char (1- stop)) |
| 3975 | (skip-chars-backward " ") | 3975 | (skip-chars-backward " ") |
| 3976 | (buffer-substring start (point))))) | 3976 | (buffer-substring-no-properties start (point))))) |
| 3977 | (delete-region texinfo-command-start stop) | 3977 | (delete-region texinfo-command-start stop) |
| 3978 | (if (equal arg1 arg2) | 3978 | (if (equal arg1 arg2) |
| 3979 | (insert texinfo-command)) | 3979 | (insert texinfo-command)) |
| @@ -4149,7 +4149,7 @@ the @ifeq command." | |||
| 4149 | 4149 | ||
| 4150 | (defun texinfo-unsupported () | 4150 | (defun texinfo-unsupported () |
| 4151 | (error "%s is not handled by texinfo" | 4151 | (error "%s is not handled by texinfo" |
| 4152 | (buffer-substring texinfo-command-start texinfo-command-end))) | 4152 | (buffer-substring-no-properties texinfo-command-start texinfo-command-end))) |
| 4153 | 4153 | ||
| 4154 | ;;; Batch formatting | 4154 | ;;; Batch formatting |
| 4155 | 4155 | ||
| @@ -4200,7 +4200,7 @@ For example, invoke | |||
| 4200 | (error | 4200 | (error |
| 4201 | (message ">> Error: %s" (prin1-to-string err)) | 4201 | (message ">> Error: %s" (prin1-to-string err)) |
| 4202 | (message ">> point at") | 4202 | (message ">> point at") |
| 4203 | (let ((s (buffer-substring (point) | 4203 | (let ((s (buffer-substring-no-properties (point) |
| 4204 | (min (+ (point) 100) | 4204 | (min (+ (point) 100) |
| 4205 | (point-max)))) | 4205 | (point-max)))) |
| 4206 | (tem 0)) | 4206 | (tem 0)) |