Mercurial > emacs
comparison lisp/play/studly.el @ 41664:4e9db3befa86
(studlify-word, studlify-region, studlify-buffer): Fix doc-string.
(studlify-buffer): Add autoload cookie.
author | Pavel Janík <Pavel@Janik.cz> |
---|---|
date | Thu, 29 Nov 2001 08:18:25 +0000 |
parents | 01c7199c0ee7 |
children | 695cf19ef79e |
comparison
equal
deleted
inserted
replaced
41663:1cc9127ddf72 | 41664:4e9db3befa86 |
---|---|
16 | 16 |
17 ;;; Code: | 17 ;;; Code: |
18 | 18 |
19 ;;;###autoload | 19 ;;;###autoload |
20 (defun studlify-region (begin end) | 20 (defun studlify-region (begin end) |
21 "Studlify-case the region" | 21 "Studlify-case the region." |
22 (interactive "*r") | 22 (interactive "*r") |
23 (save-excursion | 23 (save-excursion |
24 (goto-char begin) | 24 (goto-char begin) |
25 (setq begin (point)) | 25 (setq begin (point)) |
26 (while (and (<= (point) end) | 26 (while (and (<= (point) end) |
50 (forward-char 1)) | 50 (forward-char 1)) |
51 (setq begin (point)))))) | 51 (setq begin (point)))))) |
52 | 52 |
53 ;;;###autoload | 53 ;;;###autoload |
54 (defun studlify-word (count) | 54 (defun studlify-word (count) |
55 "Studlify-case the current word, or COUNT words if given an argument" | 55 "Studlify-case the current word, or COUNT words if given an argument." |
56 (interactive "*p") | 56 (interactive "*p") |
57 (let ((begin (point)) end rb re) | 57 (let ((begin (point)) end rb re) |
58 (forward-word count) | 58 (forward-word count) |
59 (setq end (point)) | 59 (setq end (point)) |
60 (setq rb (min begin end) re (max begin end)) | 60 (setq rb (min begin end) re (max begin end)) |
61 (studlify-region rb re))) | 61 (studlify-region rb re))) |
62 | 62 |
63 ;;;###autoload | |
63 (defun studlify-buffer () | 64 (defun studlify-buffer () |
64 "Studlify-case the current buffer" | 65 "Studlify-case the current buffer." |
65 (interactive "*") | 66 (interactive "*") |
66 (studlify-region (point-min) (point-max))) | 67 (studlify-region (point-min) (point-max))) |
67 | 68 |
68 (provide 'studly) | 69 (provide 'studly) |
69 | 70 |