58 |
(+ n (point))))))) |
(+ n (point))))))) |
59 |
(insert string))) |
(insert string))) |
60 |
|
|
61 |
|
;; These were added with an eye to making possible a more CCA-compatible |
62 |
|
;; command set; but that turned out not to be interesting. |
63 |
|
|
64 |
|
(defun mark-beginning-of-buffer () |
65 |
|
"Set mark at the beginning of the buffer." |
66 |
|
(interactive) |
67 |
|
(push-mark (point-min))) |
68 |
|
|
69 |
|
(defun mark-end-of-buffer () |
70 |
|
"Set mark at the end of the buffer." |
71 |
|
(interactive) |
72 |
|
(push-mark (point-max))) |
73 |
|
|
74 |
|
(defun upcase-char (arg) |
75 |
|
"Uppercasify ARG chars starting from point. Point doesn't move" |
76 |
|
(interactive "p") |
77 |
|
(save-excursion |
78 |
|
(upcase-region (point) (progn (forward-char arg) (point))))) |
79 |
|
|
80 |
|
(defun forward-to-word (arg) |
81 |
|
"Move forward until encountering the beginning of a word. |
82 |
|
With argument, do this that many times." |
83 |
|
(interactive "p") |
84 |
|
(or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg) |
85 |
|
(goto-char (if (> arg 0) (point-max) (point-min))))) |
86 |
|
|
87 |
|
(defun backward-to-word (arg) |
88 |
|
"Move backward until encountering the end of a word. |
89 |
|
With argument, do this that many times." |
90 |
|
(interactive "p") |
91 |
|
(forward-to-word (- arg))) |
92 |
|
|
93 |
(provide 'misc) |
(provide 'misc) |
94 |
|
|
95 |
;;; misc.el ends here |
;;; misc.el ends here |