Fix move-beginning-of-line, move-end-of-line
Michael Sperber <[email protected]> Sat, 03 Jan 2015 16:28:41 +0100
| Newsgroups | gmane.emacs.xemacs.patches |
|---|---|
| Message-ID | <[email protected]> |
The above functions would signal exceptions when at bobp and eolp. 2015-01-03 Michael Sperber <[email protected]> * simple-more.el (move-beginning-of-line, move-end-of-line): Use `noerror' argument to `line-move', getting us the semantics of GNU Emacs at bobp and and eolp. Will commit Tuesday if nobody objects. -- Regards, Mike diff --git a/simple-more.el b/simple-more.el --- a/simple-more.el +++ b/simple-more.el @@ -40,7 +40,7 @@ ;; Move by lines, if ARG is not 1 (the default). (if (/= arg 1) - (line-move (1- arg))) + (line-move (1- arg) 'noerror)) ;; Move to beginning-of-line, ignoring fields and invisible text. (skip-chars-backward "^\n") @@ -78,7 +78,7 @@ (let ((newpos (save-excursion (let ((goal-column 0)) - (line-move arg) + (line-move arg 'noerror) (and ;; With bidi reordering, we may not be at bol, ;; so make sure we are. _______________________________________________ XEmacs-Patches mailing list [email protected] http://lists.xemacs.org/mailman/listinfo/xemacs-patches