/[emacs]/emacs/lisp/misc.el
ViewVC logotype

Diff of /emacs/lisp/misc.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by pj, Thu May 2 05:37:47 2002 UTC revision 1.9 by lektu, Fri May 30 23:15:40 2003 UTC
# Line 58  The characters copied are inserted in th Line 58  The characters copied are inserted in th
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

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26