aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2008-02-07 00:42:58 +0000
committerRichard M. Stallman2008-02-07 00:42:58 +0000
commit431b78c9f4d691639585171ea2a11df19fdcc918 (patch)
tree49e05e3e1934bb717e5d8efee3012fbacbf2cb9b
parent27c335693403393b7c38be96e85bf6629972ed2b (diff)
downloademacs-431b78c9f4d691639585171ea2a11df19fdcc918.tar.gz
emacs-431b78c9f4d691639585171ea2a11df19fdcc918.zip
(Window Start): Mention the feature of moving
window-start to start of line.
-rw-r--r--lispref/ChangeLog5
-rw-r--r--lispref/windows.texi25
2 files changed, 23 insertions, 7 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 7febc50fdef..d6a7c43f102 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,8 @@
12008-02-07 Richard Stallman <rms@gnu.org>
2
3 * windows.texi (Window Start): Mention the feature of moving
4 window-start to start of line.
5
12008-01-19 Martin Rudalics <rudalics@gmx.at> 62008-01-19 Martin Rudalics <rudalics@gmx.at>
2 7
3 * buffers.texi (Buffer Modification): Fix typo. 8 * buffers.texi (Buffer Modification): Fix typo.
diff --git a/lispref/windows.texi b/lispref/windows.texi
index 6f6431cf45d..96f4d5af69d 100644
--- a/lispref/windows.texi
+++ b/lispref/windows.texi
@@ -1229,6 +1229,15 @@ is called the @dfn{display-start} position of the window (or just the
1229at the upper left corner of the window. It is usually, but not 1229at the upper left corner of the window. It is usually, but not
1230inevitably, at the beginning of a text line. 1230inevitably, at the beginning of a text line.
1231 1231
1232 After switching windows or buffers, and in some other cases, if the
1233window start is in the middle of a line, Emacs adjusts the window
1234start to the start of a line. This prevents certain operations from
1235leaving the window start at a meaningless point within a line. This
1236feature may interfere with testing some Lisp code by executing it
1237using the commands of Lisp mode, because they trigger this
1238readjustment. To test such code, put it into a command and bind the
1239command to a key.
1240
1232@defun window-start &optional window 1241@defun window-start &optional window
1233@cindex window top line 1242@cindex window top line
1234This function returns the display-start position of window 1243This function returns the display-start position of window
@@ -1296,10 +1305,10 @@ However, if you specify the start position with this function using
1296screen. If this does place point off screen, the display routines move 1305screen. If this does place point off screen, the display routines move
1297point to the left margin on the middle line in the window. 1306point to the left margin on the middle line in the window.
1298 1307
1299For example, if point @w{is 1} and you set the start of the window @w{to 1308For example, if point @w{is 1} and you set the start of the window
13002}, then point would be ``above'' the top of the window. The display 1309@w{to 37}, the start of the next line, point will be ``above'' the top
1301routines will automatically move point if it is still 1 when redisplay 1310of the window. The display routines will automatically move point if
1302occurs. Here is an example: 1311it is still 1 when redisplay occurs. Here is an example:
1303 1312
1304@example 1313@example
1305@group 1314@group
@@ -1321,15 +1330,17 @@ occurs. Here is an example:
1321@group 1330@group
1322(set-window-start 1331(set-window-start
1323 (selected-window) 1332 (selected-window)
1324 (1+ (window-start))) 1333 (save-excursion
1325@result{} 2 1334 (goto-char 1)
1335 (forward-line 1)
1336 (point)))
1337@result{} 37
1326@end group 1338@end group
1327 1339
1328@group 1340@group
1329;; @r{Here is what @samp{foo} looks like after executing} 1341;; @r{Here is what @samp{foo} looks like after executing}
1330;; @r{the @code{set-window-start} expression.} 1342;; @r{the @code{set-window-start} expression.}
1331---------- Buffer: foo ---------- 1343---------- Buffer: foo ----------
1332his is the contents of buffer foo.
13332 13442
13343 13453
1335@point{}4 1346@point{}4