Mercurial > hg > xemacs-beta
comparison lisp/packages/texnfo-upd.el @ 4:b82b59fe008d r19-15b3
Import from CVS: tag r19-15b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:56 +0200 |
parents | ac2d302a0011 |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
3:30df88044ec6 | 4:b82b59fe008d |
---|---|
1266 (if (= end beginning) | 1266 (if (= end beginning) |
1267 (error "Please mark a region!")) | 1267 (error "Please mark a region!")) |
1268 (save-restriction | 1268 (save-restriction |
1269 (narrow-to-region beginning end) | 1269 (narrow-to-region beginning end) |
1270 (goto-char beginning) | 1270 (goto-char beginning) |
1271 (push-mark (point) t) | 1271 (push-mark (point) t t) |
1272 (while (re-search-forward "^@node" (point-max) t) | 1272 (while (re-search-forward "^@node" (point-max) t) |
1273 (beginning-of-line) | 1273 (beginning-of-line) |
1274 (texinfo-update-the-node)) | 1274 (texinfo-update-the-node)) |
1275 (message "Done...updated nodes in region. You may save the buffer."))))) | 1275 (message "Done...updated nodes in region. You may save the buffer."))))) |
1276 | 1276 |
1277 ;;;###autoload | 1277 ;;;###autoload |
1278 (defun texinfo-every-node-update () | 1278 (defun texinfo-every-node-update () |
1279 "Update every node in a Texinfo file." | 1279 "Update every node in a Texinfo file." |
1280 (interactive) | 1280 (interactive) |
1281 (save-excursion | 1281 (save-excursion |
1282 (push-mark (point-max) t) | 1282 (let ((zmacs-regions nil)) |
1283 (goto-char (point-min)) | 1283 (push-mark (point-max) t t) |
1284 ;; Using the mark to pass bounds this way | 1284 (goto-char (point-min)) |
1285 ;; is kludgy, but it's not worth fixing. -- rms. | 1285 ;; Using the mark to pass bounds this way |
1286 (let ((mark-active t)) | 1286 ;; is kludgy, but it's not worth fixing. -- rms. |
1287 (texinfo-update-node t)) | 1287 (let ((mark-active t)) |
1288 (message "Done...updated every node. You may save the buffer."))) | 1288 (texinfo-update-node t)) |
1289 (message "Done...updated every node. You may save the buffer.")))) | |
1289 | 1290 |
1290 (defun texinfo-update-the-node () | 1291 (defun texinfo-update-the-node () |
1291 "Update one node. Point must be at the beginning of node line. | 1292 "Update one node. Point must be at the beginning of node line. |
1292 Leave point at the end of the node line." | 1293 Leave point at the end of the node line." |
1293 (texinfo-check-for-node-name) | 1294 (texinfo-check-for-node-name) |