diff options
| author | Richard M. Stallman | 1996-08-24 16:10:28 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-08-24 16:10:28 +0000 |
| commit | 20c5a87d0b8a3fb8682a2d4ade4606daa030f66d (patch) | |
| tree | fe733ad4460681d4e72a637682182cb1e2ed1952 /lisp/emulation | |
| parent | d4866ec362eaed539e62b39ae4f6585dbc051e6d (diff) | |
| download | emacs-20c5a87d0b8a3fb8682a2d4ade4606daa030f66d.tar.gz emacs-20c5a87d0b8a3fb8682a2d4ade4606daa030f66d.zip | |
Replace \n in doc strings.
(pc-selection-mode): Big doc fix. Don't bind f1.
(forward-line-mark): New function.
(forward-line-nomark): New function.
(backward-line-mark): New function.
(backward-line-nomark): New function.
(pc-selection-mode): Add keybindings for those functions.
(pc-select-override-scroll-error): New variable.
Diffstat (limited to 'lisp/emulation')
| -rw-r--r-- | lisp/emulation/pc-select.el | 178 |
1 files changed, 145 insertions, 33 deletions
diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index b4bc0812bbc..77a50c5f3c1 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el | |||
| @@ -55,7 +55,8 @@ | |||
| 55 | ;; for additional motif keybindings. | 55 | ;; for additional motif keybindings. |
| 56 | ;; Thanks to jvromans@squirrel.nl (Johan Vromans) for a bug report | 56 | ;; Thanks to jvromans@squirrel.nl (Johan Vromans) for a bug report |
| 57 | ;; concerning setting of this-command. | 57 | ;; concerning setting of this-command. |
| 58 | ;; | 58 | ;; Dan Nicolaescu <done@nexus.sorostm.ro> suggested suppressing the |
| 59 | ;; scroll-up/scroll-down error. | ||
| 59 | ;; | 60 | ;; |
| 60 | ;; Ok, some details about the idea of pc-selection-mode: | 61 | ;; Ok, some details about the idea of pc-selection-mode: |
| 61 | ;; | 62 | ;; |
| @@ -71,8 +72,17 @@ | |||
| 71 | ;; They will be bound according to the "old" behaviour to S-delete (cut), | 72 | ;; They will be bound according to the "old" behaviour to S-delete (cut), |
| 72 | ;; S-insert (paste) and C-insert (copy). These keys do the same in many | 73 | ;; S-insert (paste) and C-insert (copy). These keys do the same in many |
| 73 | ;; other programs. | 74 | ;; other programs. |
| 75 | ;; | ||
| 74 | 76 | ||
| 75 | ;;; Code: | 77 | ;;;; Customization: |
| 78 | |||
| 79 | (defvar pc-select-override-scroll-error t | ||
| 80 | "*Non-nil means don't generate error on scrolling past edge of buffer. | ||
| 81 | This variable applies in PC Selection mode only. | ||
| 82 | The scroll commands normally generate an error if you try to scroll | ||
| 83 | past the top or bottom of the buffer. This is annoying when selecting | ||
| 84 | text with these commands. If you set this variable to non-nil, these | ||
| 85 | errors are suppressed.") | ||
| 76 | 86 | ||
| 77 | ;;;; | 87 | ;;;; |
| 78 | ;; misc | 88 | ;; misc |
| @@ -83,7 +93,8 @@ | |||
| 83 | (defun copy-region-as-kill-nomark (beg end) | 93 | (defun copy-region-as-kill-nomark (beg end) |
| 84 | "Save the region as if killed; but don't kill it; deactivate mark. | 94 | "Save the region as if killed; but don't kill it; deactivate mark. |
| 85 | If `interprogram-cut-function' is non-nil, also save the text for a window | 95 | If `interprogram-cut-function' is non-nil, also save the text for a window |
| 86 | system cut and paste.\n | 96 | system cut and paste. |
| 97 | |||
| 87 | Deactivating mark is to avoid confusion with delete-selection-mode | 98 | Deactivating mark is to avoid confusion with delete-selection-mode |
| 88 | and transient-mark-mode." | 99 | and transient-mark-mode." |
| 89 | (interactive "r") | 100 | (interactive "r") |
| @@ -119,9 +130,18 @@ and nil is returned." | |||
| 119 | (ensure-mark) | 130 | (ensure-mark) |
| 120 | (forward-word arg)) | 131 | (forward-word arg)) |
| 121 | 132 | ||
| 133 | (defun forward-line-mark (&optional arg) | ||
| 134 | "Ensure mark is active; move cursor vertically down ARG lines." | ||
| 135 | (interactive "p") | ||
| 136 | (ensure-mark) | ||
| 137 | (forward-line arg) | ||
| 138 | (setq this-command 'forward-line) | ||
| 139 | ) | ||
| 140 | |||
| 122 | (defun forward-paragraph-mark (&optional arg) | 141 | (defun forward-paragraph-mark (&optional arg) |
| 123 | "Ensure mark is active; move forward to end of paragraph. | 142 | "Ensure mark is active; move forward to end of paragraph. |
| 124 | With arg N, do it N times; negative arg -N means move backward N paragraphs.\n | 143 | With arg N, do it N times; negative arg -N means move backward N paragraphs. |
| 144 | |||
| 125 | A line which `paragraph-start' matches either separates paragraphs | 145 | A line which `paragraph-start' matches either separates paragraphs |
| 126 | \(if `paragraph-separate' matches it also) or is the first line of a paragraph. | 146 | \(if `paragraph-separate' matches it also) or is the first line of a paragraph. |
| 127 | A paragraph end is the beginning of a line which is not part of the paragraph | 147 | A paragraph end is the beginning of a line which is not part of the paragraph |
| @@ -129,7 +149,7 @@ to which the end of the previous line belongs, or the end of the buffer." | |||
| 129 | (interactive "p") | 149 | (interactive "p") |
| 130 | (ensure-mark) | 150 | (ensure-mark) |
| 131 | (forward-paragraph arg)) | 151 | (forward-paragraph arg)) |
| 132 | 152 | ||
| 133 | (defun next-line-mark (&optional arg) | 153 | (defun next-line-mark (&optional arg) |
| 134 | "Ensure mark is active; move cursor vertically down ARG lines. | 154 | "Ensure mark is active; move cursor vertically down ARG lines. |
| 135 | If there is no character in the target line exactly under the current column, | 155 | If there is no character in the target line exactly under the current column, |
| @@ -139,7 +159,8 @@ If there is no line in the buffer after this one, behavior depends on the | |||
| 139 | value of `next-line-add-newlines'. If non-nil, it inserts a newline character | 159 | value of `next-line-add-newlines'. If non-nil, it inserts a newline character |
| 140 | to create a line, and moves the cursor to that line. Otherwise it moves the | 160 | to create a line, and moves the cursor to that line. Otherwise it moves the |
| 141 | cursor to the end of the buffer \(if already at the end of the buffer, an error | 161 | cursor to the end of the buffer \(if already at the end of the buffer, an error |
| 142 | is signaled).\n | 162 | is signaled). |
| 163 | |||
| 143 | The command C-x C-n can be used to create | 164 | The command C-x C-n can be used to create |
| 144 | a semipermanent goal column to which this command always moves. | 165 | a semipermanent goal column to which this command always moves. |
| 145 | Then it does not try to move vertically. This goal column is stored | 166 | Then it does not try to move vertically. This goal column is stored |
| @@ -158,6 +179,16 @@ If scan reaches end of buffer, stop there without error." | |||
| 158 | (end-of-line arg) | 179 | (end-of-line arg) |
| 159 | (setq this-command 'end-of-line)) | 180 | (setq this-command 'end-of-line)) |
| 160 | 181 | ||
| 182 | (defun backward-line-mark (&optional arg) | ||
| 183 | "Ensure mark is active; move cursor vertically up ARG lines." | ||
| 184 | (interactive "p") | ||
| 185 | (ensure-mark) | ||
| 186 | (if (null arg) | ||
| 187 | (setq arg 1)) | ||
| 188 | (forward-line (- arg)) | ||
| 189 | (setq this-command 'forward-line) | ||
| 190 | ) | ||
| 191 | |||
| 161 | (defun scroll-down-mark (&optional arg) | 192 | (defun scroll-down-mark (&optional arg) |
| 162 | "Ensure mark is active; scroll down ARG lines; or near full screen if no ARG. | 193 | "Ensure mark is active; scroll down ARG lines; or near full screen if no ARG. |
| 163 | A near full screen is `next-screen-context-lines' less than a full screen. | 194 | A near full screen is `next-screen-context-lines' less than a full screen. |
| @@ -169,9 +200,11 @@ When calling from a program, supply a number as argument or nil." | |||
| 169 | 200 | ||
| 170 | (defun end-of-buffer-mark (&optional arg) | 201 | (defun end-of-buffer-mark (&optional arg) |
| 171 | "Ensure mark is active; move point to the end of the buffer. | 202 | "Ensure mark is active; move point to the end of the buffer. |
| 172 | With arg N, put point N/10 of the way from the end.\n | 203 | With arg N, put point N/10 of the way from the end. |
| 204 | |||
| 173 | If the buffer is narrowed, this command uses the beginning and size | 205 | If the buffer is narrowed, this command uses the beginning and size |
| 174 | of the accessible part of the buffer.\n | 206 | of the accessible part of the buffer. |
| 207 | |||
| 175 | Don't use this command in Lisp programs! | 208 | Don't use this command in Lisp programs! |
| 176 | \(goto-char \(point-max)) is faster and avoids clobbering the mark." | 209 | \(goto-char \(point-max)) is faster and avoids clobbering the mark." |
| 177 | (interactive "P") | 210 | (interactive "P") |
| @@ -219,9 +252,18 @@ and nil is returned." | |||
| 219 | (setq mark-active nil) | 252 | (setq mark-active nil) |
| 220 | (forward-word arg)) | 253 | (forward-word arg)) |
| 221 | 254 | ||
| 255 | (defun forward-line-nomark (&optional arg) | ||
| 256 | "Deactivate mark; move cursor vertically down ARG lines." | ||
| 257 | (interactive "p") | ||
| 258 | (setq mark-active nil) | ||
| 259 | (forward-line arg) | ||
| 260 | (setq this-command 'forward-line) | ||
| 261 | ) | ||
| 262 | |||
| 222 | (defun forward-paragraph-nomark (&optional arg) | 263 | (defun forward-paragraph-nomark (&optional arg) |
| 223 | "Deactivate mark; move forward to end of paragraph. | 264 | "Deactivate mark; move forward to end of paragraph. |
| 224 | With arg N, do it N times; negative arg -N means move backward N paragraphs.\n | 265 | With arg N, do it N times; negative arg -N means move backward N paragraphs. |
| 266 | |||
| 225 | A line which `paragraph-start' matches either separates paragraphs | 267 | A line which `paragraph-start' matches either separates paragraphs |
| 226 | \(if `paragraph-separate' matches it also) or is the first line of a paragraph. | 268 | \(if `paragraph-separate' matches it also) or is the first line of a paragraph. |
| 227 | A paragraph end is the beginning of a line which is not part of the paragraph | 269 | A paragraph end is the beginning of a line which is not part of the paragraph |
| @@ -239,7 +281,8 @@ If there is no line in the buffer after this one, behavior depends on the | |||
| 239 | value of `next-line-add-newlines'. If non-nil, it inserts a newline character | 281 | value of `next-line-add-newlines'. If non-nil, it inserts a newline character |
| 240 | to create a line, and moves the cursor to that line. Otherwise it moves the | 282 | to create a line, and moves the cursor to that line. Otherwise it moves the |
| 241 | cursor to the end of the buffer (if already at the end of the buffer, an error | 283 | cursor to the end of the buffer (if already at the end of the buffer, an error |
| 242 | is signaled).\n | 284 | is signaled). |
| 285 | |||
| 243 | The command C-x C-n can be used to create | 286 | The command C-x C-n can be used to create |
| 244 | a semipermanent goal column to which this command always moves. | 287 | a semipermanent goal column to which this command always moves. |
| 245 | Then it does not try to move vertically. This goal column is stored | 288 | Then it does not try to move vertically. This goal column is stored |
| @@ -258,6 +301,16 @@ If scan reaches end of buffer, stop there without error." | |||
| 258 | (end-of-line arg) | 301 | (end-of-line arg) |
| 259 | (setq this-command 'end-of-line)) | 302 | (setq this-command 'end-of-line)) |
| 260 | 303 | ||
| 304 | (defun backward-line-nomark (&optional arg) | ||
| 305 | "Deactivate mark; move cursor vertically up ARG lines." | ||
| 306 | (interactive "p") | ||
| 307 | (setq mark-active nil) | ||
| 308 | (if (null arg) | ||
| 309 | (setq arg 1)) | ||
| 310 | (forward-line (- arg)) | ||
| 311 | (setq this-command 'forward-line) | ||
| 312 | ) | ||
| 313 | |||
| 261 | (defun scroll-down-nomark (&optional arg) | 314 | (defun scroll-down-nomark (&optional arg) |
| 262 | "Deactivate mark; scroll down ARG lines; or near full screen if no ARG. | 315 | "Deactivate mark; scroll down ARG lines; or near full screen if no ARG. |
| 263 | A near full screen is `next-screen-context-lines' less than a full screen. | 316 | A near full screen is `next-screen-context-lines' less than a full screen. |
| @@ -269,9 +322,11 @@ When calling from a program, supply a number as argument or nil." | |||
| 269 | 322 | ||
| 270 | (defun end-of-buffer-nomark (&optional arg) | 323 | (defun end-of-buffer-nomark (&optional arg) |
| 271 | "Deactivate mark; move point to the end of the buffer. | 324 | "Deactivate mark; move point to the end of the buffer. |
| 272 | With arg N, put point N/10 of the way from the end.\n | 325 | With arg N, put point N/10 of the way from the end. |
| 326 | |||
| 273 | If the buffer is narrowed, this command uses the beginning and size | 327 | If the buffer is narrowed, this command uses the beginning and size |
| 274 | of the accessible part of the buffer.\n | 328 | of the accessible part of the buffer. |
| 329 | |||
| 275 | Don't use this command in Lisp programs! | 330 | Don't use this command in Lisp programs! |
| 276 | \(goto-char (point-max)) is faster and avoids clobbering the mark." | 331 | \(goto-char (point-max)) is faster and avoids clobbering the mark." |
| 277 | (interactive "P") | 332 | (interactive "P") |
| @@ -320,12 +375,14 @@ With argument, do this that many times." | |||
| 320 | 375 | ||
| 321 | (defun backward-paragraph-mark (&optional arg) | 376 | (defun backward-paragraph-mark (&optional arg) |
| 322 | "Ensure mark is active; move backward to start of paragraph. | 377 | "Ensure mark is active; move backward to start of paragraph. |
| 323 | With arg N, do it N times; negative arg -N means move forward N paragraphs.\n | 378 | With arg N, do it N times; negative arg -N means move forward N paragraphs. |
| 379 | |||
| 324 | A paragraph start is the beginning of a line which is a | 380 | A paragraph start is the beginning of a line which is a |
| 325 | `first-line-of-paragraph' or which is ordinary text and follows a | 381 | `first-line-of-paragraph' or which is ordinary text and follows a |
| 326 | paragraph-separating line; except: if the first real line of a | 382 | paragraph-separating line; except: if the first real line of a |
| 327 | paragraph is preceded by a blank line, the paragraph starts at that | 383 | paragraph is preceded by a blank line, the paragraph starts at that |
| 328 | blank line.\n | 384 | blank line. |
| 385 | |||
| 329 | See `forward-paragraph' for more information." | 386 | See `forward-paragraph' for more information." |
| 330 | (interactive "p") | 387 | (interactive "p") |
| 331 | (ensure-mark) | 388 | (ensure-mark) |
| @@ -335,10 +392,12 @@ See `forward-paragraph' for more information." | |||
| 335 | "Ensure mark is active; move cursor vertically up ARG lines. | 392 | "Ensure mark is active; move cursor vertically up ARG lines. |
| 336 | If there is no character in the target line exactly over the current column, | 393 | If there is no character in the target line exactly over the current column, |
| 337 | the cursor is positioned after the character in that line which spans this | 394 | the cursor is positioned after the character in that line which spans this |
| 338 | column, or at the end of the line if it is not long enough.\n | 395 | column, or at the end of the line if it is not long enough. |
| 396 | |||
| 339 | The command C-x C-n can be used to create | 397 | The command C-x C-n can be used to create |
| 340 | a semipermanent goal column to which this command always moves. | 398 | a semipermanent goal column to which this command always moves. |
| 341 | Then it does not try to move vertically.\n | 399 | Then it does not try to move vertically. |
| 400 | |||
| 342 | If you are thinking of using this in a Lisp program, consider using | 401 | If you are thinking of using this in a Lisp program, consider using |
| 343 | `forward-line' with a negative argument instead. It is usually easier | 402 | `forward-line' with a negative argument instead. It is usually easier |
| 344 | to use and more reliable (no dependence on goal column, etc.)." | 403 | to use and more reliable (no dependence on goal column, etc.)." |
| @@ -367,9 +426,11 @@ When calling from a program, supply a number as argument or nil." | |||
| 367 | 426 | ||
| 368 | (defun beginning-of-buffer-mark (&optional arg) | 427 | (defun beginning-of-buffer-mark (&optional arg) |
| 369 | "Ensure mark is active; move point to the beginning of the buffer. | 428 | "Ensure mark is active; move point to the beginning of the buffer. |
| 370 | With arg N, put point N/10 of the way from the beginning.\n | 429 | With arg N, put point N/10 of the way from the beginning. |
| 430 | |||
| 371 | If the buffer is narrowed, this command uses the beginning and size | 431 | If the buffer is narrowed, this command uses the beginning and size |
| 372 | of the accessible part of the buffer.\n | 432 | of the accessible part of the buffer. |
| 433 | |||
| 373 | Don't use this command in Lisp programs! | 434 | Don't use this command in Lisp programs! |
| 374 | \(goto-char (p\oint-min)) is faster and avoids clobbering the mark." | 435 | \(goto-char (p\oint-min)) is faster and avoids clobbering the mark." |
| 375 | (interactive "P") | 436 | (interactive "P") |
| @@ -405,12 +466,14 @@ With argument, do this that many times." | |||
| 405 | 466 | ||
| 406 | (defun backward-paragraph-nomark (&optional arg) | 467 | (defun backward-paragraph-nomark (&optional arg) |
| 407 | "Deactivate mark; move backward to start of paragraph. | 468 | "Deactivate mark; move backward to start of paragraph. |
| 408 | With arg N, do it N times; negative arg -N means move forward N paragraphs.\n | 469 | With arg N, do it N times; negative arg -N means move forward N paragraphs. |
| 470 | |||
| 409 | A paragraph start is the beginning of a line which is a | 471 | A paragraph start is the beginning of a line which is a |
| 410 | `first-line-of-paragraph' or which is ordinary text and follows a | 472 | `first-line-of-paragraph' or which is ordinary text and follows a |
| 411 | paragraph-separating line; except: if the first real line of a | 473 | paragraph-separating line; except: if the first real line of a |
| 412 | paragraph is preceded by a blank line, the paragraph starts at that | 474 | paragraph is preceded by a blank line, the paragraph starts at that |
| 413 | blank line.\n | 475 | blank line. |
| 476 | |||
| 414 | See `forward-paragraph' for more information." | 477 | See `forward-paragraph' for more information." |
| 415 | (interactive "p") | 478 | (interactive "p") |
| 416 | (setq mark-active nil) | 479 | (setq mark-active nil) |
| @@ -420,7 +483,8 @@ See `forward-paragraph' for more information." | |||
| 420 | "Deactivate mark; move cursor vertically up ARG lines. | 483 | "Deactivate mark; move cursor vertically up ARG lines. |
| 421 | If there is no character in the target line exactly over the current column, | 484 | If there is no character in the target line exactly over the current column, |
| 422 | the cursor is positioned after the character in that line which spans this | 485 | the cursor is positioned after the character in that line which spans this |
| 423 | column, or at the end of the line if it is not long enough.\n | 486 | column, or at the end of the line if it is not long enough. |
| 487 | |||
| 424 | The command C-x C-n can be used to create | 488 | The command C-x C-n can be used to create |
| 425 | a semipermanent goal column to which this command always moves. | 489 | a semipermanent goal column to which this command always moves. |
| 426 | Then it does not try to move vertically." | 490 | Then it does not try to move vertically." |
| @@ -448,9 +512,11 @@ When calling from a program, supply a number as argument or nil." | |||
| 448 | 512 | ||
| 449 | (defun beginning-of-buffer-nomark (&optional arg) | 513 | (defun beginning-of-buffer-nomark (&optional arg) |
| 450 | "Deactivate mark; move point to the beginning of the buffer. | 514 | "Deactivate mark; move point to the beginning of the buffer. |
| 451 | With arg N, put point N/10 of the way from the beginning.\n | 515 | With arg N, put point N/10 of the way from the beginning. |
| 516 | |||
| 452 | If the buffer is narrowed, this command uses the beginning and size | 517 | If the buffer is narrowed, this command uses the beginning and size |
| 453 | of the accessible part of the buffer.\n | 518 | of the accessible part of the buffer. |
| 519 | |||
| 454 | Don't use this command in Lisp programs! | 520 | Don't use this command in Lisp programs! |
| 455 | \(goto-char (point-min)) is faster and avoids clobbering the mark." | 521 | \(goto-char (point-min)) is faster and avoids clobbering the mark." |
| 456 | (interactive "P") | 522 | (interactive "P") |
| @@ -468,14 +534,47 @@ Don't use this command in Lisp programs! | |||
| 468 | 534 | ||
| 469 | ;;;###autoload | 535 | ;;;###autoload |
| 470 | (defun pc-selection-mode () | 536 | (defun pc-selection-mode () |
| 471 | "Change mark behaviour to emulate motif, MAC or MS-Windows cut and paste style.\n | 537 | "Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style. |
| 472 | This mode will switch on delete-selection-mode and | 538 | |
| 473 | transient-mark-mode.\n | 539 | This mode enables Delete Selection mode and Transient Mark mode. |
| 474 | The cursor keys (and others) are bound to new functions | 540 | |
| 475 | which will modify the status of the mark. It will be | 541 | The arrow keys (and others) are bound to new functions |
| 476 | possible to select regions with shift-cursorkeys. All this | 542 | which modify the status of the mark. |
| 477 | tries to emulate the look-and-feel of GUIs like motif, | 543 | |
| 478 | the MAC GUI or MS-Windows (sorry for the last one)." | 544 | The ordinary arrow keys disable the mark. |
| 545 | The shift-arrow keys move, leaving the mark behind. | ||
| 546 | |||
| 547 | C-LEFT and C-RIGHT move back or forward one word, disabling the mark. | ||
| 548 | S-C-LEFT and S-C-RIGHT move back or forward one word, leaving the mark behind. | ||
| 549 | |||
| 550 | C-DOWN and C-UP move back or forward a paragraph, disabling the mark. | ||
| 551 | S-C-DOWN and S-C-UP move back or forward a paragraph, leaving the mark behind. | ||
| 552 | |||
| 553 | HOME moves to beginning of line, disabling the mark. | ||
| 554 | S-HOME moves to beginning of line, leaving the mark behind. | ||
| 555 | With Ctrl or Meta, these keys move to beginning of buffer instead. | ||
| 556 | |||
| 557 | END moves to end of line, disabling the mark. | ||
| 558 | S-END moves to end of line, leaving the mark behind. | ||
| 559 | With Ctrl or Meta, these keys move to end of buffer instead. | ||
| 560 | |||
| 561 | PRIOR or PAGE-UP scrolls and disables the mark. | ||
| 562 | S-PRIOR or S-PAGE-UP scrolls and leaves the mark behind. | ||
| 563 | |||
| 564 | S-DELETE kills the region (`kill-region'). | ||
| 565 | S-INSERT yanks text from the kill ring (`yank'). | ||
| 566 | C-INSERT copies the region into the kill ring (`copy-region-as-kill'). | ||
| 567 | |||
| 568 | In addition, certain other PC bindings are imitated: | ||
| 569 | |||
| 570 | F6 other-window | ||
| 571 | DELETE delete-char | ||
| 572 | C-DELETE kill-line | ||
| 573 | M-DELETE kill-word | ||
| 574 | C-M-DELETE kill-sexp | ||
| 575 | C-BACKSPACE backward-kill-word | ||
| 576 | M-BACKSPACE undo" | ||
| 577 | |||
| 479 | (interactive) | 578 | (interactive) |
| 480 | ;; | 579 | ;; |
| 481 | ;; keybindings | 580 | ;; keybindings |
| @@ -535,6 +634,11 @@ the MAC GUI or MS-Windows (sorry for the last one)." | |||
| 535 | (define-key global-map [C-insert] 'copy-region-as-kill) | 634 | (define-key global-map [C-insert] 'copy-region-as-kill) |
| 536 | (define-key global-map [S-delete] 'kill-region) | 635 | (define-key global-map [S-delete] 'kill-region) |
| 537 | 636 | ||
| 637 | (define-key global-map [M-S-down] 'forward-line-mark) | ||
| 638 | (define-key global-map [M-down] 'forward-line-nomark) | ||
| 639 | (define-key global-map [M-S-up] 'backward-line-mark) | ||
| 640 | (define-key global-map [M-up] 'backward-line-nomark) | ||
| 641 | |||
| 538 | ;; The following bindings are useful on Sun Type 3 keyboards | 642 | ;; The following bindings are useful on Sun Type 3 keyboards |
| 539 | ;; They implement the Get-Delete-Put (copy-cut-paste) | 643 | ;; They implement the Get-Delete-Put (copy-cut-paste) |
| 540 | ;; functions from sunview on the L6, L8 and L10 keys | 644 | ;; functions from sunview on the L6, L8 and L10 keys |
| @@ -546,7 +650,6 @@ the MAC GUI or MS-Windows (sorry for the last one)." | |||
| 546 | ;; I modified them a little to work together with the | 650 | ;; I modified them a little to work together with the |
| 547 | ;; mark functionality I added. | 651 | ;; mark functionality I added. |
| 548 | 652 | ||
| 549 | (global-set-key [f1] 'help) ; KHelp F1 | ||
| 550 | (global-set-key [f6] 'other-window) ; KNextPane F6 | 653 | (global-set-key [f6] 'other-window) ; KNextPane F6 |
| 551 | (global-set-key [delete] 'delete-char) ; KDelete Del | 654 | (global-set-key [delete] 'delete-char) ; KDelete Del |
| 552 | (global-set-key [C-delete] 'kill-line) ; KEraseEndLine cDel | 655 | (global-set-key [C-delete] 'kill-line) ; KEraseEndLine cDel |
| @@ -569,6 +672,15 @@ the MAC GUI or MS-Windows (sorry for the last one)." | |||
| 569 | ;; | 672 | ;; |
| 570 | (setq transient-mark-mode t) | 673 | (setq transient-mark-mode t) |
| 571 | (setq mark-even-if-inactive t) | 674 | (setq mark-even-if-inactive t) |
| 572 | (delete-selection-mode 1)) | 675 | (delete-selection-mode 1) |
| 676 | (cond (pc-select-override-scroll-error | ||
| 677 | (defadvice scroll-up (around scroll-to-bottom-if-eob activate) | ||
| 678 | (condition-case nil | ||
| 679 | ad-do-it | ||
| 680 | (end-of-buffer (goto-char (point-max))))) | ||
| 681 | (defadvice scroll-down (around scroll-to-top-if-bob activate) | ||
| 682 | (condition-case nil | ||
| 683 | ad-do-it | ||
| 684 | (beginning-of-buffer (goto-char (point-min)))))))) | ||
| 573 | 685 | ||
| 574 | ;;; pc-select.el ends here | 686 | ;;; pc-select.el ends here |