diff options
| author | Richard M. Stallman | 2008-02-07 00:42:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2008-02-07 00:42:58 +0000 |
| commit | 431b78c9f4d691639585171ea2a11df19fdcc918 (patch) | |
| tree | 49e05e3e1934bb717e5d8efee3012fbacbf2cb9b | |
| parent | 27c335693403393b7c38be96e85bf6629972ed2b (diff) | |
| download | emacs-431b78c9f4d691639585171ea2a11df19fdcc918.tar.gz emacs-431b78c9f4d691639585171ea2a11df19fdcc918.zip | |
(Window Start): Mention the feature of moving
window-start to start of line.
| -rw-r--r-- | lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | lispref/windows.texi | 25 |
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 @@ | |||
| 1 | 2008-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 | |||
| 1 | 2008-01-19 Martin Rudalics <rudalics@gmx.at> | 6 | 2008-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 | |||
| 1229 | at the upper left corner of the window. It is usually, but not | 1229 | at the upper left corner of the window. It is usually, but not |
| 1230 | inevitably, at the beginning of a text line. | 1230 | inevitably, at the beginning of a text line. |
| 1231 | 1231 | ||
| 1232 | After switching windows or buffers, and in some other cases, if the | ||
| 1233 | window start is in the middle of a line, Emacs adjusts the window | ||
| 1234 | start to the start of a line. This prevents certain operations from | ||
| 1235 | leaving the window start at a meaningless point within a line. This | ||
| 1236 | feature may interfere with testing some Lisp code by executing it | ||
| 1237 | using the commands of Lisp mode, because they trigger this | ||
| 1238 | readjustment. To test such code, put it into a command and bind the | ||
| 1239 | command 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 |
| 1234 | This function returns the display-start position of window | 1243 | This function returns the display-start position of window |
| @@ -1296,10 +1305,10 @@ However, if you specify the start position with this function using | |||
| 1296 | screen. If this does place point off screen, the display routines move | 1305 | screen. If this does place point off screen, the display routines move |
| 1297 | point to the left margin on the middle line in the window. | 1306 | point to the left margin on the middle line in the window. |
| 1298 | 1307 | ||
| 1299 | For example, if point @w{is 1} and you set the start of the window @w{to | 1308 | For example, if point @w{is 1} and you set the start of the window |
| 1300 | 2}, 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 |
| 1301 | routines will automatically move point if it is still 1 when redisplay | 1310 | of the window. The display routines will automatically move point if |
| 1302 | occurs. Here is an example: | 1311 | it 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 ---------- |
| 1332 | his is the contents of buffer foo. | ||
| 1333 | 2 | 1344 | 2 |
| 1334 | 3 | 1345 | 3 |
| 1335 | @point{}4 | 1346 | @point{}4 |