Mercurial > hg > xemacs-beta
comparison lisp/mule/mule-help.el @ 209:41ff10fd062f r20-4b3
Import from CVS: tag r20-4b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:04:58 +0200 |
parents | e45d5e7c476e |
children |
comparison
equal
deleted
inserted
replaced
208:f427b8ec4379 | 209:41ff10fd062f |
---|---|
53 (setq buffer-file-name file) | 53 (setq buffer-file-name file) |
54 (setq default-directory (expand-file-name "~/")) | 54 (setq default-directory (expand-file-name "~/")) |
55 (setq buffer-auto-save-file-name nil) | 55 (setq buffer-auto-save-file-name nil) |
56 (insert-file-contents (expand-file-name filename data-directory)) | 56 (insert-file-contents (expand-file-name filename data-directory)) |
57 (goto-char (point-min)) | 57 (goto-char (point-min)) |
58 (search-forward "\n<<") | 58 ;; The 'didactic' blank lines: Possibly insert blank lines |
59 (beginning-of-line) | 59 ;; around <<nya nya nya>>, and change << >> to [ ]. |
60 (delete-region (point) (progn (end-of-line) (point))) | 60 (if (re-search-forward "^<<.+>>") |
61 (let ((n (- (window-height (selected-window)) | 61 (let ((n (- (window-height (selected-window)) |
62 (count-lines (point-min) (point)) | 62 (count-lines (point-min) (point-at-bol)) |
63 6))) | 63 6))) |
64 (if (< n 12) | 64 (if (< n 12) |
65 (newline n) | 65 (progn (beginning-of-line) (kill-line)) |
66 ;; Some people get confused by the large gap. | 66 ;; Some people get confused by the large gap |
67 (newline (/ n 2)) | 67 (delete-backward-char 2) |
68 (insert "[Middle of page left blank for didactic purposes. " | 68 (insert "]") |
69 "Text continues below]") | 69 (beginning-of-line) |
70 (newline (- n (/ n 2))))) | 70 (save-excursion |
71 (delete-char 2) | |
72 (insert "[")) | |
73 (newline (/ n 2)) | |
74 (next-line 1) | |
75 (newline (- n (/ n 2)))))) | |
71 (goto-char (point-min)) | 76 (goto-char (point-min)) |
72 (set-buffer-modified-p nil)))) | 77 (set-buffer-modified-p nil)))) |
73 | 78 |
74 | 79 |
75 (provide 'mule-help) | 80 (provide 'mule-help) |