diff options
| author | Kim F. Storm | 2003-07-04 21:40:22 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2003-07-04 21:40:22 +0000 |
| commit | bb1e1730ec66ea1398ebf3557be3c72b4dd59f77 (patch) | |
| tree | 12228dc4560a8e54e40472a709882fbbd78293a4 | |
| parent | 3d17017d15ff2ab69740b5f3c19637c8f5453980 (diff) | |
| download | emacs-bb1e1730ec66ea1398ebf3557be3c72b4dd59f77.tar.gz emacs-bb1e1730ec66ea1398ebf3557be3c72b4dd59f77.zip | |
Disable paragraph refilling.
(Info-refill-paragraphs): New defcustom.
(Info-fontify-node): Use it.
| -rw-r--r-- | lisp/info.el | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/lisp/info.el b/lisp/info.el index edb10c73ec2..424de35b585 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -162,6 +162,14 @@ If value is non-nil but not t, the reference section is still shown." | |||
| 162 | (other :tag "Replace only tag" tag)) | 162 | (other :tag "Replace only tag" tag)) |
| 163 | :group 'info) | 163 | :group 'info) |
| 164 | 164 | ||
| 165 | (defcustom Info-refill-paragraphs nil | ||
| 166 | "*If non-nil, attempt to refill paragraphs with hidden references. | ||
| 167 | This refilling may accidentally remove explicit line breaks in the info | ||
| 168 | file, so be prepared for a few surprises if you enable this feature." | ||
| 169 | :version "21.4" | ||
| 170 | :type 'boolean | ||
| 171 | :group 'info) | ||
| 172 | |||
| 165 | (defcustom Info-mode-hook | 173 | (defcustom Info-mode-hook |
| 166 | ;; Try to obey obsolete Info-fontify settings. | 174 | ;; Try to obey obsolete Info-fontify settings. |
| 167 | (unless (and (boundp 'Info-fontify) (null Info-fontify)) | 175 | (unless (and (boundp 'Info-fontify) (null Info-fontify)) |
| @@ -2905,27 +2913,30 @@ the variable `Info-file-list-for-emacs'." | |||
| 2905 | (save-excursion | 2913 | (save-excursion |
| 2906 | (goto-char (match-beginning 1)) | 2914 | (goto-char (match-beginning 1)) |
| 2907 | (insert other-tag))) | 2915 | (insert other-tag))) |
| 2908 | (when (or hide-tag (eq Info-hide-note-references t)) | 2916 | (when (and Info-refill-paragraphs |
| 2917 | (or hide-tag (eq Info-hide-note-references t))) | ||
| 2909 | (push (set-marker (make-marker) start) | 2918 | (push (set-marker (make-marker) start) |
| 2910 | paragraph-markers))))) | 2919 | paragraph-markers))))) |
| 2911 | 2920 | ||
| 2912 | (let ((fill-nobreak-invisible t) | 2921 | (when (and Info-refill-paragraphs |
| 2913 | (fill-individual-varying-indent nil) | 2922 | paragraph-markers) |
| 2914 | (paragraph-start "\f\\|[ \t]*[-*]\\|[ \t]*$") | 2923 | (let ((fill-nobreak-invisible t) |
| 2915 | (paragraph-separate ".*\\.[ \t]*\n[ \t]\\|[ \t]*[-*]\\|[ \t\f]*$") | 2924 | (fill-individual-varying-indent nil) |
| 2916 | (adaptive-fill-mode nil)) | 2925 | (paragraph-start "\f\\|[ \t]*[-*]\\|[ \t]*$") |
| 2917 | (goto-char (point-max)) | 2926 | (paragraph-separate ".*\\.[ \t]*\n[ \t]\\|[ \t]*[-*]\\|[ \t\f]*$") |
| 2918 | (while paragraph-markers | 2927 | (adaptive-fill-mode nil)) |
| 2919 | (let ((m (car paragraph-markers))) | 2928 | (goto-char (point-max)) |
| 2920 | (setq paragraph-markers (cdr paragraph-markers)) | 2929 | (while paragraph-markers |
| 2921 | (when (< m (point)) | 2930 | (let ((m (car paragraph-markers))) |
| 2922 | (goto-char m) | 2931 | (setq paragraph-markers (cdr paragraph-markers)) |
| 2923 | (beginning-of-line) | 2932 | (when (< m (point)) |
| 2924 | (let ((beg (point))) | 2933 | (goto-char m) |
| 2925 | (when (zerop (forward-paragraph)) | 2934 | (beginning-of-line) |
| 2926 | (fill-individual-paragraphs beg (point) nil nil) | 2935 | (let ((beg (point))) |
| 2927 | (goto-char beg)))) | 2936 | (when (zerop (forward-paragraph)) |
| 2928 | (set-marker m nil)))) | 2937 | (fill-individual-paragraphs beg (point) nil nil) |
| 2938 | (goto-char beg)))) | ||
| 2939 | (set-marker m nil))))) | ||
| 2929 | 2940 | ||
| 2930 | (goto-char (point-min)) | 2941 | (goto-char (point-min)) |
| 2931 | (when (and (search-forward "\n* Menu:" nil t) | 2942 | (when (and (search-forward "\n* Menu:" nil t) |