aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2004-04-08 03:12:16 +0000
committerJuri Linkov2004-04-08 03:12:16 +0000
commit0c1b7af5c5a4b0b2e7f3fd8a52dcc39b27d41a58 (patch)
tree74e43abcc5ccffaeae733a09a14a18413e5fd9e1
parent0aa8368b2edb925121ba7013fad02783d50735e2 (diff)
downloademacs-0c1b7af5c5a4b0b2e7f3fd8a52dcc39b27d41a58.tar.gz
emacs-0c1b7af5c5a4b0b2e7f3fd8a52dcc39b27d41a58.zip
(Info-hide-cookies-node): New function.
(Info-select-node): Use it. (Info-display-images-node): Remove message with image file name.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/info.el19
2 files changed, 25 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 18256b09a78..f422415461b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12004-04-07 Jan Nieuwenhuizen <janneke@gnu.org>
2
3 * info.el (Info-hide-cookies-node): New function.
4 (Info-select-node): Use it.
5 (Info-display-images-node): Remove message with image file name.
6
12004-04-07 Daniel Pfeiffer <occitan@esperanto.org> 72004-04-07 Daniel Pfeiffer <occitan@esperanto.org>
2 8
3 * progmodes/compile.el (compilation-warning-face) 9 * progmodes/compile.el (compilation-warning-face)
@@ -186,7 +192,7 @@
186 192
1872004-03-31 H,Ae(Bkan Granath <hakan.granath@kau.se> (tiny change) 1932004-03-31 H,Ae(Bkan Granath <hakan.granath@kau.se> (tiny change)
188 194
189 * dired.el (dired-move-to-filename-regexp): Add . to HH:MM. 195 * dired.el (dired-move-to-filename-regexp): Add `.' to HH:MM.
190 196
1912004-03-30 Vinicius Jose Latorre <viniciusjl@ig.com.br> 1972004-03-30 Vinicius Jose Latorre <viniciusjl@ig.com.br>
192 198
diff --git a/lisp/info.el b/lisp/info.el
index b42e61003f8..a72ded5bc3d 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1146,12 +1146,28 @@ any double quotes or backslashes must be escaped (\\\",\\\\)."
1146 (image (if (file-exists-p image-file) 1146 (image (if (file-exists-p image-file)
1147 (create-image image-file) 1147 (create-image image-file)
1148 "[broken image]"))) 1148 "[broken image]")))
1149 (message "Found image: %S" image-file)
1150 (if (not (get-text-property start 'display)) 1149 (if (not (get-text-property start 'display))
1151 (add-text-properties 1150 (add-text-properties
1152 start (point) `(display ,image rear-nonsticky (display))))))) 1151 start (point) `(display ,image rear-nonsticky (display)))))))
1153 (set-buffer-modified-p nil))) 1152 (set-buffer-modified-p nil)))
1154 1153
1154;; Texinfo 4.7 adds cookies of the form ^@^H[NAME CONTENTS ^@^H].
1155;; Hide any construct of the general form ^@[^@-^_][ ... ^@[^@-^_]],
1156;; including one optional trailing newline.
1157(defun Info-hide-cookies-node ()
1158 "Hide unrecognised cookies in current node."
1159 (save-excursion
1160 (let ((inhibit-read-only t)
1161 (case-fold-search t))
1162 (goto-char (point-min))
1163 (while (re-search-forward
1164 "\\(\0[\0-\37][[][^\0]*\0[\0-\37][]]\n?\\)"
1165 nil t)
1166 (let* ((start (match-beginning 1)))
1167 (if (not (get-text-property start 'invisible))
1168 (put-text-property start (point) 'invisible t)))))
1169 (set-buffer-modified-p nil)))
1170
1155(defun Info-select-node () 1171(defun Info-select-node ()
1156 "Select the info node that point is in." 1172 "Select the info node that point is in."
1157 ;; Bind this in case the user sets it to nil. 1173 ;; Bind this in case the user sets it to nil.
@@ -1188,6 +1204,7 @@ any double quotes or backslashes must be escaped (\\\",\\\\)."
1188 (if Info-enable-active-nodes (eval active-expression)) 1204 (if Info-enable-active-nodes (eval active-expression))
1189 (Info-fontify-node) 1205 (Info-fontify-node)
1190 (Info-display-images-node) 1206 (Info-display-images-node)
1207 (Info-hide-cookies-node)
1191 (run-hooks 'Info-selection-hook))))) 1208 (run-hooks 'Info-selection-hook)))))
1192 1209
1193(defun Info-set-mode-line () 1210(defun Info-set-mode-line ()