Mercurial > hg > xemacs-beta
comparison lisp/packages/makesum.el @ 155:43dd3413c7c7 r20-3b4
Import from CVS: tag r20-3b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:39:39 +0200 |
parents | ac2d302a0011 |
children |
comparison
equal
deleted
inserted
replaced
154:94141801dd7e | 155:43dd3413c7c7 |
---|---|
71 (delete-region (point) | 71 (delete-region (point) |
72 (progn | 72 (progn |
73 (forward-line -1) | 73 (forward-line -1) |
74 (point)))))) | 74 (point)))))) |
75 (goto-char (point-min)) | 75 (goto-char (point-min)) |
76 (insert "Emacs command summary, " (substring (current-time-string) 0 10) | 76 (insert |
77 (cond ((featurep 'xemacs) "XEmacs") | |
78 ((featurep 'infodock) "InfoDock") | |
79 (t "Emacs"))) | |
80 (insert " command summary, " (substring (current-time-string) 0 10) | |
77 ".\n") | 81 ".\n") |
78 ;; Delete "key binding" and underlining of dashes. | 82 ;; Delete "key binding" and underlining of dashes. |
79 (delete-region (point) (progn (forward-line 2) (point))) | 83 (delete-region (point) (progn (forward-line 2) (point))) |
80 (forward-line 1) ;Skip blank line | 84 (forward-line 1) ;Skip blank line |
81 (while (not (eobp)) | 85 (while (not (eobp)) |
87 (goto-char (point-min))))) | 91 (goto-char (point-min))))) |
88 (message "Making command summary...done")) | 92 (message "Making command summary...done")) |
89 | 93 |
90 (defun double-column (start end) | 94 (defun double-column (start end) |
91 (interactive "r") | 95 (interactive "r") |
92 (let (half cnt | 96 (let (half line lines nlines |
93 line lines nlines | |
94 (from-end (- (point-max) end))) | 97 (from-end (- (point-max) end))) |
95 (setq nlines (count-lines start end)) | 98 (setq nlines (count-lines start end)) |
96 (if (<= nlines 1) | 99 (if (<= nlines 1) |
97 nil | 100 nil |
98 (setq half (/ (1+ nlines) 2)) | 101 (setq half (/ (1+ nlines) 2)) |