annotate lisp/unused.el @ 342:8bfd98a0dcdd

Initial revision
author Jim Blandy <jimb@redhat.com>
date Sun, 21 Jul 1991 11:19:26 +0000
parents 08ab8bcdd648
children fec3f9a1e3e5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 ;; Editing commands in GNU Emacs that turned out not to be used.
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 ;; They were added with an eye to making possible a more CCA-compatible
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3 ;; command set; but that turned out not to be interesting.
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5 (defun mark-beginning-of-buffer ()
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 "Set mark at the beginning of the buffer."
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 (interactive)
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 (push-mark (point-min)))
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10 (defun mark-end-of-buffer ()
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 "Set mark at the end of the buffer."
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 (interactive)
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 (push-mark (point-max)))
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15 (defun upcase-char (arg)
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 "Uppercasify ARG chars starting from point. Point doesn't move"
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 (interactive "p")
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 (save-excursion
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19 (upcase-region (point) (progn (forward-char arg) (point)))))
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 (defun forward-to-word (arg)
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 "Move forward until encountering the beginning of a word.
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 With argument, do this that many times."
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 (interactive "p")
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 (or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg)
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 (goto-char (if (> arg 0) (point-max) (point-min)))))
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 (defun backward-to-word (arg)
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 "Move backward until encountering the end of a word.
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 With argument, do this that many times."
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 (interactive "p")
08ab8bcdd648 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32 (forward-to-word (- arg)))