* Patch to lisp/bs.el
@ 2004-11-19 16:13 CHENG Gao
2004-11-19 16:41 ` Andreas Schwab
2004-11-21 1:10 ` Richard Stallman
0 siblings, 2 replies; 5+ messages in thread
From: CHENG Gao @ 2004-11-19 16:13 UTC (permalink / raw)
Reading Coding Conventions, I found it's not desirable to use
next-line/previous-line. Searching Emacs files generate some files that
dont follow this.
Below is patch to lisp/bs.el with next-line/previous replaced with
forward-line.
--- bs.el.orig 2004-11-19 23:55:04.000000000 +0800
+++ bs.el 2004-11-19 23:56:08.000000000 +0800
@@ -1006,7 +1006,7 @@
"Move cursor vertically up one line.
If on top of buffer list go to last line."
(interactive "p")
- (previous-line 1)
+ (forward-line -1)
(if (<= (count-lines 1 (point)) (1- bs-header-lines-length))
(progn
(goto-char (point-max))
@@ -1027,7 +1027,7 @@
(let ((last (line-end-position)))
(if (eq last (point-max))
(goto-line (1+ bs-header-lines-length))
- (next-line 1))))
+ (forward-line 1))))
(defun bs-visits-non-file (buffer)
"Return t or nil whether BUFFER visits no file.
--
德不孤,必有邻
-- 《论语-里仁》
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch to lisp/bs.el
2004-11-19 16:13 Patch to lisp/bs.el CHENG Gao
@ 2004-11-19 16:41 ` Andreas Schwab
2004-11-19 17:11 ` CHENG Gao
2004-11-21 1:10 ` Richard Stallman
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2004-11-19 16:41 UTC (permalink / raw)
Cc: emacs-devel
CHENG Gao <chenggao@gmail.com> writes:
> Reading Coding Conventions, I found it's not desirable to use
> next-line/previous-line. Searching Emacs files generate some files that
> dont follow this.
>
> Below is patch to lisp/bs.el with next-line/previous replaced with
> forward-line.
I don't this this is correct, and previous-line/next-line are intented
here. Note that forward-line does _not_ move vertically in general, but
rather to the beginning of the addressed line.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch to lisp/bs.el
2004-11-19 16:13 Patch to lisp/bs.el CHENG Gao
2004-11-19 16:41 ` Andreas Schwab
@ 2004-11-21 1:10 ` Richard Stallman
1 sibling, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2004-11-21 1:10 UTC (permalink / raw)
Cc: emacs-devel
These particular functions are intended to move vertically up and down
(as the doc strings say), so using next-line and previous-line is correct.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-11-21 1:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-19 16:13 Patch to lisp/bs.el CHENG Gao
2004-11-19 16:41 ` Andreas Schwab
2004-11-19 17:11 ` CHENG Gao
2004-11-19 18:36 ` Thien-Thi Nguyen
2004-11-21 1:10 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.