diff options
| author | Miles Bader | 2005-07-29 01:54:54 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-07-29 01:54:54 +0000 |
| commit | 58b646fafc27ea5fb93fa95d5ff84187d689d315 (patch) | |
| tree | 361704f8149dccf6d1578bea3b89da11ced846f7 /lisp | |
| parent | ffc3bd5c6c5ce65d4390c3523e4527c701a0ed95 (diff) | |
| parent | d44e3b453c528446579182d82284abbfd80f8b7d (diff) | |
| download | emacs-58b646fafc27ea5fb93fa95d5ff84187d689d315.tar.gz emacs-58b646fafc27ea5fb93fa95d5ff84187d689d315.zip | |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-74
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 493-503)
- Update from CVS
- Update from CVS: lisp/startup.el (command-line): Fix typo.
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 95-98)
- Update from CVS
Diffstat (limited to 'lisp')
46 files changed, 1559 insertions, 1220 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e0f12487fb4..5ae09a0e9ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,173 @@ | |||
| 1 | 2005-07-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * net/ange-ftp.el (ange-ftp-gateway-fatal-msgs) | ||
| 4 | (ange-ftp-pending-error-line): New vars. | ||
| 5 | (ange-ftp-process-handle-line, ange-ftp-process-filter): Use them | ||
| 6 | to handle the non-fatal no-route-to-host messages. | ||
| 7 | (internal-ange-ftp-mode): Make the no-match regexp more efficient. | ||
| 8 | |||
| 9 | 2005-07-28 Juanma Barranquero <lekktu@gmail.com> | ||
| 10 | |||
| 11 | * isearch.el (isearch-mode-map, isearch-other-meta-char) | ||
| 12 | (isearch-quote-char, isearch-printing-char) | ||
| 13 | (isearch-text-char-description): "?\ " -> "?\s". | ||
| 14 | (isearch-lazy-highlight-cleanup) | ||
| 15 | (isearch-lazy-highlight-initial-delay) | ||
| 16 | (isearch-lazy-highlight-interval) | ||
| 17 | (isearch-lazy-highlight-max-at-a-time) | ||
| 18 | (isearch-lazy-highlight-face, isearch-lazy-highlight-cleanup): | ||
| 19 | Declare with define-obsolete-*-alias macros. | ||
| 20 | (isearch-forward): Fix typo in docstring. | ||
| 21 | (search-invisible, search-ring-yank-pointer) | ||
| 22 | (regexp-search-ring-yank-pointer): Doc fixes. | ||
| 23 | |||
| 24 | * recentf.el (recentf-menu-append-commands-p): Declare with | ||
| 25 | `define-obsolete-variable-alias'. | ||
| 26 | (recentf-max-saved-items, recentf-menu-filter) | ||
| 27 | (recentf-arrange-by-rule-subfilter): Doc fixes. | ||
| 28 | (recentf-menu-append-commands-flag) | ||
| 29 | (recentf-initialize-file-name-history, recentf-expand-file-name) | ||
| 30 | (recentf-clear-data): Fix typos in docstrings. | ||
| 31 | |||
| 32 | 2005-07-28 Nick Roberts <nickrob@snap.net.nz> | ||
| 33 | |||
| 34 | * progmodes/gdb-ui.el: Smarten comments. | ||
| 35 | (gdb-info-breakpoints-custom): Use nowarn when finding file. | ||
| 36 | |||
| 37 | 2005-07-27 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 38 | |||
| 39 | * term/apollo.el (terminal-init-apollo): New function containing | ||
| 40 | all former top level forms in the file. | ||
| 41 | * term/bobcat.el (terminal-init-bobcat): | ||
| 42 | * term/cygwin.el (terminal-init-cygwin): | ||
| 43 | * term/iris-ansi.el (terminal-init-iris-ansi): | ||
| 44 | * term/linux.el (terminal-init-linux): | ||
| 45 | * term/news.el (terminal-init-news): | ||
| 46 | * term/rxvt.el (terminal-init-rxvt): | ||
| 47 | * term/sun.el (terminal-init-sun): | ||
| 48 | * term/tvi970.el (terminal-init-tvi970): | ||
| 49 | * term/vt100.el (terminal-init-vt100): | ||
| 50 | * term/vt102.el (terminal-init-vt102): | ||
| 51 | * term/vt125.el (terminal-init-vt125): | ||
| 52 | * term/vt200.el (terminal-init-vt200): | ||
| 53 | * term/vt201.el (terminal-init-vt201): | ||
| 54 | * term/vt220.el (terminal-init-vt220): | ||
| 55 | * term/vt240.el (terminal-init-vt240): | ||
| 56 | * term/vt300.el (terminal-init-vt300): | ||
| 57 | * term/vt320.el (terminal-init-vt320): | ||
| 58 | * term/vt400.el (terminal-init-vt400): | ||
| 59 | * term/vt420.el (terminal-init-vt420): | ||
| 60 | * term/wyse50.el (terminal-init-wyse50): | ||
| 61 | * term/xterm.el (terminal-init-xterm): Likewise. | ||
| 62 | |||
| 63 | * term/README: Describe the terminal-init-* functionality. | ||
| 64 | |||
| 65 | * startup.el (command-line): After loading the terminal | ||
| 66 | initialization file call the corresponding terminal initialization | ||
| 67 | function. | ||
| 68 | |||
| 69 | 2005-07-27 Kenichi Handa <handa@m17n.org> | ||
| 70 | |||
| 71 | * ps-bdf.el (bdf-read-font-info): Ignore glyphs whose ENCODING is | ||
| 72 | negative. | ||
| 73 | |||
| 74 | * ps-mule.el (ps-mule-bitmap-prologue): Fix arguments to | ||
| 75 | setcharwidth. | ||
| 76 | (ps-mule-composition-prologue): Fix for the case that | ||
| 77 | RelativeCompose is false. | ||
| 78 | |||
| 79 | 2005-07-26 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 80 | |||
| 81 | * smerge-mode.el (smerge-ediff): Use insert-buffer-substring. | ||
| 82 | |||
| 83 | * descr-text.el (describe-char): Handle the case where the list of | ||
| 84 | chars is displayed in a separate frame. | ||
| 85 | Be a bit more discriminating when looking for the char. | ||
| 86 | |||
| 87 | 2005-07-26 Juanma Barranquero <lekktu@gmail.com> | ||
| 88 | |||
| 89 | * bookmark.el (bookmark-automatically-show-annotations) | ||
| 90 | (bookmark-read-annotation-text-func): Doc fixes. | ||
| 91 | (bookmark-save): Improve argument/docstring consistency. | ||
| 92 | (bookmark-get-bookmark, bookmark-get-bookmark-record) | ||
| 93 | (bookmark-alist-from-buffer) | ||
| 94 | (bookmark-upgrade-file-format-from-0) | ||
| 95 | (bookmark-grok-file-format-version) | ||
| 96 | (bookmark-maybe-upgrade-file-format, bookmark-kill-line) | ||
| 97 | (bookmark-read-annotation-mode) | ||
| 98 | (bookmark-insert-current-bookmark, bookmark-jump) | ||
| 99 | (bookmark-exit-hook): Fix typos in docstrings. | ||
| 100 | (bookmark-exit-hooks): Define as obsolete alias. | ||
| 101 | (bookmark-exit-hook-internal): Run `bookmark-exit-hook', | ||
| 102 | not `bookmark-exit-hooks'. Fix docstring. | ||
| 103 | (bookmark-bmenu-select): "?\ " -> "?\s". | ||
| 104 | |||
| 105 | 2005-07-25 Ari Roponen <arjuropo@cc.jyu.fi> (tiny change) | ||
| 106 | |||
| 107 | * startup.el (command-line): Fix typo. | ||
| 108 | |||
| 109 | 2005-07-24 Richard M. Stallman <rms@gnu.org> | ||
| 110 | |||
| 111 | * tooltip.el (tooltip-mode): Test emacs-basic-display, | ||
| 112 | not emacs-quick-startup. | ||
| 113 | |||
| 114 | 2005-07-24 Juanma Barranquero <lekktu@gmail.com> | ||
| 115 | |||
| 116 | * emacs-lisp/re-builder.el (reb-with-current-window): Delete. | ||
| 117 | (reb-next-match, reb-show-subexp): Use `with-selected-window' | ||
| 118 | instead of `reb-with-current-window'. | ||
| 119 | (reb-prev-match): Likewise. Also, don't move left if the search | ||
| 120 | was unsuccessful. | ||
| 121 | (reb-initialize-buffer): New function. | ||
| 122 | (re-builder, reb-change-syntax): Use it. | ||
| 123 | |||
| 124 | * man.el (Man-goto-page): Make second argument NOERROR optional. | ||
| 125 | |||
| 126 | 2005-07-23 Richard M. Stallman <rms@gnu.org> | ||
| 127 | |||
| 128 | * man.el (Man-bgproc-sentinel): Check here for failure to find | ||
| 129 | any man page in the output, and report the error here. | ||
| 130 | (Man-arguments): Make it permanent local. | ||
| 131 | (Man-goto-page): New arg NOERROR. Never kill the current buffer. | ||
| 132 | (Man-mode): Pass t for NOERROR. | ||
| 133 | |||
| 134 | * progmodes/grep.el (grep-error-face): Use font-lock-keyword-face. | ||
| 135 | (grep-mode-font-lock-keywords): | ||
| 136 | Don't use compilation-...-face for messages that are not file names. | ||
| 137 | |||
| 138 | * progmodes/compile.el (compilation-mode-font-lock-keywords): | ||
| 139 | Don't use compilation-...-face for messages that are not file names. | ||
| 140 | |||
| 141 | 2005-07-22 Juri Linkov <juri@jurta.org> | ||
| 142 | |||
| 143 | * simple.el (line-move-1): Fix comments. | ||
| 144 | |||
| 145 | * startup.el (normal-splash-screen): Update menu name. | ||
| 146 | |||
| 147 | * tempo.el (tempo-insert-template): Fix 2005-07-16 change. | ||
| 148 | |||
| 149 | 2005-07-22 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 150 | |||
| 151 | * term/xterm.el: Load term/rxvt if the terminal is actually an | ||
| 152 | rxvt terminal. | ||
| 153 | (xterm-rxvt-set-background-mode): Remove, not used anymore. | ||
| 154 | |||
| 155 | * term/rxvt.el (function-key-map): Use substitute-key-definition | ||
| 156 | to bind {C,S,C-S}-{f1-f10}. Add a few missing key bindings. | ||
| 157 | |||
| 158 | * term/cygwin.el: New file. | ||
| 159 | |||
| 160 | 2005-07-22 Kim F. Storm <storm@cua.dk> | ||
| 161 | |||
| 162 | * image-file.el (insert-image-file, image-file-yank-handler): | ||
| 163 | Fix last change to maintain a (unique) yank-handler on yanked images. | ||
| 164 | |||
| 165 | 2005-07-22 Eduardo Mu,Aq(Boz <emufer@terra.es> (tiny change) | ||
| 166 | |||
| 167 | * dired.el (dired-move-to-filename-regexp): Recognize the B suffix | ||
| 168 | of the file size (as in "177B" for 177 bytes). This happens with | ||
| 169 | "ls -lh" on FreeBSD. | ||
| 170 | |||
| 1 | 2005-07-22 Juanma Barranquero <lekktu@gmail.com> | 171 | 2005-07-22 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 172 | ||
| 3 | * hilit-chg.el (highlight-changes-global-initial-state) | 173 | * hilit-chg.el (highlight-changes-global-initial-state) |
| @@ -215,20 +385,20 @@ | |||
| 215 | 385 | ||
| 216 | * textmodes/org.el (org-table-column-names) | 386 | * textmodes/org.el (org-table-column-names) |
| 217 | (org-table-column-name-regexp) | 387 | (org-table-column-name-regexp) |
| 218 | (org-table-named-field-locations): New variables. | 388 | (org-table-named-field-locations): New variables. |
| 219 | (org-archive-subtree): Protect `this-command' when calling | 389 | (org-archive-subtree): Protect `this-command' when calling |
| 220 | `org-copy-subtree' and `org-cut-subtree', to avoid appending to | 390 | `org-copy-subtree' and `org-cut-subtree', to avoid appending to |
| 221 | the kill buffer. | 391 | the kill buffer. |
| 222 | (org-complete): Remove fixed-formula completion. | 392 | (org-complete): Remove fixed-formula completion. |
| 223 | (org-edit-formulas-map): New variable. | 393 | (org-edit-formulas-map): New variable. |
| 224 | (org-table-edit-formulas): New command. | 394 | (org-table-edit-formulas): New command. |
| 225 | (org-finish-edit-formulas, org-abort-edit-formulas) | 395 | (org-finish-edit-formulas, org-abort-edit-formulas) |
| 226 | (org-show-variable, org-table-get-vertical-vector): New functions. | 396 | (org-show-variable, org-table-get-vertical-vector): New functions. |
| 227 | (org-table-maybe-eval-formula): Handle `:=' fields. | 397 | (org-table-maybe-eval-formula): Handle `:=' fields. |
| 228 | (org-table-get-stored-formulas, org-table-store-formulas) | 398 | (org-table-get-stored-formulas, org-table-store-formulas) |
| 229 | (org-table-get-formula, org-table-modify-formulas) | 399 | (org-table-get-formula, org-table-modify-formulas) |
| 230 | (org-table-replace-in-formulas): Handle named field formulas. | 400 | (org-table-replace-in-formulas): Handle named field formulas. |
| 231 | (org-table-get-specials): Store locations of named fields. | 401 | (org-table-get-specials): Store locations of named fields. |
| 232 | 402 | ||
| 233 | 2005-07-19 Juri Linkov <juri@jurta.org> | 403 | 2005-07-19 Juri Linkov <juri@jurta.org> |
| 234 | 404 | ||
| @@ -290,8 +460,8 @@ | |||
| 290 | more than 88 colors. Use green for light backgrounds with | 460 | more than 88 colors. Use green for light backgrounds with |
| 291 | 8 colors, and yellow for dark backgrounds with 8 colors. | 461 | 8 colors, and yellow for dark backgrounds with 8 colors. |
| 292 | 462 | ||
| 293 | * font-lock.el (font-lock-regexp-grouping-backslash): Don't | 463 | * font-lock.el (font-lock-regexp-grouping-backslash): |
| 294 | inherit from escape-glyph (use bold for all cases). | 464 | Don't inherit from escape-glyph (use bold for all cases). |
| 295 | 465 | ||
| 296 | * info.el (info-xref-visited): Use light foreground color `violet' | 466 | * info.el (info-xref-visited): Use light foreground color `violet' |
| 297 | for dark backgrounds instead of dark color `magenta3'. | 467 | for dark backgrounds instead of dark color `magenta3'. |
| @@ -388,8 +558,8 @@ | |||
| 388 | `insert-buffer'. | 558 | `insert-buffer'. |
| 389 | 559 | ||
| 390 | * calendar/icalendar.el (icalendar--get-unfolded-buffer): | 560 | * calendar/icalendar.el (icalendar--get-unfolded-buffer): |
| 391 | * progmodes/ada-mode.el (ada-make-body): Use | 561 | * progmodes/ada-mode.el (ada-make-body): |
| 392 | `insert-buffer-substring' and `goto-char', not `insert-buffer'. | 562 | Use `insert-buffer-substring' and `goto-char', not `insert-buffer'. |
| 393 | 563 | ||
| 394 | * dired.el (dired-log): | 564 | * dired.el (dired-log): |
| 395 | * tar-mode.el (tar-subfile-save-buffer): | 565 | * tar-mode.el (tar-subfile-save-buffer): |
| @@ -483,8 +653,8 @@ | |||
| 483 | 653 | ||
| 484 | * emulation/viper-init.el (viper-activate-input-method): Avoid warning. | 654 | * emulation/viper-init.el (viper-activate-input-method): Avoid warning. |
| 485 | 655 | ||
| 486 | * emacs-lisp/re-builder.el (reb-cook-regexp): Avoid | 656 | * emacs-lisp/re-builder.el (reb-cook-regexp): |
| 487 | warning calling lre-compile-string. | 657 | Avoid warning calling lre-compile-string. |
| 488 | (reb-color-display-p): Avoid warning. | 658 | (reb-color-display-p): Avoid warning. |
| 489 | 659 | ||
| 490 | * calculator.el (calculator-last-input): Guard uses | 660 | * calculator.el (calculator-last-input): Guard uses |
| @@ -501,8 +671,8 @@ | |||
| 501 | (checkdoc-overlay-start, checkdoc-overlay-end) | 671 | (checkdoc-overlay-start, checkdoc-overlay-end) |
| 502 | (checkdoc-mode-line-update, checkdoc-char=): | 672 | (checkdoc-mode-line-update, checkdoc-char=): |
| 503 | Define such that compiler knows they are defined. | 673 | Define such that compiler knows they are defined. |
| 504 | (checkdoc-call-eval-buffer): Deleted. Use eval-buffer directly. | 674 | (checkdoc-call-eval-buffer): Delete. Use eval-buffer directly. |
| 505 | (checkdoc-read-event): Deleted. Use read-event directly. | 675 | (checkdoc-read-event): Delete. Use read-event directly. |
| 506 | 676 | ||
| 507 | * whitespace.el (whitespace-make-overlay) | 677 | * whitespace.el (whitespace-make-overlay) |
| 508 | (whitespace-overlay-put, whitespace-delete-overlay) | 678 | (whitespace-overlay-put, whitespace-delete-overlay) |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 51a5e0469e5..1f0d671afb4 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -169,7 +169,7 @@ recently set ones come first, oldest ones come last)." | |||
| 169 | 169 | ||
| 170 | 170 | ||
| 171 | (defcustom bookmark-automatically-show-annotations t | 171 | (defcustom bookmark-automatically-show-annotations t |
| 172 | "*nil means don't show annotations when jumping to a bookmark." | 172 | "*Non-nil means show annotations when jumping to a bookmark." |
| 173 | :type 'boolean | 173 | :type 'boolean |
| 174 | :group 'bookmark) | 174 | :group 'bookmark) |
| 175 | 175 | ||
| @@ -333,14 +333,14 @@ through a file easier.") | |||
| 333 | 333 | ||
| 334 | 334 | ||
| 335 | (defun bookmark-get-bookmark (bookmark) | 335 | (defun bookmark-get-bookmark (bookmark) |
| 336 | "Return the full entry for BOOKMARK in bookmark-alist. | 336 | "Return the full entry for BOOKMARK in `bookmark-alist'. |
| 337 | If BOOKMARK is not a string, return nil." | 337 | If BOOKMARK is not a string, return nil." |
| 338 | (when (stringp bookmark) | 338 | (when (stringp bookmark) |
| 339 | (assoc-string bookmark bookmark-alist bookmark-completion-ignore-case))) | 339 | (assoc-string bookmark bookmark-alist bookmark-completion-ignore-case))) |
| 340 | 340 | ||
| 341 | 341 | ||
| 342 | (defun bookmark-get-bookmark-record (bookmark) | 342 | (defun bookmark-get-bookmark-record (bookmark) |
| 343 | "Return the guts of the entry for BOOKMARK in bookmark-alist. | 343 | "Return the guts of the entry for BOOKMARK in `bookmark-alist'. |
| 344 | That is, all information but the name." | 344 | That is, all information but the name." |
| 345 | (car (cdr (bookmark-get-bookmark bookmark)))) | 345 | (car (cdr (bookmark-get-bookmark bookmark)))) |
| 346 | 346 | ||
| @@ -443,8 +443,7 @@ That is, all information but the name." | |||
| 443 | (list (cons 'info-node node))))) | 443 | (list (cons 'info-node node))))) |
| 444 | 444 | ||
| 445 | (message "%S" (assq 'info-node (bookmark-get-bookmark-record bookmark))) | 445 | (message "%S" (assq 'info-node (bookmark-get-bookmark-record bookmark))) |
| 446 | (sit-for 4) | 446 | (sit-for 4)) |
| 447 | ) | ||
| 448 | 447 | ||
| 449 | 448 | ||
| 450 | (defvar bookmark-history nil | 449 | (defvar bookmark-history nil |
| @@ -619,7 +618,7 @@ You should never need to change this.") | |||
| 619 | 618 | ||
| 620 | 619 | ||
| 621 | (defun bookmark-alist-from-buffer () | 620 | (defun bookmark-alist-from-buffer () |
| 622 | "Return a bookmark-alist (in any format) from the current buffer. | 621 | "Return a `bookmark-alist' (in any format) from the current buffer. |
| 623 | The buffer must of course contain bookmark format information. | 622 | The buffer must of course contain bookmark format information. |
| 624 | Does not care from where in the buffer it is called, and does not | 623 | Does not care from where in the buffer it is called, and does not |
| 625 | affect point." | 624 | affect point." |
| @@ -659,7 +658,7 @@ affect point." | |||
| 659 | 658 | ||
| 660 | (defun bookmark-upgrade-file-format-from-0 () | 659 | (defun bookmark-upgrade-file-format-from-0 () |
| 661 | "Upgrade a bookmark file of format 0 (the original format) to format 1. | 660 | "Upgrade a bookmark file of format 0 (the original format) to format 1. |
| 662 | This expects to be called from point-min in a bookmark file." | 661 | This expects to be called from `point-min' in a bookmark file." |
| 663 | (message "Upgrading bookmark format from 0 to %d..." | 662 | (message "Upgrading bookmark format from 0 to %d..." |
| 664 | bookmark-file-format-version) | 663 | bookmark-file-format-version) |
| 665 | (let* ((old-list (bookmark-alist-from-buffer)) | 664 | (let* ((old-list (bookmark-alist-from-buffer)) |
| @@ -676,7 +675,7 @@ This expects to be called from point-min in a bookmark file." | |||
| 676 | 675 | ||
| 677 | (defun bookmark-grok-file-format-version () | 676 | (defun bookmark-grok-file-format-version () |
| 678 | "Return an integer which is the file-format version of this bookmark file. | 677 | "Return an integer which is the file-format version of this bookmark file. |
| 679 | This expects to be called from point-min in a bookmark file." | 678 | This expects to be called from `point-min' in a bookmark file." |
| 680 | (if (looking-at "^;;;;") | 679 | (if (looking-at "^;;;;") |
| 681 | (save-excursion | 680 | (save-excursion |
| 682 | (save-match-data | 681 | (save-match-data |
| @@ -691,7 +690,7 @@ This expects to be called from point-min in a bookmark file." | |||
| 691 | (defun bookmark-maybe-upgrade-file-format () | 690 | (defun bookmark-maybe-upgrade-file-format () |
| 692 | "Check the file-format version of this bookmark file. | 691 | "Check the file-format version of this bookmark file. |
| 693 | If the version is not up-to-date, upgrade it automatically. | 692 | If the version is not up-to-date, upgrade it automatically. |
| 694 | This expects to be called from point-min in a bookmark file." | 693 | This expects to be called from `point-min' in a bookmark file." |
| 695 | (let ((version (bookmark-grok-file-format-version))) | 694 | (let ((version (bookmark-grok-file-format-version))) |
| 696 | (cond | 695 | (cond |
| 697 | ((= version bookmark-file-format-version) | 696 | ((= version bookmark-file-format-version) |
| @@ -783,7 +782,7 @@ the list of bookmarks.\)" | |||
| 783 | (defun bookmark-kill-line (&optional newline-too) | 782 | (defun bookmark-kill-line (&optional newline-too) |
| 784 | "Kill from point to end of line. | 783 | "Kill from point to end of line. |
| 785 | If optional arg NEWLINE-TOO is non-nil, delete the newline too. | 784 | If optional arg NEWLINE-TOO is non-nil, delete the newline too. |
| 786 | Does not affect the kill-ring." | 785 | Does not affect the kill ring." |
| 787 | (let ((eol (save-excursion (end-of-line) (point)))) | 786 | (let ((eol (save-excursion (end-of-line) (point)))) |
| 788 | (delete-region (point) eol) | 787 | (delete-region (point) eol) |
| 789 | (if (and newline-too (looking-at "\n")) | 788 | (if (and newline-too (looking-at "\n")) |
| @@ -842,11 +841,11 @@ the bookmark (and file, and point) specified in buffer local variables." | |||
| 842 | 841 | ||
| 843 | (defvar bookmark-read-annotation-text-func 'bookmark-default-annotation-text | 842 | (defvar bookmark-read-annotation-text-func 'bookmark-default-annotation-text |
| 844 | "Function to return default text to use for a bookmark annotation. | 843 | "Function to return default text to use for a bookmark annotation. |
| 845 | It takes the name of the bookmark, as a string, as an arg.") | 844 | It takes one argument, the name of the bookmark, as a string.") |
| 846 | 845 | ||
| 847 | (defun bookmark-read-annotation-mode (buf point parg bookmark) | 846 | (defun bookmark-read-annotation-mode (buf point parg bookmark) |
| 848 | "Mode for composing annotations for a bookmark. | 847 | "Mode for composing annotations for a bookmark. |
| 849 | Wants BUF POINT PARG and BOOKMARK. | 848 | Wants BUF, POINT, PARG, and BOOKMARK. |
| 850 | When you have finished composing, type \\[bookmark-send-annotation] to send | 849 | When you have finished composing, type \\[bookmark-send-annotation] to send |
| 851 | the annotation. | 850 | the annotation. |
| 852 | 851 | ||
| @@ -933,7 +932,7 @@ Lines beginning with `#' are ignored." | |||
| 933 | 932 | ||
| 934 | 933 | ||
| 935 | (defun bookmark-insert-current-bookmark () | 934 | (defun bookmark-insert-current-bookmark () |
| 936 | "Insert this buffer's value of bookmark-current-bookmark. | 935 | "Insert this buffer's value of `bookmark-current-bookmark'. |
| 937 | Default to file name if it's nil." | 936 | Default to file name if it's nil." |
| 938 | (interactive) | 937 | (interactive) |
| 939 | (let ((str | 938 | (let ((str |
| @@ -1044,7 +1043,7 @@ bookmarks. See help on function `bookmark-load' for more about | |||
| 1044 | this. | 1043 | this. |
| 1045 | 1044 | ||
| 1046 | If the file pointed to by BOOKMARK no longer exists, you will be asked | 1045 | If the file pointed to by BOOKMARK no longer exists, you will be asked |
| 1047 | if you wish to give the bookmark a new location, and bookmark-jump | 1046 | if you wish to give the bookmark a new location, and `bookmark-jump' |
| 1048 | will then jump to the new location, as well as recording it in place | 1047 | will then jump to the new location, as well as recording it in place |
| 1049 | of the old one in the permanent bookmark record." | 1048 | of the old one in the permanent bookmark record." |
| 1050 | (interactive | 1049 | (interactive |
| @@ -1304,8 +1303,8 @@ Saves by default in the file defined by the variable | |||
| 1304 | `bookmark-default-file'. With a prefix arg, save it in file FILE | 1303 | `bookmark-default-file'. With a prefix arg, save it in file FILE |
| 1305 | \(second argument\). | 1304 | \(second argument\). |
| 1306 | 1305 | ||
| 1307 | If you are calling this from Lisp, the two arguments are PREFIX-ARG | 1306 | If you are calling this from Lisp, the two arguments are PARG and |
| 1308 | and FILE, and if you just want it to write to the default file, then | 1307 | FILE, and if you just want it to write to the default file, then |
| 1309 | pass no arguments. Or pass in nil and FILE, and it will save in FILE | 1308 | pass no arguments. Or pass in nil and FILE, and it will save in FILE |
| 1310 | instead. If you pass in one argument, and it is non-nil, then the | 1309 | instead. If you pass in one argument, and it is non-nil, then the |
| 1311 | user will be interactively queried for a file to save in. | 1310 | user will be interactively queried for a file to save in. |
| @@ -1804,7 +1803,7 @@ You can mark bookmarks with the \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-mar | |||
| 1804 | (setq tem (bookmark-bmenu-bookmark)) | 1803 | (setq tem (bookmark-bmenu-bookmark)) |
| 1805 | (let ((inhibit-read-only t)) | 1804 | (let ((inhibit-read-only t)) |
| 1806 | (delete-char -1) | 1805 | (delete-char -1) |
| 1807 | (insert ?\ )) | 1806 | (insert ?\s)) |
| 1808 | (or (string-equal tem bmrk) | 1807 | (or (string-equal tem bmrk) |
| 1809 | (member tem others) | 1808 | (member tem others) |
| 1810 | (setq others (cons tem others)))) | 1809 | (setq others (cons tem others)))) |
| @@ -2093,7 +2092,7 @@ strings returned are not." | |||
| 2093 | (format "-*- %s (%d) -*-" name iter) | 2092 | (format "-*- %s (%d) -*-" name iter) |
| 2094 | (nreverse lst)) | 2093 | (nreverse lst)) |
| 2095 | pane-list))) | 2094 | pane-list))) |
| 2096 | 2095 | ||
| 2097 | ;; Popup the menu and return the string. | 2096 | ;; Popup the menu and return the string. |
| 2098 | (x-popup-menu event (cons (concat "-*- " name " -*-") | 2097 | (x-popup-menu event (cons (concat "-*- " name " -*-") |
| 2099 | (nreverse pane-list))))) | 2098 | (nreverse pane-list))))) |
| @@ -2141,12 +2140,14 @@ strings returned are not." | |||
| 2141 | 2140 | ||
| 2142 | ;;; Exit Hook, called from kill-emacs-hook | 2141 | ;;; Exit Hook, called from kill-emacs-hook |
| 2143 | (defvar bookmark-exit-hook nil | 2142 | (defvar bookmark-exit-hook nil |
| 2144 | "Hook run when emacs exits.") | 2143 | "Hook run when Emacs exits.") |
| 2144 | |||
| 2145 | (define-obsolete-variable-alias 'bookmark-exit-hooks 'bookmark-exit-hook "22.1") | ||
| 2145 | 2146 | ||
| 2146 | (defun bookmark-exit-hook-internal () | 2147 | (defun bookmark-exit-hook-internal () |
| 2147 | "Save bookmark state, if necessary, at Emacs exit time. | 2148 | "Save bookmark state, if necessary, at Emacs exit time. |
| 2148 | This also runs `bookmark-exit-hooks'." | 2149 | This also runs `bookmark-exit-hook'." |
| 2149 | (run-hooks 'bookmark-exit-hooks) | 2150 | (run-hooks 'bookmark-exit-hook) |
| 2150 | (and bookmark-alist | 2151 | (and bookmark-alist |
| 2151 | (bookmark-time-to-save-p t) | 2152 | (bookmark-time-to-save-p t) |
| 2152 | (bookmark-save))) | 2153 | (bookmark-save))) |
diff --git a/lisp/dired.el b/lisp/dired.el index 0ba369e4640..880d31d9b41 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1865,11 +1865,11 @@ DIR must be a directory name, not a file name." | |||
| 1865 | ;; The "[0-9]" below requires the previous column to end in a digit. | 1865 | ;; The "[0-9]" below requires the previous column to end in a digit. |
| 1866 | ;; This avoids recognizing `1 may 1997' as a date in the line: | 1866 | ;; This avoids recognizing `1 may 1997' as a date in the line: |
| 1867 | ;; -r--r--r-- 1 may 1997 1168 Oct 19 16:49 README | 1867 | ;; -r--r--r-- 1 may 1997 1168 Oct 19 16:49 README |
| 1868 | ;; The "[kKMGTPEZY]?" below supports "ls -alh" output. | 1868 | ;; The "[BkKMGTPEZY]?" below supports "ls -alh" output. |
| 1869 | ;; The ".*" below finds the last match if there are multiple matches. | 1869 | ;; The ".*" below finds the last match if there are multiple matches. |
| 1870 | ;; This avoids recognizing `jservice 10 1024' as a date in the line: | 1870 | ;; This avoids recognizing `jservice 10 1024' as a date in the line: |
| 1871 | ;; drwxr-xr-x 3 jservice 10 1024 Jul 2 1997 esg-host | 1871 | ;; drwxr-xr-x 3 jservice 10 1024 Jul 2 1997 esg-host |
| 1872 | (concat ".*[0-9][kKMGTPEZY]?" s | 1872 | (concat ".*[0-9][BkKMGTPEZY]?" s |
| 1873 | "\\(" western "\\|" western-comma "\\|" japanese "\\|" iso "\\)" | 1873 | "\\(" western "\\|" western-comma "\\|" japanese "\\|" iso "\\)" |
| 1874 | s "+")) | 1874 | s "+")) |
| 1875 | "Regular expression to match up to the file name in a directory listing. | 1875 | "Regular expression to match up to the file name in a directory listing. |
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index bdfe79b3b6a..e0a3c5ed285 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el | |||
| @@ -299,20 +299,6 @@ Except for Lisp syntax this is the same as `reb-regexp'.") | |||
| 299 | (add-hook 'kill-buffer-hook 'reb-kill-buffer) | 299 | (add-hook 'kill-buffer-hook 'reb-kill-buffer) |
| 300 | (reb-auto-update nil nil nil)) | 300 | (reb-auto-update nil nil nil)) |
| 301 | 301 | ||
| 302 | |||
| 303 | ;; Handy macro for doing things in other windows | ||
| 304 | (defmacro reb-with-current-window (window &rest body) | ||
| 305 | "With WINDOW selected evaluate BODY forms and reselect previous window." | ||
| 306 | |||
| 307 | (let ((oldwindow (make-symbol "*oldwindow*"))) | ||
| 308 | `(let ((,oldwindow (selected-window))) | ||
| 309 | (select-window ,window) | ||
| 310 | (unwind-protect | ||
| 311 | (progn | ||
| 312 | ,@body) | ||
| 313 | (select-window ,oldwindow))))) | ||
| 314 | (put 'reb-with-current-window 'lisp-indent-function 0) | ||
| 315 | |||
| 316 | (defun reb-color-display-p () | 302 | (defun reb-color-display-p () |
| 317 | "Return t if display is capable of displaying colors." | 303 | "Return t if display is capable of displaying colors." |
| 318 | (eq 'color | 304 | (eq 'color |
| @@ -330,6 +316,15 @@ Except for Lisp syntax this is the same as `reb-regexp'.") | |||
| 330 | "Return binding for SYMBOL in the RE Builder target buffer." | 316 | "Return binding for SYMBOL in the RE Builder target buffer." |
| 331 | `(with-current-buffer reb-target-buffer ,symbol)) | 317 | `(with-current-buffer reb-target-buffer ,symbol)) |
| 332 | 318 | ||
| 319 | (defun reb-initialize-buffer () | ||
| 320 | "Initialize the current buffer as a RE Builder buffer." | ||
| 321 | (erase-buffer) | ||
| 322 | (reb-insert-regexp) | ||
| 323 | (goto-char (+ 2 (point-min))) | ||
| 324 | (cond ((reb-lisp-syntax-p) | ||
| 325 | (reb-lisp-mode)) | ||
| 326 | (t (reb-mode)))) | ||
| 327 | |||
| 333 | ;;; This is to help people find this in Apropos. | 328 | ;;; This is to help people find this in Apropos. |
| 334 | ;;;###autoload | 329 | ;;;###autoload |
| 335 | (defalias 'regexp-builder 're-builder) | 330 | (defalias 'regexp-builder 're-builder) |
| @@ -349,13 +344,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.") | |||
| 349 | reb-window-config (current-window-configuration)) | 344 | reb-window-config (current-window-configuration)) |
| 350 | (select-window (split-window (selected-window) (- (window-height) 4))) | 345 | (select-window (split-window (selected-window) (- (window-height) 4))) |
| 351 | (switch-to-buffer (get-buffer-create reb-buffer)) | 346 | (switch-to-buffer (get-buffer-create reb-buffer)) |
| 352 | (erase-buffer) | 347 | (reb-initialize-buffer))) |
| 353 | (reb-insert-regexp) | ||
| 354 | (goto-char (+ 2 (point-min))) | ||
| 355 | (cond | ||
| 356 | ((reb-lisp-syntax-p) | ||
| 357 | (reb-lisp-mode)) | ||
| 358 | (t (reb-mode))))) | ||
| 359 | 348 | ||
| 360 | (defun reb-change-target-buffer (buf) | 349 | (defun reb-change-target-buffer (buf) |
| 361 | "Change the target buffer and display it in the target window." | 350 | "Change the target buffer and display it in the target window." |
| @@ -393,8 +382,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.") | |||
| 393 | (interactive) | 382 | (interactive) |
| 394 | 383 | ||
| 395 | (reb-assert-buffer-in-window) | 384 | (reb-assert-buffer-in-window) |
| 396 | (reb-with-current-window | 385 | (with-selected-window reb-target-window |
| 397 | reb-target-window | ||
| 398 | (if (not (re-search-forward reb-regexp (point-max) t)) | 386 | (if (not (re-search-forward reb-regexp (point-max) t)) |
| 399 | (message "No more matches.") | 387 | (message "No more matches.") |
| 400 | (reb-show-subexp | 388 | (reb-show-subexp |
| @@ -406,13 +394,15 @@ Except for Lisp syntax this is the same as `reb-regexp'.") | |||
| 406 | (interactive) | 394 | (interactive) |
| 407 | 395 | ||
| 408 | (reb-assert-buffer-in-window) | 396 | (reb-assert-buffer-in-window) |
| 409 | (reb-with-current-window reb-target-window | 397 | (with-selected-window reb-target-window |
| 410 | (goto-char (1- (point))) | 398 | (let ((p (point))) |
| 411 | (if (not (re-search-backward reb-regexp (point-min) t)) | 399 | (goto-char (1- p)) |
| 412 | (message "No more matches.") | 400 | (if (re-search-backward reb-regexp (point-min) t) |
| 413 | (reb-show-subexp | 401 | (reb-show-subexp |
| 414 | (or (and reb-subexp-mode reb-subexp-displayed) 0) | 402 | (or (and reb-subexp-mode reb-subexp-displayed) 0) |
| 415 | t)))) | 403 | t) |
| 404 | (goto-char p) | ||
| 405 | (message "No more matches."))))) | ||
| 416 | 406 | ||
| 417 | (defun reb-toggle-case () | 407 | (defun reb-toggle-case () |
| 418 | "Toggle case sensitivity of searches for RE Builder target buffer." | 408 | "Toggle case sensitivity of searches for RE Builder target buffer." |
| @@ -449,7 +439,7 @@ On color displays this just puts point to the end of the expression as | |||
| 449 | the match should already be marked by an overlay. | 439 | the match should already be marked by an overlay. |
| 450 | On other displays jump to the beginning and the end of it. | 440 | On other displays jump to the beginning and the end of it. |
| 451 | If the optional PAUSE is non-nil then pause at the end in any case." | 441 | If the optional PAUSE is non-nil then pause at the end in any case." |
| 452 | (reb-with-current-window reb-target-window | 442 | (with-selected-window reb-target-window |
| 453 | (if (not (reb-color-display-p)) | 443 | (if (not (reb-color-display-p)) |
| 454 | (progn (goto-char (match-beginning subexp)) | 444 | (progn (goto-char (match-beginning subexp)) |
| 455 | (sit-for reb-blink-delay))) | 445 | (sit-for reb-blink-delay))) |
| @@ -479,14 +469,9 @@ Optional argument SYNTAX must be specified if called non-interactively." | |||
| 479 | (if (memq syntax '(read string lisp-re sregex rx)) | 469 | (if (memq syntax '(read string lisp-re sregex rx)) |
| 480 | (let ((buffer (get-buffer reb-buffer))) | 470 | (let ((buffer (get-buffer reb-buffer))) |
| 481 | (setq reb-re-syntax syntax) | 471 | (setq reb-re-syntax syntax) |
| 482 | (if buffer | 472 | (when buffer |
| 483 | (with-current-buffer buffer | 473 | (with-current-buffer buffer |
| 484 | (erase-buffer) | 474 | (reb-initialize-buffer)))) |
| 485 | (reb-insert-regexp) | ||
| 486 | (goto-char (+ 2 (point-min))) | ||
| 487 | (cond ((reb-lisp-syntax-p) | ||
| 488 | (reb-lisp-mode)) | ||
| 489 | (t (reb-mode)))))) | ||
| 490 | (error "Invalid syntax: %s" syntax))) | 475 | (error "Invalid syntax: %s" syntax))) |
| 491 | 476 | ||
| 492 | 477 | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 33f639380a6..7bc733ad90f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,36 @@ | |||
| 1 | 2005-07-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * rfc2231.el (rfc2231-parse-string): Take care that not only a | ||
| 4 | segmented parameter but also other parameters might be there. | ||
| 5 | |||
| 6 | 2005-07-26 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 7 | |||
| 8 | * gnus-art.el (gnus-article-next-page-1): Don't scroll if there're | ||
| 9 | fewer lines than that of scroll-margin. | ||
| 10 | (gnus-article-prev-page): Narrow the range to bind scroll-in-place. | ||
| 11 | |||
| 12 | 2005-07-25 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 13 | |||
| 14 | * gnus-art.el (gnus-article-next-page): Revert. | ||
| 15 | (gnus-article-beginning-of-window): New macro. | ||
| 16 | (gnus-article-next-page-1): Use it. | ||
| 17 | (gnus-article-prev-page): Ditto. | ||
| 18 | (gnus-mime-save-part-and-strip): Use insert-buffer-substring | ||
| 19 | instead of insert-buffer. | ||
| 20 | (gnus-mime-delete-part): Ditto. | ||
| 21 | (gnus-article-edit-exit): Ditto. | ||
| 22 | |||
| 23 | * gnus-util.el (gnus-beginning-of-window): Remove. | ||
| 24 | (gnus-end-of-window): Remove. | ||
| 25 | |||
| 26 | * lpath.el: Don't bind scroll-margin. | ||
| 27 | |||
| 28 | 2005-07-25 Simon Josefsson <jas@extundo.com> | ||
| 29 | |||
| 30 | * pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible | ||
| 31 | to have the url package without w3. Reported by Daiki Ueno | ||
| 32 | <ueno@unixuser.org> and Luigi Panzeri <matley@muppetslab.org>. | ||
| 33 | |||
| 1 | 2005-07-21 Stefan Monnier <monnier@iro.umontreal.ca> | 34 | 2005-07-21 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 35 | ||
| 3 | * mml.el (mml-minibuffer-read-disposition): Don't use inline by default | 36 | * mml.el (mml-minibuffer-read-disposition): Don't use inline by default |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 2be1afea77d..f7e3420e922 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -4117,7 +4117,7 @@ Deleting parts may malfunction or destroy the article; continue? ") | |||
| 4117 | ',gnus-newsgroup-ignored-charsets)) | 4117 | ',gnus-newsgroup-ignored-charsets)) |
| 4118 | (mbl mml-buffer-list)) | 4118 | (mbl mml-buffer-list)) |
| 4119 | (setq mml-buffer-list nil) | 4119 | (setq mml-buffer-list nil) |
| 4120 | (insert-buffer gnus-original-article-buffer) | 4120 | (insert-buffer-substring gnus-original-article-buffer) |
| 4121 | (mime-to-mml ',handles) | 4121 | (mime-to-mml ',handles) |
| 4122 | (setq gnus-article-mime-handles nil) | 4122 | (setq gnus-article-mime-handles nil) |
| 4123 | (let ((mbl1 mml-buffer-list)) | 4123 | (let ((mbl1 mml-buffer-list)) |
| @@ -4199,7 +4199,7 @@ Deleting parts may malfunction or destroy the article; continue? ") | |||
| 4199 | ',gnus-newsgroup-ignored-charsets)) | 4199 | ',gnus-newsgroup-ignored-charsets)) |
| 4200 | (mbl mml-buffer-list)) | 4200 | (mbl mml-buffer-list)) |
| 4201 | (setq mml-buffer-list nil) | 4201 | (setq mml-buffer-list nil) |
| 4202 | (insert-buffer gnus-original-article-buffer) | 4202 | (insert-buffer-substring gnus-original-article-buffer) |
| 4203 | (mime-to-mml ',handles) | 4203 | (mime-to-mml ',handles) |
| 4204 | (setq gnus-article-mime-handles nil) | 4204 | (setq gnus-article-mime-handles nil) |
| 4205 | (let ((mbl1 mml-buffer-list)) | 4205 | (let ((mbl1 mml-buffer-list)) |
| @@ -5160,7 +5160,7 @@ If given a numerical ARG, move forward ARG pages." | |||
| 5160 | If end of article, return non-nil. Otherwise return nil. | 5160 | If end of article, return non-nil. Otherwise return nil. |
| 5161 | Argument LINES specifies lines to be scrolled up." | 5161 | Argument LINES specifies lines to be scrolled up." |
| 5162 | (interactive "p") | 5162 | (interactive "p") |
| 5163 | (gnus-end-of-window) | 5163 | (move-to-window-line -1) |
| 5164 | (if (save-excursion | 5164 | (if (save-excursion |
| 5165 | (end-of-line) | 5165 | (end-of-line) |
| 5166 | (and (pos-visible-in-window-p) ;Not continuation line. | 5166 | (and (pos-visible-in-window-p) ;Not continuation line. |
| @@ -5182,20 +5182,38 @@ Argument LINES specifies lines to be scrolled up." | |||
| 5182 | (gnus-article-next-page-1 lines) | 5182 | (gnus-article-next-page-1 lines) |
| 5183 | nil)) | 5183 | nil)) |
| 5184 | 5184 | ||
| 5185 | (defmacro gnus-article-beginning-of-window () | ||
| 5186 | "Move point to the beginning of the window. | ||
| 5187 | In Emacs, the point is placed at the line number which `scroll-margin' | ||
| 5188 | specifies." | ||
| 5189 | (if (featurep 'xemacs) | ||
| 5190 | '(move-to-window-line 0) | ||
| 5191 | '(move-to-window-line | ||
| 5192 | (min (max 0 scroll-margin) | ||
| 5193 | (max 1 (- (window-height) | ||
| 5194 | (if mode-line-format 1 0) | ||
| 5195 | (if (and (boundp 'header-line-format) | ||
| 5196 | (symbol-value 'header-line-format)) | ||
| 5197 | 1 0))))))) | ||
| 5198 | |||
| 5185 | (defun gnus-article-next-page-1 (lines) | 5199 | (defun gnus-article-next-page-1 (lines) |
| 5186 | (let ((scroll-in-place nil)) | 5200 | (unless (and (not (featurep 'xemacs)) |
| 5201 | (> (symbol-value 'scroll-margin) 0) | ||
| 5202 | (<= (count-lines (window-start) (point-max)) | ||
| 5203 | (symbol-value 'scroll-margin))) | ||
| 5187 | (condition-case () | 5204 | (condition-case () |
| 5188 | (scroll-up lines) | 5205 | (let ((scroll-in-place nil)) |
| 5206 | (scroll-up lines)) | ||
| 5189 | (end-of-buffer | 5207 | (end-of-buffer |
| 5190 | ;; Long lines may cause an end-of-buffer error. | 5208 | ;; Long lines may cause an end-of-buffer error. |
| 5191 | (goto-char (point-max))))) | 5209 | (goto-char (point-max)))) |
| 5192 | (gnus-beginning-of-window)) | 5210 | (gnus-article-beginning-of-window))) |
| 5193 | 5211 | ||
| 5194 | (defun gnus-article-prev-page (&optional lines) | 5212 | (defun gnus-article-prev-page (&optional lines) |
| 5195 | "Show previous page of current article. | 5213 | "Show previous page of current article. |
| 5196 | Argument LINES specifies lines to be scrolled down." | 5214 | Argument LINES specifies lines to be scrolled down." |
| 5197 | (interactive "p") | 5215 | (interactive "p") |
| 5198 | (gnus-beginning-of-window) | 5216 | (move-to-window-line 0) |
| 5199 | (if (and gnus-page-broken | 5217 | (if (and gnus-page-broken |
| 5200 | (bobp) | 5218 | (bobp) |
| 5201 | (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? | 5219 | (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? |
| @@ -5203,13 +5221,13 @@ Argument LINES specifies lines to be scrolled down." | |||
| 5203 | (gnus-narrow-to-page -1) ;Go to previous page. | 5221 | (gnus-narrow-to-page -1) ;Go to previous page. |
| 5204 | (goto-char (point-max)) | 5222 | (goto-char (point-max)) |
| 5205 | (recenter -1)) | 5223 | (recenter -1)) |
| 5206 | (let ((scroll-in-place nil)) | 5224 | (prog1 |
| 5207 | (prog1 | 5225 | (condition-case () |
| 5208 | (condition-case () | 5226 | (let ((scroll-in-place nil)) |
| 5209 | (scroll-down lines) | 5227 | (scroll-down lines)) |
| 5210 | (beginning-of-buffer | 5228 | (beginning-of-buffer |
| 5211 | (goto-char (point-min)))) | 5229 | (goto-char (point-min)))) |
| 5212 | (gnus-beginning-of-window))))) | 5230 | (gnus-article-beginning-of-window)))) |
| 5213 | 5231 | ||
| 5214 | (defun gnus-article-only-boring-p () | 5232 | (defun gnus-article-only-boring-p () |
| 5215 | "Decide whether there is only boring text remaining in the article. | 5233 | "Decide whether there is only boring text remaining in the article. |
| @@ -5818,7 +5836,7 @@ groups." | |||
| 5818 | (window-start (window-start))) | 5836 | (window-start (window-start))) |
| 5819 | (erase-buffer) | 5837 | (erase-buffer) |
| 5820 | (if (gnus-buffer-live-p gnus-original-article-buffer) | 5838 | (if (gnus-buffer-live-p gnus-original-article-buffer) |
| 5821 | (insert-buffer gnus-original-article-buffer)) | 5839 | (insert-buffer-substring gnus-original-article-buffer)) |
| 5822 | (let ((winconf gnus-prev-winconf)) | 5840 | (let ((winconf gnus-prev-winconf)) |
| 5823 | (kill-all-local-variables) | 5841 | (kill-all-local-variables) |
| 5824 | (gnus-article-mode) | 5842 | (gnus-article-mode) |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 363b9c2f4a0..925555e1ff0 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1577,30 +1577,6 @@ empty directories from OLD-PATH." | |||
| 1577 | (defalias 'gnus-set-process-query-on-exit-flag | 1577 | (defalias 'gnus-set-process-query-on-exit-flag |
| 1578 | 'process-kill-without-query)) | 1578 | 'process-kill-without-query)) |
| 1579 | 1579 | ||
| 1580 | (defun gnus-beginning-of-window () | ||
| 1581 | "Move point to the beginning of the window." | ||
| 1582 | (move-to-window-line | ||
| 1583 | (if (featurep 'xemacs) | ||
| 1584 | 0 | ||
| 1585 | (min scroll-margin | ||
| 1586 | (max 1 (- (window-height) | ||
| 1587 | (if mode-line-format 1 0) | ||
| 1588 | (if (and (boundp 'header-line-format) | ||
| 1589 | (symbol-value 'header-line-format)) | ||
| 1590 | 1 0))))))) | ||
| 1591 | |||
| 1592 | (defun gnus-end-of-window () | ||
| 1593 | "Move point to the end of the window." | ||
| 1594 | (move-to-window-line | ||
| 1595 | (if (featurep 'xemacs) | ||
| 1596 | -1 | ||
| 1597 | (max (- -1 scroll-margin) | ||
| 1598 | (- -1 (max 1 (- (window-height) | ||
| 1599 | (if mode-line-format 1 0) | ||
| 1600 | (if (and (boundp 'header-line-format) | ||
| 1601 | (symbol-value 'header-line-format)) | ||
| 1602 | 1 0)))))))) | ||
| 1603 | |||
| 1604 | (provide 'gnus-util) | 1580 | (provide 'gnus-util) |
| 1605 | 1581 | ||
| 1606 | ;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49 | 1582 | ;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49 |
diff --git a/lisp/gnus/pgg.el b/lisp/gnus/pgg.el index 91b56c57a4f..8d72fd31502 100644 --- a/lisp/gnus/pgg.el +++ b/lisp/gnus/pgg.el | |||
| @@ -410,7 +410,6 @@ within the region." | |||
| 410 | 410 | ||
| 411 | (defun pgg-insert-url-with-w3 (url) | 411 | (defun pgg-insert-url-with-w3 (url) |
| 412 | (ignore-errors | 412 | (ignore-errors |
| 413 | (require 'w3) | ||
| 414 | (require 'url) | 413 | (require 'url) |
| 415 | (let (buffer-file-name) | 414 | (let (buffer-file-name) |
| 416 | (url-insert-file-contents url)))) | 415 | (url-insert-file-contents url)))) |
diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el index 0a6cfdb2af1..4c39ba6c7fd 100644 --- a/lisp/gnus/rfc2231.el +++ b/lisp/gnus/rfc2231.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; rfc2231.el --- Functions for decoding rfc2231 headers | 1 | ;;; rfc2231.el --- Functions for decoding rfc2231 headers |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004 | 3 | ;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
| @@ -52,7 +52,7 @@ The list will be on the form | |||
| 52 | (prev-value "") | 52 | (prev-value "") |
| 53 | display-name mailbox c display-string parameters | 53 | display-name mailbox c display-string parameters |
| 54 | attribute value type subtype number encoded | 54 | attribute value type subtype number encoded |
| 55 | prev-attribute) | 55 | prev-attribute prev-encoded) |
| 56 | (ietf-drums-init (mail-header-remove-whitespace | 56 | (ietf-drums-init (mail-header-remove-whitespace |
| 57 | (mail-header-remove-comments string))) | 57 | (mail-header-remove-comments string))) |
| 58 | (let ((table (copy-syntax-table ietf-drums-syntax-table))) | 58 | (let ((table (copy-syntax-table ietf-drums-syntax-table))) |
| @@ -106,9 +106,14 @@ The list will be on the form | |||
| 106 | ;; See if we have any previous continuations. | 106 | ;; See if we have any previous continuations. |
| 107 | (when (and prev-attribute | 107 | (when (and prev-attribute |
| 108 | (not (eq prev-attribute attribute))) | 108 | (not (eq prev-attribute attribute))) |
| 109 | (push (cons prev-attribute prev-value) parameters) | 109 | (push (cons prev-attribute |
| 110 | (if prev-encoded | ||
| 111 | (rfc2231-decode-encoded-string prev-value) | ||
| 112 | prev-value)) | ||
| 113 | parameters) | ||
| 110 | (setq prev-attribute nil | 114 | (setq prev-attribute nil |
| 111 | prev-value "")) | 115 | prev-value "" |
| 116 | prev-encoded nil)) | ||
| 112 | (unless (eq c ?=) | 117 | (unless (eq c ?=) |
| 113 | (error "Invalid header: %s" string)) | 118 | (error "Invalid header: %s" string)) |
| 114 | (forward-char 1) | 119 | (forward-char 1) |
| @@ -127,7 +132,8 @@ The list will be on the form | |||
| 127 | (error "Invalid header: %s" string))) | 132 | (error "Invalid header: %s" string))) |
| 128 | (if number | 133 | (if number |
| 129 | (setq prev-attribute attribute | 134 | (setq prev-attribute attribute |
| 130 | prev-value (concat prev-value value)) | 135 | prev-value (concat prev-value value) |
| 136 | prev-encoded encoded) | ||
| 131 | (push (cons attribute | 137 | (push (cons attribute |
| 132 | (if encoded | 138 | (if encoded |
| 133 | (rfc2231-decode-encoded-string value) | 139 | (rfc2231-decode-encoded-string value) |
| @@ -137,7 +143,7 @@ The list will be on the form | |||
| 137 | ;; Take care of any final continuations. | 143 | ;; Take care of any final continuations. |
| 138 | (when prev-attribute | 144 | (when prev-attribute |
| 139 | (push (cons prev-attribute | 145 | (push (cons prev-attribute |
| 140 | (if encoded | 146 | (if prev-encoded |
| 141 | (rfc2231-decode-encoded-string prev-value) | 147 | (rfc2231-decode-encoded-string prev-value) |
| 142 | prev-value)) | 148 | prev-value)) |
| 143 | parameters)) | 149 | parameters)) |
diff --git a/lisp/image-file.el b/lisp/image-file.el index be95470184c..6b88b84e19f 100644 --- a/lisp/image-file.el +++ b/lisp/image-file.el | |||
| @@ -118,7 +118,8 @@ the command `insert-file-contents'." | |||
| 118 | (create-image data nil t)) | 118 | (create-image data nil t)) |
| 119 | (props | 119 | (props |
| 120 | `(display ,image | 120 | `(display ,image |
| 121 | yank-handler (image-file-yank-handler) | 121 | yank-handler |
| 122 | (image-file-yank-handler nil t) | ||
| 122 | intangible ,image | 123 | intangible ,image |
| 123 | rear-nonsticky (display intangible) | 124 | rear-nonsticky (display intangible) |
| 124 | ;; This a cheap attempt to make the whole buffer | 125 | ;; This a cheap attempt to make the whole buffer |
| @@ -141,12 +142,18 @@ the command `insert-file-contents'." | |||
| 141 | ;; recognized as two different images. | 142 | ;; recognized as two different images. |
| 142 | (defun image-file-yank-handler (string) | 143 | (defun image-file-yank-handler (string) |
| 143 | "Yank handler for inserting an image into a buffer." | 144 | "Yank handler for inserting an image into a buffer." |
| 144 | (let ((image (get-text-property 0 'display string))) | 145 | (let ((len (length string)) |
| 146 | (image (get-text-property 0 'display string))) | ||
| 147 | (remove-text-properties 0 len yank-excluded-properties string) | ||
| 145 | (if (consp image) | 148 | (if (consp image) |
| 146 | (put-text-property 0 (length string) | 149 | (add-text-properties 0 |
| 147 | 'display | 150 | (or (next-single-property-change 0 'image-counter string) |
| 148 | (cons (car image) (cdr image)) | 151 | (length string)) |
| 149 | string)) | 152 | `(display |
| 153 | ,(cons (car image) (cdr image)) | ||
| 154 | yank-handler | ||
| 155 | ,(cons 'image-file-yank-handler '(nil t))) | ||
| 156 | string)) | ||
| 150 | (insert string))) | 157 | (insert string))) |
| 151 | 158 | ||
| 152 | (put 'image-file-handler 'safe-magic t) | 159 | (put 'image-file-handler 'safe-magic t) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 90a12b7a7b9..e72b011fc40 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -122,8 +122,8 @@ a tab, a carriage return (control-M), a newline, and `]+'." | |||
| 122 | 122 | ||
| 123 | (defcustom search-invisible 'open | 123 | (defcustom search-invisible 'open |
| 124 | "If t incremental search can match hidden text. | 124 | "If t incremental search can match hidden text. |
| 125 | nil means don't match invisible text. | 125 | A nil value means don't match invisible text. |
| 126 | If the value is `open', if the text matched is made invisible by | 126 | When the value is `open', if the text matched is made invisible by |
| 127 | an overlay having an `invisible' property and that overlay has a property | 127 | an overlay having an `invisible' property and that overlay has a property |
| 128 | `isearch-open-invisible', then incremental search will show the contents. | 128 | `isearch-open-invisible', then incremental search will show the contents. |
| 129 | \(This applies when using `outline.el' and `hideshow.el'.) | 129 | \(This applies when using `outline.el' and `hideshow.el'.) |
| @@ -188,10 +188,10 @@ to the search status stack.") | |||
| 188 | 188 | ||
| 189 | (defvar search-ring-yank-pointer nil | 189 | (defvar search-ring-yank-pointer nil |
| 190 | "Index in `search-ring' of last string reused. | 190 | "Index in `search-ring' of last string reused. |
| 191 | nil if none yet.") | 191 | It is nil if none yet.") |
| 192 | (defvar regexp-search-ring-yank-pointer nil | 192 | (defvar regexp-search-ring-yank-pointer nil |
| 193 | "Index in `regexp-search-ring' of last string reused. | 193 | "Index in `regexp-search-ring' of last string reused. |
| 194 | nil if none yet.") | 194 | It is nil if none yet.") |
| 195 | 195 | ||
| 196 | (defcustom search-ring-update nil | 196 | (defcustom search-ring-update nil |
| 197 | "*Non-nil if advancing or retreating in the search ring should cause search. | 197 | "*Non-nil if advancing or retreating in the search ring should cause search. |
| @@ -246,22 +246,25 @@ If this is nil, extra highlighting can be \"manually\" removed with | |||
| 246 | \\[lazy-highlight-cleanup]." | 246 | \\[lazy-highlight-cleanup]." |
| 247 | :type 'boolean | 247 | :type 'boolean |
| 248 | :group 'lazy-highlight) | 248 | :group 'lazy-highlight) |
| 249 | (defvaralias 'isearch-lazy-highlight-cleanup 'lazy-highlight-cleanup) | 249 | (define-obsolete-variable-alias 'isearch-lazy-highlight-cleanup |
| 250 | (make-obsolete-variable 'isearch-lazy-highlight-cleanup 'lazy-highlight-cleanup "22.1") | 250 | 'lazy-highlight-cleanup |
| 251 | "22.1") | ||
| 251 | 252 | ||
| 252 | (defcustom lazy-highlight-initial-delay 0.25 | 253 | (defcustom lazy-highlight-initial-delay 0.25 |
| 253 | "*Seconds to wait before beginning to lazily highlight all matches." | 254 | "*Seconds to wait before beginning to lazily highlight all matches." |
| 254 | :type 'number | 255 | :type 'number |
| 255 | :group 'lazy-highlight) | 256 | :group 'lazy-highlight) |
| 256 | (defvaralias 'isearch-lazy-highlight-initial-delay 'lazy-highlight-initial-delay) | 257 | (define-obsolete-variable-alias 'isearch-lazy-highlight-initial-delay |
| 257 | (make-obsolete-variable 'isearch-lazy-highlight-initial-delay 'lazy-highlight-initial-delay "22.1") | 258 | 'lazy-highlight-initial-delay |
| 259 | "22.1") | ||
| 258 | 260 | ||
| 259 | (defcustom lazy-highlight-interval 0 ; 0.0625 | 261 | (defcustom lazy-highlight-interval 0 ; 0.0625 |
| 260 | "*Seconds between lazily highlighting successive matches." | 262 | "*Seconds between lazily highlighting successive matches." |
| 261 | :type 'number | 263 | :type 'number |
| 262 | :group 'lazy-highlight) | 264 | :group 'lazy-highlight) |
| 263 | (defvaralias 'isearch-lazy-highlight-interval 'lazy-highlight-interval) | 265 | (define-obsolete-variable-alias 'isearch-lazy-highlight-interval |
| 264 | (make-obsolete-variable 'isearch-lazy-highlight-interval 'lazy-highlight-interval "22.1") | 266 | 'lazy-highlight-interval |
| 267 | "22.1") | ||
| 265 | 268 | ||
| 266 | (defcustom lazy-highlight-max-at-a-time 20 | 269 | (defcustom lazy-highlight-max-at-a-time 20 |
| 267 | "*Maximum matches to highlight at a time (for `lazy-highlight'). | 270 | "*Maximum matches to highlight at a time (for `lazy-highlight'). |
| @@ -271,8 +274,9 @@ A value of nil means highlight all matches." | |||
| 271 | :type '(choice (const :tag "All" nil) | 274 | :type '(choice (const :tag "All" nil) |
| 272 | (integer :tag "Some")) | 275 | (integer :tag "Some")) |
| 273 | :group 'lazy-highlight) | 276 | :group 'lazy-highlight) |
| 274 | (defvaralias 'isearch-lazy-highlight-max-at-a-time 'lazy-highlight-max-at-a-time) | 277 | (define-obsolete-variable-alias 'isearch-lazy-highlight-max-at-a-time |
| 275 | (make-obsolete-variable 'isearch-lazy-highlight-max-at-a-time 'lazy-highlight-max-at-a-time "22.1") | 278 | 'lazy-highlight-max-at-a-time |
| 279 | "22.1") | ||
| 276 | 280 | ||
| 277 | (defface lazy-highlight | 281 | (defface lazy-highlight |
| 278 | '((((class color) (min-colors 88) (background light)) | 282 | '((((class color) (min-colors 88) (background light)) |
| @@ -288,8 +292,9 @@ A value of nil means highlight all matches." | |||
| 288 | :group 'lazy-highlight) | 292 | :group 'lazy-highlight) |
| 289 | (put 'isearch-lazy-highlight-face 'face-alias 'lazy-highlight) | 293 | (put 'isearch-lazy-highlight-face 'face-alias 'lazy-highlight) |
| 290 | (defvar lazy-highlight-face 'lazy-highlight) | 294 | (defvar lazy-highlight-face 'lazy-highlight) |
| 291 | (defvaralias 'isearch-lazy-highlight-face 'lazy-highlight-face) | 295 | (define-obsolete-variable-alias 'isearch-lazy-highlight-face |
| 292 | (make-obsolete-variable 'isearch-lazy-highlight-face 'lazy-highlight-face "22.1") | 296 | 'lazy-highlight-face |
| 297 | "22.1") | ||
| 293 | 298 | ||
| 294 | ;; Define isearch-mode keymap. | 299 | ;; Define isearch-mode keymap. |
| 295 | 300 | ||
| @@ -308,12 +313,12 @@ A value of nil means highlight all matches." | |||
| 308 | ;; We need these explicit definitions because, in a dense keymap, | 313 | ;; We need these explicit definitions because, in a dense keymap, |
| 309 | ;; the binding for t does not affect characters. | 314 | ;; the binding for t does not affect characters. |
| 310 | ;; We use a dense keymap to save space. | 315 | ;; We use a dense keymap to save space. |
| 311 | (while (< i ?\ ) | 316 | (while (< i ?\s) |
| 312 | (define-key map (make-string 1 i) 'isearch-other-control-char) | 317 | (define-key map (make-string 1 i) 'isearch-other-control-char) |
| 313 | (setq i (1+ i))) | 318 | (setq i (1+ i))) |
| 314 | 319 | ||
| 315 | ;; Single-byte printing chars extend the search string by default. | 320 | ;; Single-byte printing chars extend the search string by default. |
| 316 | (setq i ?\ ) | 321 | (setq i ?\s) |
| 317 | (while (< i 256) | 322 | (while (< i 256) |
| 318 | (define-key map (vector i) 'isearch-printing-char) | 323 | (define-key map (vector i) 'isearch-printing-char) |
| 319 | (setq i (1+ i))) | 324 | (setq i (1+ i))) |
| @@ -527,7 +532,7 @@ Type \\[isearch-quote-char] to quote control character to search for it. | |||
| 527 | Type \\[isearch-query-replace] to start `query-replace' with string to\ | 532 | Type \\[isearch-query-replace] to start `query-replace' with string to\ |
| 528 | replace from last search string. | 533 | replace from last search string. |
| 529 | Type \\[isearch-query-replace-regexp] to start `query-replace-regexp'\ | 534 | Type \\[isearch-query-replace-regexp] to start `query-replace-regexp'\ |
| 530 | with string to replace from last search string.. | 535 | with string to replace from last search string. |
| 531 | 536 | ||
| 532 | Type \\[isearch-toggle-case-fold] to toggle search case-sensitivity. | 537 | Type \\[isearch-toggle-case-fold] to toggle search case-sensitivity. |
| 533 | Type \\[isearch-toggle-regexp] to toggle regular-expression mode. | 538 | Type \\[isearch-toggle-regexp] to toggle regular-expression mode. |
| @@ -1653,7 +1658,7 @@ Isearch mode." | |||
| 1653 | ;; directly to avoid the input method and keyboard | 1658 | ;; directly to avoid the input method and keyboard |
| 1654 | ;; coding system translating it. | 1659 | ;; coding system translating it. |
| 1655 | (if (and (integerp key) | 1660 | (if (and (integerp key) |
| 1656 | (>= key ?\ ) (/= key 127) (< key 256)) | 1661 | (>= key ?\s) (/= key 127) (< key 256)) |
| 1657 | (progn | 1662 | (progn |
| 1658 | (isearch-process-search-char key) | 1663 | (isearch-process-search-char key) |
| 1659 | (setq keylist (cdr keylist))) | 1664 | (setq keylist (cdr keylist))) |
| @@ -1745,7 +1750,7 @@ Isearch mode." | |||
| 1745 | ;; Assume character codes 0200 - 0377 stand for characters in some | 1750 | ;; Assume character codes 0200 - 0377 stand for characters in some |
| 1746 | ;; single-byte character set, and convert them to Emacs | 1751 | ;; single-byte character set, and convert them to Emacs |
| 1747 | ;; characters. | 1752 | ;; characters. |
| 1748 | (if (and isearch-regexp (= char ?\ )) | 1753 | (if (and isearch-regexp (= char ?\s)) |
| 1749 | (if (subregexp-context-p isearch-string (length isearch-string)) | 1754 | (if (subregexp-context-p isearch-string (length isearch-string)) |
| 1750 | (isearch-process-search-string "[ ]" " ") | 1755 | (isearch-process-search-string "[ ]" " ") |
| 1751 | (isearch-process-search-char char)) | 1756 | (isearch-process-search-char char)) |
| @@ -1766,7 +1771,7 @@ Isearch mode." | |||
| 1766 | (interactive) | 1771 | (interactive) |
| 1767 | (let ((char last-command-char)) | 1772 | (let ((char last-command-char)) |
| 1768 | (if (= char ?\S-\ ) | 1773 | (if (= char ?\S-\ ) |
| 1769 | (setq char ?\ )) | 1774 | (setq char ?\s)) |
| 1770 | (if (and enable-multibyte-characters | 1775 | (if (and enable-multibyte-characters |
| 1771 | (>= char ?\200) | 1776 | (>= char ?\200) |
| 1772 | (<= char ?\377)) | 1777 | (<= char ?\377)) |
| @@ -2196,7 +2201,7 @@ since they have special meaning in a regexp." | |||
| 2196 | 2201 | ||
| 2197 | (defun isearch-text-char-description (c) | 2202 | (defun isearch-text-char-description (c) |
| 2198 | (cond | 2203 | (cond |
| 2199 | ((< c ?\ ) (format "^%c" (+ c 64))) | 2204 | ((< c ?\s) (format "^%c" (+ c 64))) |
| 2200 | ((= c ?\^?) "^?") | 2205 | ((= c ?\^?) "^?") |
| 2201 | (t (char-to-string c)))) | 2206 | (t (char-to-string c)))) |
| 2202 | 2207 | ||
| @@ -2283,8 +2288,9 @@ is nil. This function is called when exiting an incremental search if | |||
| 2283 | (cancel-timer isearch-lazy-highlight-timer) | 2288 | (cancel-timer isearch-lazy-highlight-timer) |
| 2284 | (setq isearch-lazy-highlight-timer nil))) | 2289 | (setq isearch-lazy-highlight-timer nil))) |
| 2285 | 2290 | ||
| 2286 | (defalias 'isearch-lazy-highlight-cleanup 'lazy-highlight-cleanup) | 2291 | (define-obsolete-function-alias 'isearch-lazy-highlight-cleanup |
| 2287 | (make-obsolete 'isearch-lazy-highlight-cleanup 'lazy-highlight-cleanup "22.1") | 2292 | 'lazy-highlight-cleanup |
| 2293 | "22.1") | ||
| 2288 | 2294 | ||
| 2289 | (defun isearch-lazy-highlight-new-loop (&optional beg end) | 2295 | (defun isearch-lazy-highlight-new-loop (&optional beg end) |
| 2290 | "Cleanup any previous `lazy-highlight' loop and begin a new one. | 2296 | "Cleanup any previous `lazy-highlight' loop and begin a new one. |
diff --git a/lisp/man.el b/lisp/man.el index cb62aa65e94..ed6112e1978 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -352,6 +352,7 @@ Otherwise, the value is whatever the function | |||
| 352 | (make-variable-buffer-local 'Man-page-mode-string) | 352 | (make-variable-buffer-local 'Man-page-mode-string) |
| 353 | (make-variable-buffer-local 'Man-original-frame) | 353 | (make-variable-buffer-local 'Man-original-frame) |
| 354 | (make-variable-buffer-local 'Man-arguments) | 354 | (make-variable-buffer-local 'Man-arguments) |
| 355 | (put 'Man-arguments 'permanent-local t) | ||
| 355 | 356 | ||
| 356 | (setq-default Man-sections-alist nil) | 357 | (setq-default Man-sections-alist nil) |
| 357 | (setq-default Man-refpages-alist nil) | 358 | (setq-default Man-refpages-alist nil) |
| @@ -1005,8 +1006,15 @@ manpage command." | |||
| 1005 | (if Man-fontify-manpage-flag | 1006 | (if Man-fontify-manpage-flag |
| 1006 | (Man-fontify-manpage) | 1007 | (Man-fontify-manpage) |
| 1007 | (Man-cleanup-manpage)) | 1008 | (Man-cleanup-manpage)) |
| 1009 | |||
| 1008 | (run-hooks 'Man-cooked-hook) | 1010 | (run-hooks 'Man-cooked-hook) |
| 1009 | (Man-mode) | 1011 | (Man-mode) |
| 1012 | |||
| 1013 | (if (not Man-page-list) | ||
| 1014 | (let ((args Man-arguments)) | ||
| 1015 | (kill-buffer (current-buffer)) | ||
| 1016 | (error "Can't find the %s manpage" args))) | ||
| 1017 | |||
| 1010 | (set-buffer-modified-p nil) | 1018 | (set-buffer-modified-p nil) |
| 1011 | )) | 1019 | )) |
| 1012 | ;; Restore case-fold-search before calling | 1020 | ;; Restore case-fold-search before calling |
| @@ -1082,7 +1090,7 @@ The following key bindings are currently in effect in the buffer: | |||
| 1082 | (Man-build-page-list) | 1090 | (Man-build-page-list) |
| 1083 | (Man-strip-page-headers) | 1091 | (Man-strip-page-headers) |
| 1084 | (Man-unindent) | 1092 | (Man-unindent) |
| 1085 | (Man-goto-page 1) | 1093 | (Man-goto-page 1 t) |
| 1086 | (run-mode-hooks 'Man-mode-hook)) | 1094 | (run-mode-hooks 'Man-mode-hook)) |
| 1087 | 1095 | ||
| 1088 | (defsubst Man-build-section-alist () | 1096 | (defsubst Man-build-section-alist () |
| @@ -1342,35 +1350,32 @@ Specify which REFERENCE to use; default is based on word at point." | |||
| 1342 | (interactive) | 1350 | (interactive) |
| 1343 | (quit-window)) | 1351 | (quit-window)) |
| 1344 | 1352 | ||
| 1345 | (defun Man-goto-page (page) | 1353 | (defun Man-goto-page (page &optional noerror) |
| 1346 | "Go to the manual page on page PAGE." | 1354 | "Go to the manual page on page PAGE." |
| 1347 | (interactive | 1355 | (interactive |
| 1348 | (if (not Man-page-list) | 1356 | (if (not Man-page-list) |
| 1349 | (let ((args Man-arguments)) | 1357 | (error "Not a man page buffer") |
| 1350 | (kill-buffer (current-buffer)) | ||
| 1351 | (error "Can't find the %s manpage" args)) | ||
| 1352 | (if (= (length Man-page-list) 1) | 1358 | (if (= (length Man-page-list) 1) |
| 1353 | (error "You're looking at the only manpage in the buffer") | 1359 | (error "You're looking at the only manpage in the buffer") |
| 1354 | (list (read-minibuffer (format "Go to manpage [1-%d]: " | 1360 | (list (read-minibuffer (format "Go to manpage [1-%d]: " |
| 1355 | (length Man-page-list))))))) | 1361 | (length Man-page-list))))))) |
| 1356 | (if (not Man-page-list) | 1362 | (if (and (not Man-page-list) (not noerror)) |
| 1357 | (let ((args Man-arguments)) | 1363 | (error "Not a man page buffer")) |
| 1358 | (kill-buffer (current-buffer)) | 1364 | (when Man-page-list |
| 1359 | (error "Can't find the %s manpage" args))) | 1365 | (if (or (< page 1) |
| 1360 | (if (or (< page 1) | 1366 | (> page (length Man-page-list))) |
| 1361 | (> page (length Man-page-list))) | 1367 | (error "No manpage %d found" page)) |
| 1362 | (error "No manpage %d found" page)) | 1368 | (let* ((page-range (nth (1- page) Man-page-list)) |
| 1363 | (let* ((page-range (nth (1- page) Man-page-list)) | 1369 | (page-start (car page-range)) |
| 1364 | (page-start (car page-range)) | 1370 | (page-end (car (cdr page-range)))) |
| 1365 | (page-end (car (cdr page-range)))) | 1371 | (setq Man-current-page page |
| 1366 | (setq Man-current-page page | 1372 | Man-page-mode-string (Man-make-page-mode-string)) |
| 1367 | Man-page-mode-string (Man-make-page-mode-string)) | 1373 | (widen) |
| 1368 | (widen) | 1374 | (goto-char page-start) |
| 1369 | (goto-char page-start) | 1375 | (narrow-to-region page-start page-end) |
| 1370 | (narrow-to-region page-start page-end) | 1376 | (Man-build-section-alist) |
| 1371 | (Man-build-section-alist) | 1377 | (Man-build-references-alist) |
| 1372 | (Man-build-references-alist) | 1378 | (goto-char (point-min))))) |
| 1373 | (goto-char (point-min)))) | ||
| 1374 | 1379 | ||
| 1375 | 1380 | ||
| 1376 | (defun Man-next-manpage () | 1381 | (defun Man-next-manpage () |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index e8647dfc221..330fead2393 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -743,6 +743,21 @@ These mean that the FTP process should (or already has) been killed." | |||
| 743 | :group 'ange-ftp | 743 | :group 'ange-ftp |
| 744 | :type 'regexp) | 744 | :type 'regexp) |
| 745 | 745 | ||
| 746 | (defcustom ange-ftp-potential-error-msgs | ||
| 747 | ;; On Mac OS X we sometimes get things like: | ||
| 748 | ;; | ||
| 749 | ;; ftp> open ftp.nluug.nl | ||
| 750 | ;; Trying 2001:610:1:80aa:192:87:102:36... | ||
| 751 | ;; ftp: connect to address 2001:610:1:80aa:192:87:102:36: No route to host | ||
| 752 | ;; Trying 192.87.102.36... | ||
| 753 | ;; Connected to ftp.nluug.nl. | ||
| 754 | "^ftp: connect to address .*: No route to host" | ||
| 755 | "*Regular expression matching ftp messages that can indicate serious errors. | ||
| 756 | These mean that something went wrong, but they may be followed by more | ||
| 757 | messages indicating that the error was somehow corrected." | ||
| 758 | :group 'ange-ftp | ||
| 759 | :type 'regexp) | ||
| 760 | |||
| 746 | (defcustom ange-ftp-gateway-fatal-msgs | 761 | (defcustom ange-ftp-gateway-fatal-msgs |
| 747 | "No route to host\\|Connection closed\\|No such host\\|Login incorrect" | 762 | "No route to host\\|Connection closed\\|No such host\\|Login incorrect" |
| 748 | "*Regular expression matching login failure messages from rlogin/telnet." | 763 | "*Regular expression matching login failure messages from rlogin/telnet." |
| @@ -1071,6 +1086,7 @@ All HOST values should be in lower case.") | |||
| 1071 | (defvar ange-ftp-xfer-size nil) | 1086 | (defvar ange-ftp-xfer-size nil) |
| 1072 | (defvar ange-ftp-process-string nil) | 1087 | (defvar ange-ftp-process-string nil) |
| 1073 | (defvar ange-ftp-process-result-line nil) | 1088 | (defvar ange-ftp-process-result-line nil) |
| 1089 | (defvar ange-ftp-pending-error-line nil) | ||
| 1074 | (defvar ange-ftp-process-busy nil) | 1090 | (defvar ange-ftp-process-busy nil) |
| 1075 | (defvar ange-ftp-process-result nil) | 1091 | (defvar ange-ftp-process-result nil) |
| 1076 | (defvar ange-ftp-process-multi-skip nil) | 1092 | (defvar ange-ftp-process-multi-skip nil) |
| @@ -1544,6 +1560,7 @@ good, skip, fatal, or unknown." | |||
| 1544 | ((string-match ange-ftp-good-msgs line) | 1560 | ((string-match ange-ftp-good-msgs line) |
| 1545 | (setq ange-ftp-process-busy nil | 1561 | (setq ange-ftp-process-busy nil |
| 1546 | ange-ftp-process-result t | 1562 | ange-ftp-process-result t |
| 1563 | ange-ftp-pending-error-line nil | ||
| 1547 | ange-ftp-process-result-line line)) | 1564 | ange-ftp-process-result-line line)) |
| 1548 | ;; Check this before checking for errors. | 1565 | ;; Check this before checking for errors. |
| 1549 | ;; Otherwise the last line of these three seems to be an error: | 1566 | ;; Otherwise the last line of these three seems to be an error: |
| @@ -1552,11 +1569,17 @@ good, skip, fatal, or unknown." | |||
| 1552 | ;; 230-"ftp.stsci.edu: unknown host", the new IP address will be... | 1569 | ;; 230-"ftp.stsci.edu: unknown host", the new IP address will be... |
| 1553 | ((string-match ange-ftp-multi-msgs line) | 1570 | ((string-match ange-ftp-multi-msgs line) |
| 1554 | (setq ange-ftp-process-multi-skip t)) | 1571 | (setq ange-ftp-process-multi-skip t)) |
| 1572 | ((string-match ange-ftp-potential-error-msgs line) | ||
| 1573 | ;; This looks like an error, but we have to keep reading the output | ||
| 1574 | ;; to see if it was fixed or not. E.g. it may indicate that IPv6 | ||
| 1575 | ;; failed, but maybe a subsequent IPv4 fallback succeeded. | ||
| 1576 | (set (make-local-variable 'ange-ftp-pending-error-line) line) | ||
| 1577 | t) | ||
| 1555 | ((string-match ange-ftp-fatal-msgs line) | 1578 | ((string-match ange-ftp-fatal-msgs line) |
| 1556 | (delete-process proc) | 1579 | (delete-process proc) |
| 1557 | (setq ange-ftp-process-busy nil | 1580 | (setq ange-ftp-process-busy nil |
| 1558 | ange-ftp-process-result-line line)) | 1581 | ange-ftp-process-result-line line)) |
| 1559 | (ange-ftp-process-multi-skip | 1582 | (ange-ftp-process-multi-skip |
| 1560 | t) | 1583 | t) |
| 1561 | (t | 1584 | (t |
| 1562 | (setq ange-ftp-process-busy nil | 1585 | (setq ange-ftp-process-busy nil |
| @@ -1651,12 +1674,21 @@ good, skip, fatal, or unknown." | |||
| 1651 | (string-match "\n" ange-ftp-process-string)) | 1674 | (string-match "\n" ange-ftp-process-string)) |
| 1652 | (let ((line (substring ange-ftp-process-string | 1675 | (let ((line (substring ange-ftp-process-string |
| 1653 | 0 | 1676 | 0 |
| 1654 | (match-beginning 0)))) | 1677 | (match-beginning 0))) |
| 1678 | (seen-prompt nil)) | ||
| 1655 | (setq ange-ftp-process-string (substring ange-ftp-process-string | 1679 | (setq ange-ftp-process-string (substring ange-ftp-process-string |
| 1656 | (match-end 0))) | 1680 | (match-end 0))) |
| 1657 | (while (string-match "^ftp> *" line) | 1681 | (while (string-match "^ftp> *" line) |
| 1682 | (setq seen-prompt t) | ||
| 1658 | (setq line (substring line (match-end 0)))) | 1683 | (setq line (substring line (match-end 0)))) |
| 1659 | (ange-ftp-process-handle-line line proc))) | 1684 | (if (not (and seen-prompt ange-ftp-pending-error-line)) |
| 1685 | (ange-ftp-process-handle-line line proc) | ||
| 1686 | ;; If we've seen a potential error message and it | ||
| 1687 | ;; hasn't been cancelled by a good message before | ||
| 1688 | ;; seeing a propt, then the error was real. | ||
| 1689 | (delete-process proc) | ||
| 1690 | (setq ange-ftp-process-busy nil | ||
| 1691 | ange-ftp-process-result-line ange-ftp-pending-error-line)))) | ||
| 1660 | 1692 | ||
| 1661 | ;; has the ftp client finished? if so then do some clean-up | 1693 | ;; has the ftp client finished? if so then do some clean-up |
| 1662 | ;; actions. | 1694 | ;; actions. |
| @@ -1988,7 +2020,7 @@ on the gateway machine to do the ftp instead." | |||
| 1988 | (make-local-variable 'comint-password-prompt-regexp) | 2020 | (make-local-variable 'comint-password-prompt-regexp) |
| 1989 | ;; This is a regexp that can't match anything. | 2021 | ;; This is a regexp that can't match anything. |
| 1990 | ;; ange-ftp has its own ways of handling passwords. | 2022 | ;; ange-ftp has its own ways of handling passwords. |
| 1991 | (setq comint-password-prompt-regexp "^a\\'z") | 2023 | (setq comint-password-prompt-regexp "\\`a\\`") |
| 1992 | (make-local-variable 'paragraph-start) | 2024 | (make-local-variable 'paragraph-start) |
| 1993 | (setq paragraph-start comint-prompt-regexp) | 2025 | (setq paragraph-start comint-prompt-regexp) |
| 1994 | (run-mode-hooks 'internal-ange-ftp-mode-hook)) | 2026 | (run-mode-hooks 'internal-ange-ftp-mode-hook)) |
| @@ -4543,9 +4575,9 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 4543 | (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired. | 4575 | (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired. |
| 4544 | 0) | 4576 | 0) |
| 4545 | 4577 | ||
| 4546 | ;;; This is turned off because it has nothing properly to do | 4578 | ;; This is turned off because it has nothing properly to do |
| 4547 | ;;; with dired. It could be reasonable to adapt this to | 4579 | ;; with dired. It could be reasonable to adapt this to |
| 4548 | ;;; replace ange-ftp-copy-file. | 4580 | ;; replace ange-ftp-copy-file. |
| 4549 | 4581 | ||
| 4550 | ;;;;; ------------------------------------------------------------ | 4582 | ;;;;; ------------------------------------------------------------ |
| 4551 | ;;;;; Noddy support for async copy-file within dired. | 4583 | ;;;;; Noddy support for async copy-file within dired. |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index d3cbf142222..ff41a964ecc 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -377,13 +377,13 @@ you may also want to change `compilation-page-delimiter'.") | |||
| 377 | '(;; configure output lines. | 377 | '(;; configure output lines. |
| 378 | ("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$" | 378 | ("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$" |
| 379 | (1 font-lock-variable-name-face) | 379 | (1 font-lock-variable-name-face) |
| 380 | (2 (compilation-face '(4 . 3)))) | 380 | (2 font-lock-keyword-face)) |
| 381 | ;; Command output lines. Recognize `make[n]:' lines too. | 381 | ;; Command output lines. Recognize `make[n]:' lines too. |
| 382 | ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" | 382 | ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" |
| 383 | (1 font-lock-function-name-face) (3 compilation-line-face nil t)) | 383 | (1 font-lock-function-name-face) (3 compilation-line-face nil t)) |
| 384 | (" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1) | 384 | (" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1) |
| 385 | ("^Compilation finished" . compilation-info-face) | 385 | ("^Compilation finished" . font-lock-keyword-face) |
| 386 | ("^Compilation exited abnormally" . compilation-error-face)) | 386 | ("^Compilation exited abnormally" . font-lock-keyword-face)) |
| 387 | "Additional things to highlight in Compilation mode. | 387 | "Additional things to highlight in Compilation mode. |
| 388 | This gets tacked on the end of the generated expressions.") | 388 | This gets tacked on the end of the generated expressions.") |
| 389 | 389 | ||
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 8a426a37365..8e574e912c6 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -524,9 +524,9 @@ Also display the main routine in the disassembly buffer if present." | |||
| 524 | (setq gdb-pending-triggers | 524 | (setq gdb-pending-triggers |
| 525 | (delq 'gdb-var-update gdb-pending-triggers)) | 525 | (delq 'gdb-var-update gdb-pending-triggers)) |
| 526 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | 526 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
| 527 | ;; dummy command to update speedbar at right time | 527 | ;; Dummy command to update speedbar at right time. |
| 528 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn)) | 528 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn)) |
| 529 | ;; keep gdb-pending-triggers non-nil till end | 529 | ;; Keep gdb-pending-triggers non-nil till end. |
| 530 | (push 'gdb-speedbar-timer gdb-pending-triggers))) | 530 | (push 'gdb-speedbar-timer gdb-pending-triggers))) |
| 531 | 531 | ||
| 532 | (defun gdb-speedbar-timer-fn () | 532 | (defun gdb-speedbar-timer-fn () |
| @@ -1023,7 +1023,7 @@ happens to be appropriate." | |||
| 1023 | (gdb-invalidate-threads) | 1023 | (gdb-invalidate-threads) |
| 1024 | (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. | 1024 | (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. |
| 1025 | ;; FIXME: with GDB-6 on Darwin, this might very well work. | 1025 | ;; FIXME: with GDB-6 on Darwin, this might very well work. |
| 1026 | ;; only needed/used with speedbar/watch expressions | 1026 | ;; Only needed/used with speedbar/watch expressions. |
| 1027 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | 1027 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
| 1028 | (setq gdb-var-changed t) ; force update | 1028 | (setq gdb-var-changed t) ; force update |
| 1029 | (dolist (var gdb-var-list) | 1029 | (dolist (var gdb-var-list) |
| @@ -1043,9 +1043,9 @@ happens to be appropriate." | |||
| 1043 | (if gdb-flush-pending-output | 1043 | (if gdb-flush-pending-output |
| 1044 | nil | 1044 | nil |
| 1045 | (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) | 1045 | (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) |
| 1046 | ;; Recall the left over gud-marker-acc from last time | 1046 | ;; Recall the left over gud-marker-acc from last time. |
| 1047 | (setq gud-marker-acc (concat gud-marker-acc string)) | 1047 | (setq gud-marker-acc (concat gud-marker-acc string)) |
| 1048 | ;; Start accumulating output for the GUD buffer | 1048 | ;; Start accumulating output for the GUD buffer. |
| 1049 | (let ((output "")) | 1049 | (let ((output "")) |
| 1050 | ;; | 1050 | ;; |
| 1051 | ;; Process all the complete markers in this chunk. | 1051 | ;; Process all the complete markers in this chunk. |
| @@ -1295,7 +1295,7 @@ static char *magick[] = { | |||
| 1295 | :weight bold)) | 1295 | :weight bold)) |
| 1296 | "Face for enabled breakpoint icon in fringe." | 1296 | "Face for enabled breakpoint icon in fringe." |
| 1297 | :group 'gud) | 1297 | :group 'gud) |
| 1298 | ;; compatibility alias for old name | 1298 | ;; Compatibility alias for old name. |
| 1299 | (put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled) | 1299 | (put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled) |
| 1300 | 1300 | ||
| 1301 | (defface breakpoint-disabled | 1301 | (defface breakpoint-disabled |
| @@ -1306,13 +1306,13 @@ static char *magick[] = { | |||
| 1306 | (((background light)) :foreground "grey40")) | 1306 | (((background light)) :foreground "grey40")) |
| 1307 | "Face for disabled breakpoint icon in fringe." | 1307 | "Face for disabled breakpoint icon in fringe." |
| 1308 | :group 'gud) | 1308 | :group 'gud) |
| 1309 | ;; compatibility alias for old name | 1309 | ;; Compatibility alias for old name. |
| 1310 | (put 'breakpoint-disabled-bitmap-face 'face-alias 'breakpoint-disabled) | 1310 | (put 'breakpoint-disabled-bitmap-face 'face-alias 'breakpoint-disabled) |
| 1311 | 1311 | ||
| 1312 | ;;-put breakpoint icons in relevant margins (even those set in the GUD buffer) | 1312 | ;; Put breakpoint icons in relevant margins (even those set in the GUD buffer). |
| 1313 | (defun gdb-info-breakpoints-custom () | 1313 | (defun gdb-info-breakpoints-custom () |
| 1314 | (let ((flag) (bptno)) | 1314 | (let ((flag) (bptno)) |
| 1315 | ;; remove all breakpoint-icons in source buffers but not assembler buffer | 1315 | ;; Remove all breakpoint-icons in source buffers but not assembler buffer. |
| 1316 | (dolist (buffer (buffer-list)) | 1316 | (dolist (buffer (buffer-list)) |
| 1317 | (with-current-buffer buffer | 1317 | (with-current-buffer buffer |
| 1318 | (if (and (eq gud-minor-mode 'gdba) | 1318 | (if (and (eq gud-minor-mode 'gdba) |
| @@ -1342,13 +1342,14 @@ static char *magick[] = { | |||
| 1342 | (setq file (cdr (assoc bptno gdb-location-alist)))) | 1342 | (setq file (cdr (assoc bptno gdb-location-alist)))) |
| 1343 | (if (and file | 1343 | (if (and file |
| 1344 | (not (string-equal file "File not found"))) | 1344 | (not (string-equal file "File not found"))) |
| 1345 | (with-current-buffer (find-file-noselect file) | 1345 | (with-current-buffer |
| 1346 | (find-file-noselect file 'nowarn) | ||
| 1346 | (set (make-local-variable 'gud-minor-mode) | 1347 | (set (make-local-variable 'gud-minor-mode) |
| 1347 | 'gdba) | 1348 | 'gdba) |
| 1348 | (set (make-local-variable 'tool-bar-map) | 1349 | (set (make-local-variable 'tool-bar-map) |
| 1349 | gud-tool-bar-map) | 1350 | gud-tool-bar-map) |
| 1350 | ;; only want one breakpoint icon at each | 1351 | ;; Only want one breakpoint icon at each |
| 1351 | ;; location | 1352 | ;; location. |
| 1352 | (save-excursion | 1353 | (save-excursion |
| 1353 | (goto-line (string-to-number line)) | 1354 | (goto-line (string-to-number line)) |
| 1354 | (gdb-put-breakpoint-icon (eq flag ?y) bptno))) | 1355 | (gdb-put-breakpoint-icon (eq flag ?y) bptno))) |
| @@ -1388,11 +1389,7 @@ static char *magick[] = { | |||
| 1388 | (with-selected-window (posn-window posn) | 1389 | (with-selected-window (posn-window posn) |
| 1389 | (save-excursion | 1390 | (save-excursion |
| 1390 | (goto-char (posn-point posn)) | 1391 | (goto-char (posn-point posn)) |
| 1391 | (if | 1392 | (if (posn-object posn) |
| 1392 | ; (or | ||
| 1393 | (posn-object posn) | ||
| 1394 | ; (eq (car (fringe-bitmaps-at-pos (posn-point posn))) | ||
| 1395 | ; 'breakpoint)) | ||
| 1396 | (gdb-enqueue-input | 1393 | (gdb-enqueue-input |
| 1397 | (list | 1394 | (list |
| 1398 | (let ((bptno (get-text-property | 1395 | (let ((bptno (get-text-property |
| @@ -1980,7 +1977,7 @@ corresponding to the mode line clicked." | |||
| 1980 | 'mouse-1 | 1977 | 'mouse-1 |
| 1981 | #'(lambda () (interactive) | 1978 | #'(lambda () (interactive) |
| 1982 | (let ((gdb-memory-address | 1979 | (let ((gdb-memory-address |
| 1983 | ;; let GDB do the arithmetic | 1980 | ;; Let GDB do the arithmetic. |
| 1984 | (concat | 1981 | (concat |
| 1985 | gdb-memory-address " - " | 1982 | gdb-memory-address " - " |
| 1986 | (number-to-string | 1983 | (number-to-string |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 8f6dd73cba1..dce17ed1306 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -277,7 +277,8 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 277 | (defvar grep-hit-face compilation-info-face | 277 | (defvar grep-hit-face compilation-info-face |
| 278 | "Face name to use for grep hits.") | 278 | "Face name to use for grep hits.") |
| 279 | 279 | ||
| 280 | (defvar grep-error-face compilation-error-face | 280 | ;; compilation-error-face is wrong for this; it's designed to look like a link. |
| 281 | (defvar grep-error-face font-lock-keyword-face | ||
| 281 | "Face name to use for grep error messages.") | 282 | "Face name to use for grep error messages.") |
| 282 | 283 | ||
| 283 | (defvar grep-match-face 'match | 284 | (defvar grep-match-face 'match |
| @@ -291,12 +292,12 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 291 | ;; remove match from grep-regexp-alist before fontifying | 292 | ;; remove match from grep-regexp-alist before fontifying |
| 292 | ("^Grep finished \\(?:(\\(matches found\\))\\|with \\(no matches found\\)\\).*" | 293 | ("^Grep finished \\(?:(\\(matches found\\))\\|with \\(no matches found\\)\\).*" |
| 293 | (0 '(face nil message nil help-echo nil mouse-face nil) t) | 294 | (0 '(face nil message nil help-echo nil mouse-face nil) t) |
| 294 | (1 grep-hit-face nil t) | 295 | (1 font-lock-keyword-face nil t) |
| 295 | (2 grep-error-face nil t)) | 296 | (2 font-lock-keyword-face nil t)) |
| 296 | ("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*" | 297 | ("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*" |
| 297 | (0 '(face nil message nil help-echo nil mouse-face nil) t) | 298 | (0 '(face nil message nil help-echo nil mouse-face nil) t) |
| 298 | (1 compilation-warning-face) | 299 | (1 grep-error-face) |
| 299 | (2 compilation-line-face)) | 300 | (2 grep-error-face)) |
| 300 | ;; Highlight grep matches and delete markers | 301 | ;; Highlight grep matches and delete markers |
| 301 | ("\\(\033\\[01;31m\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)" | 302 | ("\\(\033\\[01;31m\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)" |
| 302 | ;; Refontification does not work after the markers have been | 303 | ;; Refontification does not work after the markers have been |
diff --git a/lisp/ps-bdf.el b/lisp/ps-bdf.el index 97356b01029..c4e8a444aff 100644 --- a/lisp/ps-bdf.el +++ b/lisp/ps-bdf.el | |||
| @@ -272,18 +272,20 @@ CODE, where N and CODE are in the following relation: | |||
| 272 | (while (search-forward "\nSTARTCHAR" nil t) | 272 | (while (search-forward "\nSTARTCHAR" nil t) |
| 273 | (setq offset (line-beginning-position)) | 273 | (setq offset (line-beginning-position)) |
| 274 | (search-forward "\nENCODING") | 274 | (search-forward "\nENCODING") |
| 275 | (setq code (read (current-buffer)) | 275 | (setq code (read (current-buffer))) |
| 276 | code0 (lsh code -8) | 276 | (if (< code 0) |
| 277 | code1 (logand code 255) | 277 | (search-forward "ENDCHAR") |
| 278 | min-code (min min-code code) | 278 | (setq code0 (lsh code -8) |
| 279 | max-code (max max-code code) | 279 | code1 (logand code 255) |
| 280 | min-code0 (min min-code0 code0) | 280 | min-code (min min-code code) |
| 281 | max-code0 (max max-code0 code0) | 281 | max-code (max max-code code) |
| 282 | min-code1 (min min-code1 code1) | 282 | min-code0 (min min-code0 code0) |
| 283 | max-code1 (max max-code1 code1)) | 283 | max-code0 (max max-code0 code0) |
| 284 | (search-forward "ENDCHAR") | 284 | min-code1 (min min-code1 code1) |
| 285 | (setq maxlen (max maxlen (- (point) offset)) | 285 | max-code1 (max max-code1 code1)) |
| 286 | glyph-list (cons (cons code offset) glyph-list))) | 286 | (search-forward "ENDCHAR") |
| 287 | (setq maxlen (max maxlen (- (point) offset)) | ||
| 288 | glyph-list (cons (cons code offset) glyph-list)))) | ||
| 287 | 289 | ||
| 288 | (setq code-range | 290 | (setq code-range |
| 289 | (vector min-code0 max-code0 min-code1 max-code1 | 291 | (vector min-code0 max-code0 min-code1 max-code1 |
diff --git a/lisp/recentf.el b/lisp/recentf.el index 57280a7b4bc..dcb962c3f19 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el | |||
| @@ -65,7 +65,7 @@ You should define the options of your own filters in this group." | |||
| 65 | 65 | ||
| 66 | (defcustom recentf-max-saved-items 20 | 66 | (defcustom recentf-max-saved-items 20 |
| 67 | "*Maximum number of items of the recent list that will be saved. | 67 | "*Maximum number of items of the recent list that will be saved. |
| 68 | nil means to save the whole list. | 68 | A nil value means to save the whole list. |
| 69 | See the command `recentf-save-list'." | 69 | See the command `recentf-save-list'." |
| 70 | :group 'recentf | 70 | :group 'recentf |
| 71 | :type 'integer) | 71 | :type 'integer) |
| @@ -145,7 +145,7 @@ The default is to call `find-file' to edit the selected file." | |||
| 145 | 145 | ||
| 146 | (defcustom recentf-menu-filter nil | 146 | (defcustom recentf-menu-filter nil |
| 147 | "*Function used to filter files displayed in the recentf menu. | 147 | "*Function used to filter files displayed in the recentf menu. |
| 148 | nil means no filter. The following functions are predefined: | 148 | A nil value means no filter. The following functions are predefined: |
| 149 | 149 | ||
| 150 | - `recentf-sort-ascending' | 150 | - `recentf-sort-ascending' |
| 151 | Sort menu items in ascending order. | 151 | Sort menu items in ascending order. |
| @@ -199,16 +199,14 @@ elements (see `recentf-make-menu-element' for menu element form)." | |||
| 199 | :set 'recentf-menu-customization-changed) | 199 | :set 'recentf-menu-customization-changed) |
| 200 | 200 | ||
| 201 | (defcustom recentf-menu-append-commands-flag t | 201 | (defcustom recentf-menu-append-commands-flag t |
| 202 | "*non-nil means to append command items to the menu." | 202 | "*Non-nil means to append command items to the menu." |
| 203 | :group 'recentf | 203 | :group 'recentf |
| 204 | :type 'boolean | 204 | :type 'boolean |
| 205 | :set 'recentf-menu-customization-changed) | 205 | :set 'recentf-menu-customization-changed) |
| 206 | 206 | ||
| 207 | (defvaralias 'recentf-menu-append-commands-p | 207 | (define-obsolete-variable-alias 'recentf-menu-append-commands-p |
| 208 | 'recentf-menu-append-commands-flag) | 208 | 'recentf-menu-append-commands-flag |
| 209 | (make-obsolete-variable 'recentf-menu-append-commands-p | 209 | "22.1") |
| 210 | 'recentf-menu-append-commands-flag | ||
| 211 | "22.1") | ||
| 212 | 210 | ||
| 213 | (defcustom recentf-auto-cleanup 'mode | 211 | (defcustom recentf-auto-cleanup 'mode |
| 214 | "*Define when to automatically cleanup the recent list. | 212 | "*Define when to automatically cleanup the recent list. |
| @@ -244,7 +242,7 @@ cleanup the list." | |||
| 244 | (recentf-auto-cleanup)))) | 242 | (recentf-auto-cleanup)))) |
| 245 | 243 | ||
| 246 | (defcustom recentf-initialize-file-name-history t | 244 | (defcustom recentf-initialize-file-name-history t |
| 247 | "*non-nil means to initialize `file-name-history' with the recent list. | 245 | "*Non-nil means to initialize `file-name-history' with the recent list. |
| 248 | If `file-name-history' is not empty, do nothing." | 246 | If `file-name-history' is not empty, do nothing." |
| 249 | :group 'recentf | 247 | :group 'recentf |
| 250 | :type 'boolean) | 248 | :type 'boolean) |
| @@ -350,8 +348,8 @@ filenames." | |||
| 350 | (defsubst recentf-expand-file-name (name) | 348 | (defsubst recentf-expand-file-name (name) |
| 351 | "Convert filename NAME to absolute, and canonicalize it. | 349 | "Convert filename NAME to absolute, and canonicalize it. |
| 352 | See also the function `expand-file-name'. | 350 | See also the function `expand-file-name'. |
| 353 | If defined, call the function `recentf-filename-handler' to post | 351 | If defined, call the function `recentf-filename-handler' |
| 354 | process the canonical name." | 352 | to postprocess the canonical name." |
| 355 | (let* ((filename (expand-file-name name))) | 353 | (let* ((filename (expand-file-name name))) |
| 356 | (or (and recentf-filename-handler | 354 | (or (and recentf-filename-handler |
| 357 | (funcall recentf-filename-handler filename)) | 355 | (funcall recentf-filename-handler filename)) |
| @@ -557,7 +555,7 @@ menu-elements (no sub-menu)." | |||
| 557 | 555 | ||
| 558 | (defun recentf-clear-data () | 556 | (defun recentf-clear-data () |
| 559 | "Clear data used to build the recentf menu. | 557 | "Clear data used to build the recentf menu. |
| 560 | This force a rebuild of the menu." | 558 | This forces a rebuild of the menu." |
| 561 | (easy-menu-remove-item (recentf-menu-bar) | 559 | (easy-menu-remove-item (recentf-menu-bar) |
| 562 | recentf-menu-path recentf-menu-title) | 560 | recentf-menu-path recentf-menu-title) |
| 563 | (setq recentf-data-cache nil)) | 561 | (setq recentf-data-cache nil)) |
| @@ -703,7 +701,7 @@ defined." | |||
| 703 | 701 | ||
| 704 | (defcustom recentf-arrange-by-rule-subfilter nil | 702 | (defcustom recentf-arrange-by-rule-subfilter nil |
| 705 | "*Function called by a rule based filter to filter sub-menu elements. | 703 | "*Function called by a rule based filter to filter sub-menu elements. |
| 706 | nil means no filter. See also `recentf-menu-filter'. | 704 | A nil value means no filter. See also `recentf-menu-filter'. |
| 707 | You can't use another rule based filter here." | 705 | You can't use another rule based filter here." |
| 708 | :group 'recentf-filters | 706 | :group 'recentf-filters |
| 709 | :type '(choice (const nil) function) | 707 | :type '(choice (const nil) function) |
diff --git a/lisp/simple.el b/lisp/simple.el index 32b83c465ae..7d6a9febb3b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3491,8 +3491,8 @@ Outline mode sets this." | |||
| 3491 | ;; at least go to end of line. | 3491 | ;; at least go to end of line. |
| 3492 | (end-of-line)) | 3492 | (end-of-line)) |
| 3493 | ((< arg 0) | 3493 | ((< arg 0) |
| 3494 | ;; If we did not move down as far as desired, | 3494 | ;; If we did not move up as far as desired, |
| 3495 | ;; at least go to end of line. | 3495 | ;; at least go to beginning of line. |
| 3496 | (beginning-of-line)) | 3496 | (beginning-of-line)) |
| 3497 | (t | 3497 | (t |
| 3498 | (line-move-finish (or goal-column temporary-goal-column) | 3498 | (line-move-finish (or goal-column temporary-goal-column) |
diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index 45e68750cb3..a40486ffd07 100644 --- a/lisp/smerge-mode.el +++ b/lisp/smerge-mode.el | |||
| @@ -670,7 +670,7 @@ buffer names." | |||
| 670 | (ediff-cleanup-mess) | 670 | (ediff-cleanup-mess) |
| 671 | (with-current-buffer buf | 671 | (with-current-buffer buf |
| 672 | (erase-buffer) | 672 | (erase-buffer) |
| 673 | (insert-buffer buffer-C) | 673 | (insert-buffer-substring buffer-C) |
| 674 | (kill-buffer buffer-A) | 674 | (kill-buffer buffer-A) |
| 675 | (kill-buffer buffer-B) | 675 | (kill-buffer buffer-B) |
| 676 | (kill-buffer buffer-C) | 676 | (kill-buffer buffer-C) |
diff --git a/lisp/startup.el b/lisp/startup.el index 2f71a9ba352..59fdc75dd09 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -575,7 +575,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 575 | 575 | ||
| 576 | ;; Choose a reasonable location for temporary files. | 576 | ;; Choose a reasonable location for temporary files. |
| 577 | (custom-reevaluate-setting 'temporary-file-directory) | 577 | (custom-reevaluate-setting 'temporary-file-directory) |
| 578 | (custom-reevaluate-setting 'small-emporary-file-directory) | 578 | (custom-reevaluate-setting 'small-temporary-file-directory) |
| 579 | (custom-reevaluate-setting 'auto-save-file-name-transforms) | 579 | (custom-reevaluate-setting 'auto-save-file-name-transforms) |
| 580 | 580 | ||
| 581 | ;; See if we should import version-control from the environment variable. | 581 | ;; See if we should import version-control from the environment variable. |
| @@ -984,7 +984,13 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 984 | (setq term | 984 | (setq term |
| 985 | (if (setq hyphend (string-match "[-_][^-_]+$" term)) | 985 | (if (setq hyphend (string-match "[-_][^-_]+$" term)) |
| 986 | (substring term 0 hyphend) | 986 | (substring term 0 hyphend) |
| 987 | nil))))) | 987 | nil))) |
| 988 | (when term | ||
| 989 | ;; The terminal file has been loaded, now call the terminal | ||
| 990 | ;; specific initialization function. | ||
| 991 | (let ((term-init-func (intern (concat "terminal-init-" term)))) | ||
| 992 | (when (fboundp term-init-func) | ||
| 993 | (funcall term-init-func)))))) | ||
| 988 | 994 | ||
| 989 | ;; Update the out-of-memory error message based on user's key bindings | 995 | ;; Update the out-of-memory error message based on user's key bindings |
| 990 | ;; for save-some-buffers. | 996 | ;; for save-some-buffers. |
| @@ -1346,7 +1352,7 @@ You can do basic editing with the menu bar and scroll bar using the mouse. | |||
| 1346 | 1352 | ||
| 1347 | Useful File menu items: | 1353 | Useful File menu items: |
| 1348 | Exit Emacs (or type Control-x followed by Control-c) | 1354 | Exit Emacs (or type Control-x followed by Control-c) |
| 1349 | Recover Session Recover files you were editing before a crash | 1355 | Recover Crashed Session Recover files you were editing before a crash |
| 1350 | 1356 | ||
| 1351 | Important Help menu items: | 1357 | Important Help menu items: |
| 1352 | Emacs Tutorial Learn how to use Emacs efficiently | 1358 | Emacs Tutorial Learn how to use Emacs efficiently |
diff --git a/lisp/tempo.el b/lisp/tempo.el index 915d3a430d8..282885e2d65 100644 --- a/lisp/tempo.el +++ b/lisp/tempo.el | |||
| @@ -303,7 +303,7 @@ mode, ON-REGION is ignored and assumed true if the region is active." | |||
| 303 | transient-mark-mode | 303 | transient-mark-mode |
| 304 | mark-active) | 304 | mark-active) |
| 305 | (if (featurep 'xemacs) | 305 | (if (featurep 'xemacs) |
| 306 | zmacs-regions (mark))) | 306 | (and zmacs-regions (mark)))) |
| 307 | (setq on-region t)) | 307 | (setq on-region t)) |
| 308 | (and on-region | 308 | (and on-region |
| 309 | (set-marker tempo-region-start (min (mark) (point))) | 309 | (set-marker tempo-region-start (min (mark) (point))) |
diff --git a/lisp/term/README b/lisp/term/README index 76c64435af1..581f321d3ba 100644 --- a/lisp/term/README +++ b/lisp/term/README | |||
| @@ -8,7 +8,12 @@ that exists, the last hyphen and what follows it is stripped. If that doesn't | |||
| 8 | yield a file that exists, the previous hyphen is stripped, and so on until all | 8 | yield a file that exists, the previous hyphen is stripped, and so on until all |
| 9 | hyphens are gone. For example, if the terminal type is `aaa-48-foo', Emacs | 9 | hyphens are gone. For example, if the terminal type is `aaa-48-foo', Emacs |
| 10 | will try first `term/aaa-48-foo.el', then `term/aaa-48.el' and finally | 10 | will try first `term/aaa-48-foo.el', then `term/aaa-48.el' and finally |
| 11 | `term/aaa.el'. | 11 | `term/aaa.el'. Each terminal specific file should contain a function |
| 12 | named terminal-init-TERMINALNAME (eg terminal-init-aaa-48 for | ||
| 13 | term/aaa-48.el) that Emacs will call in order to initialize the | ||
| 14 | terminal. The terminal files should not contain any top level forms | ||
| 15 | that are executed when the file is loaded, all the initialization | ||
| 16 | actions are performed by the terminal-init-TERMINALNAME functions. | ||
| 12 | 17 | ||
| 13 | When writing terminal packages, there are some things it is good to keep in | 18 | When writing terminal packages, there are some things it is good to keep in |
| 14 | mind. | 19 | mind. |
diff --git a/lisp/term/apollo.el b/lisp/term/apollo.el index 1d04fd35245..749ff85a0a6 100644 --- a/lisp/term/apollo.el +++ b/lisp/term/apollo.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | 2 | (defun terminal-init-apollo () | |
| 3 | (load "term/vt100" nil t) | 3 | "Terminal initialization function for apollo." |
| 4 | (load "term/vt100" nil t)) | ||
| 4 | 5 | ||
| 5 | ;;; arch-tag: c72f446f-e6b7-4749-90a4-bd68632adacf | 6 | ;;; arch-tag: c72f446f-e6b7-4749-90a4-bd68632adacf |
| 6 | ;;; apollo.el ends here | 7 | ;;; apollo.el ends here |
diff --git a/lisp/term/bobcat.el b/lisp/term/bobcat.el index b11a4ff8309..82401f7bf71 100644 --- a/lisp/term/bobcat.el +++ b/lisp/term/bobcat.el | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;;; HP terminals usually encourage using ^H as the rubout character | 2 | |
| 3 | (keyboard-translate ?\177 ?\^h) | 3 | (defun terminal-init-bobcat () |
| 4 | (keyboard-translate ?\^h ?\177) | 4 | "Terminal initialization function for bobcat." |
| 5 | ;; HP terminals usually encourage using ^H as the rubout character | ||
| 6 | (keyboard-translate ?\177 ?\^h) | ||
| 7 | (keyboard-translate ?\^h ?\177)) | ||
| 5 | 8 | ||
| 6 | ;;; arch-tag: 754e4520-0a3e-4e6e-8ca5-9481b1f85cf7 | 9 | ;;; arch-tag: 754e4520-0a3e-4e6e-8ca5-9481b1f85cf7 |
| 7 | ;;; bobcat.el ends here | 10 | ;;; bobcat.el ends here |
diff --git a/lisp/term/cygwin.el b/lisp/term/cygwin.el new file mode 100644 index 00000000000..3bdd5d3aa05 --- /dev/null +++ b/lisp/term/cygwin.el | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | ;;; cygwin.el --- support for the Cygwin terminal -*- no-byte-compile: t -*- | ||
| 2 | |||
| 3 | ;;; The Cygwin terminal can't really display underlines. | ||
| 4 | |||
| 5 | (defun terminal-init-cygwin () | ||
| 6 | "Terminal initialization function for cygwin." | ||
| 7 | (tty-no-underline)) | ||
| 8 | |||
| 9 | ;; arch-tag: ca81ce67-3c41-4883-a29b-4c3d64a21191 | ||
| 10 | ;;; cygwin.el ends here | ||
diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index eae2f419378..ef59860b606 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps -*- no-byte-compile: t -*- | 1 | ;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dan Nicolaescu <dann@ics.uci.edu> | 5 | ;; Author: Dan Nicolaescu <dann@ics.uci.edu> |
| 6 | 6 | ||
| @@ -25,302 +25,306 @@ | |||
| 25 | 25 | ||
| 26 | ;;; Code: | 26 | ;;; Code: |
| 27 | 27 | ||
| 28 | (define-key function-key-map "\e[120q" [S-escape]) | 28 | (defun iris-ansi-initialize-terminal () |
| 29 | (define-key function-key-map "\e[121q" [C-escape]) | 29 | "Terminal initialization function for iris-ansi." |
| 30 | 30 | (define-key function-key-map "\e[120q" [S-escape]) | |
| 31 | (define-key function-key-map "\e[001q" [f1]) | 31 | (define-key function-key-map "\e[121q" [C-escape]) |
| 32 | (define-key function-key-map "\e[013q" [S-f1]) | 32 | |
| 33 | (define-key function-key-map "\e[025q" [C-f1]) | 33 | (define-key function-key-map "\e[001q" [f1]) |
| 34 | 34 | (define-key function-key-map "\e[013q" [S-f1]) | |
| 35 | 35 | (define-key function-key-map "\e[025q" [C-f1]) | |
| 36 | (define-key function-key-map "\e[002q" [f2]) | 36 | |
| 37 | (define-key function-key-map "\e[014q" [S-f2]) | 37 | |
| 38 | (define-key function-key-map "\e[026q" [C-f2]) | 38 | (define-key function-key-map "\e[002q" [f2]) |
| 39 | (define-key function-key-map "\e[038q" [M-f2]) | 39 | (define-key function-key-map "\e[014q" [S-f2]) |
| 40 | 40 | (define-key function-key-map "\e[026q" [C-f2]) | |
| 41 | (define-key function-key-map "\e[003q" [f3]) | 41 | (define-key function-key-map "\e[038q" [M-f2]) |
| 42 | (define-key function-key-map "\e[015q" [S-f3]) | 42 | |
| 43 | (define-key function-key-map "\e[027q" [C-f3]) | 43 | (define-key function-key-map "\e[003q" [f3]) |
| 44 | 44 | (define-key function-key-map "\e[015q" [S-f3]) | |
| 45 | 45 | (define-key function-key-map "\e[027q" [C-f3]) | |
| 46 | (define-key function-key-map "\e[004q" [f4]) | 46 | |
| 47 | (define-key function-key-map "\e[016q" [S-f4]) | 47 | |
| 48 | (define-key function-key-map "\e[028q" [C-f4]) | 48 | (define-key function-key-map "\e[004q" [f4]) |
| 49 | 49 | (define-key function-key-map "\e[016q" [S-f4]) | |
| 50 | 50 | (define-key function-key-map "\e[028q" [C-f4]) | |
| 51 | (define-key function-key-map "\e[005q" [f5]) | 51 | |
| 52 | (define-key function-key-map "\e[017q" [S-f5]) | 52 | |
| 53 | (define-key function-key-map "\e[029q" [C-f5]) | 53 | (define-key function-key-map "\e[005q" [f5]) |
| 54 | 54 | (define-key function-key-map "\e[017q" [S-f5]) | |
| 55 | 55 | (define-key function-key-map "\e[029q" [C-f5]) | |
| 56 | (define-key function-key-map "\e[006q" [f6]) | 56 | |
| 57 | (define-key function-key-map "\e[018q" [S-f6]) | 57 | |
| 58 | (define-key function-key-map "\e[030q" [C-f6]) | 58 | (define-key function-key-map "\e[006q" [f6]) |
| 59 | 59 | (define-key function-key-map "\e[018q" [S-f6]) | |
| 60 | 60 | (define-key function-key-map "\e[030q" [C-f6]) | |
| 61 | (define-key function-key-map "\e[007q" [f7]) | 61 | |
| 62 | (define-key function-key-map "\e[019q" [S-f7]) | 62 | |
| 63 | (define-key function-key-map "\e[031q" [C-f7]) | 63 | (define-key function-key-map "\e[007q" [f7]) |
| 64 | 64 | (define-key function-key-map "\e[019q" [S-f7]) | |
| 65 | 65 | (define-key function-key-map "\e[031q" [C-f7]) | |
| 66 | (define-key function-key-map "\e[008q" [f8]) | 66 | |
| 67 | (define-key function-key-map "\e[020q" [S-f8]) | 67 | |
| 68 | (define-key function-key-map "\e[032q" [C-f8]) | 68 | (define-key function-key-map "\e[008q" [f8]) |
| 69 | 69 | (define-key function-key-map "\e[020q" [S-f8]) | |
| 70 | 70 | (define-key function-key-map "\e[032q" [C-f8]) | |
| 71 | (define-key function-key-map "\e[009q" [f9]) | 71 | |
| 72 | (define-key function-key-map "\e[021q" [S-f9]) | 72 | |
| 73 | (define-key function-key-map "\e[033q" [C-f9]) | 73 | (define-key function-key-map "\e[009q" [f9]) |
| 74 | 74 | (define-key function-key-map "\e[021q" [S-f9]) | |
| 75 | 75 | (define-key function-key-map "\e[033q" [C-f9]) | |
| 76 | (define-key function-key-map "\e[010q" [f10]) | 76 | |
| 77 | (define-key function-key-map "\e[022q" [S-f10]) | 77 | |
| 78 | (define-key function-key-map "\e[034q" [C-f10]) | 78 | (define-key function-key-map "\e[010q" [f10]) |
| 79 | 79 | (define-key function-key-map "\e[022q" [S-f10]) | |
| 80 | 80 | (define-key function-key-map "\e[034q" [C-f10]) | |
| 81 | (define-key function-key-map "\e[011q" [f11]) | 81 | |
| 82 | (define-key function-key-map "\e[023q" [S-f11]) | 82 | |
| 83 | (define-key function-key-map "\e[035q" [C-f11]) | 83 | (define-key function-key-map "\e[011q" [f11]) |
| 84 | (define-key function-key-map "\e[047q" [M-f11]) | 84 | (define-key function-key-map "\e[023q" [S-f11]) |
| 85 | 85 | (define-key function-key-map "\e[035q" [C-f11]) | |
| 86 | (define-key function-key-map "\e[012q" [f12]) | 86 | (define-key function-key-map "\e[047q" [M-f11]) |
| 87 | (define-key function-key-map "\e[024q" [S-f12]) | 87 | |
| 88 | (define-key function-key-map "\e[036q" [C-f12]) | 88 | (define-key function-key-map "\e[012q" [f12]) |
| 89 | (define-key function-key-map "\e[048q" [M-f12]) | 89 | (define-key function-key-map "\e[024q" [S-f12]) |
| 90 | 90 | (define-key function-key-map "\e[036q" [C-f12]) | |
| 91 | 91 | (define-key function-key-map "\e[048q" [M-f12]) | |
| 92 | (define-key function-key-map "\e[057q" [C-`]) | 92 | |
| 93 | (define-key function-key-map "\e[115q" [M-`]) | 93 | |
| 94 | 94 | (define-key function-key-map "\e[057q" [?\C-`]) | |
| 95 | (define-key function-key-map "\e[049q" [?\C-1]) | 95 | (define-key function-key-map "\e[115q" [?\M-`]) |
| 96 | (define-key function-key-map "\e[058q" [?\M-1]) | 96 | |
| 97 | 97 | (define-key function-key-map "\e[049q" [?\C-1]) | |
| 98 | 98 | (define-key function-key-map "\e[058q" [?\M-1]) | |
| 99 | (define-key function-key-map "\e[059q" [?\M-2]) | 99 | |
| 100 | 100 | ||
| 101 | (define-key function-key-map "\e[050q" [?\C-3]) | 101 | (define-key function-key-map "\e[059q" [?\M-2]) |
| 102 | (define-key function-key-map "\e[060q" [?\M-3]) | 102 | |
| 103 | 103 | (define-key function-key-map "\e[050q" [?\C-3]) | |
| 104 | (define-key function-key-map "\e[051q" [?\C-4]) | 104 | (define-key function-key-map "\e[060q" [?\M-3]) |
| 105 | (define-key function-key-map "\e[061q" [?\M-4]) | 105 | |
| 106 | 106 | (define-key function-key-map "\e[051q" [?\C-4]) | |
| 107 | (define-key function-key-map "\e[052q" [?\C-5]) | 107 | (define-key function-key-map "\e[061q" [?\M-4]) |
| 108 | (define-key function-key-map "\e[062q" [?\M-5]) | 108 | |
| 109 | 109 | (define-key function-key-map "\e[052q" [?\C-5]) | |
| 110 | 110 | (define-key function-key-map "\e[062q" [?\M-5]) | |
| 111 | (define-key function-key-map "\e[063q" [?\M-6]) | 111 | |
| 112 | 112 | ||
| 113 | (define-key function-key-map "\e[053q" [?\C-7]) | 113 | (define-key function-key-map "\e[063q" [?\M-6]) |
| 114 | (define-key function-key-map "\e[064q" [?\M-7]) | 114 | |
| 115 | 115 | (define-key function-key-map "\e[053q" [?\C-7]) | |
| 116 | (define-key function-key-map "\e[054q" [?\C-8]) | 116 | (define-key function-key-map "\e[064q" [?\M-7]) |
| 117 | (define-key function-key-map "\e[065q" [?\M-8]) | 117 | |
| 118 | 118 | (define-key function-key-map "\e[054q" [?\C-8]) | |
| 119 | (define-key function-key-map "\e[055q" [?\C-9]) | 119 | (define-key function-key-map "\e[065q" [?\M-8]) |
| 120 | (define-key function-key-map "\e[066q" [?\M-9]) | 120 | |
| 121 | 121 | (define-key function-key-map "\e[055q" [?\C-9]) | |
| 122 | (define-key function-key-map "\e[056q" [?\C-0]) | 122 | (define-key function-key-map "\e[066q" [?\M-9]) |
| 123 | (define-key function-key-map "\e[067q" [?\M-0]) | 123 | |
| 124 | 124 | (define-key function-key-map "\e[056q" [?\C-0]) | |
| 125 | (define-key function-key-map "\e[068q" [?\M--]) | 125 | (define-key function-key-map "\e[067q" [?\M-0]) |
| 126 | 126 | ||
| 127 | (define-key function-key-map "\e[069q" [?\C-=]) | 127 | (define-key function-key-map "\e[068q" [?\M--]) |
| 128 | (define-key function-key-map "\e[070q" [?\M-=]) | 128 | |
| 129 | 129 | (define-key function-key-map "\e[069q" [?\C-=]) | |
| 130 | ;; I don't know what to do with those. | 130 | (define-key function-key-map "\e[070q" [?\M-=]) |
| 131 | ;(define-key function-key-map "^H" [<del>]) | 131 | |
| 132 | ;(define-key function-key-map "^H" [S-<del>]) | 132 | ;; I don't know what to do with those. |
| 133 | ;(define-key function-key-map "\177" [C-<del>]) | 133 | ;;(define-key function-key-map "^H" [<del>]) |
| 134 | ;(define-key function-key-map "\e[071q" [M-<del>]) | 134 | ;;(define-key function-key-map "^H" [S-<del>]) |
| 135 | 135 | ;;(define-key function-key-map "\177" [C-<del>]) | |
| 136 | (define-key function-key-map "\e[Z" [?\S-\t]) | 136 | ;;(define-key function-key-map "\e[071q" [M-<del>]) |
| 137 | (define-key function-key-map "\e[072q" [?\C-\t]) | 137 | |
| 138 | ;; This only works if you remove the M-TAB keybing from the system.4Dwmrc | 138 | (define-key function-key-map "\e[Z" [?\S-\t]) |
| 139 | ;; our your ~/.4Dwmrc, if you use the 4Dwm window manager. | 139 | (define-key function-key-map "\e[072q" [?\C-\t]) |
| 140 | (define-key function-key-map "\e[073q" [?\M-\t]) | 140 | ;; This only works if you remove the M-TAB keybing from the system.4Dwmrc |
| 141 | 141 | ;; our your ~/.4Dwmrc, if you use the 4Dwm window manager. | |
| 142 | (define-key function-key-map "\e[074q" [?\M-q]) | 142 | (define-key function-key-map "\e[073q" [?\M-\t]) |
| 143 | 143 | ||
| 144 | (define-key function-key-map "\e[075q" [?\M-w]) | 144 | (define-key function-key-map "\e[074q" [?\M-q]) |
| 145 | 145 | ||
| 146 | (define-key function-key-map "\e[076q" [?\M-e]) | 146 | (define-key function-key-map "\e[075q" [?\M-w]) |
| 147 | 147 | ||
| 148 | (define-key function-key-map "\e[077q" [?\M-r]) | 148 | (define-key function-key-map "\e[076q" [?\M-e]) |
| 149 | 149 | ||
| 150 | (define-key function-key-map "\e[078q" [?\M-t]) | 150 | (define-key function-key-map "\e[077q" [?\M-r]) |
| 151 | 151 | ||
| 152 | (define-key function-key-map "\e[079q" [?\M-y]) | 152 | (define-key function-key-map "\e[078q" [?\M-t]) |
| 153 | 153 | ||
| 154 | (define-key function-key-map "\e[080q" [?\M-u]) | 154 | (define-key function-key-map "\e[079q" [?\M-y]) |
| 155 | 155 | ||
| 156 | (define-key function-key-map "\e[081q" [?\M-i]) | 156 | (define-key function-key-map "\e[080q" [?\M-u]) |
| 157 | 157 | ||
| 158 | (define-key function-key-map "\e[082q" [?\M-o]) | 158 | (define-key function-key-map "\e[081q" [?\M-i]) |
| 159 | 159 | ||
| 160 | (define-key function-key-map "\e[083q" [?\M-p]) | 160 | (define-key function-key-map "\e[082q" [?\M-o]) |
| 161 | 161 | ||
| 162 | (define-key function-key-map "\e[084q" [?\M-\[]) | 162 | (define-key function-key-map "\e[083q" [?\M-p]) |
| 163 | 163 | ||
| 164 | (define-key function-key-map "\e[085q" [?\M-\]]) | 164 | (define-key function-key-map "\e[084q" [?\M-\[]) |
| 165 | 165 | ||
| 166 | (define-key function-key-map "\e[086q" [?\M-\\]) | 166 | (define-key function-key-map "\e[085q" [?\M-\]]) |
| 167 | 167 | ||
| 168 | (define-key function-key-map "\e[087q" [?\M-a]) | 168 | (define-key function-key-map "\e[086q" [?\M-\\]) |
| 169 | 169 | ||
| 170 | (define-key function-key-map "\e[088q" [?\M-s]) | 170 | (define-key function-key-map "\e[087q" [?\M-a]) |
| 171 | 171 | ||
| 172 | (define-key function-key-map "\e[089q" [?\M-d]) | 172 | (define-key function-key-map "\e[088q" [?\M-s]) |
| 173 | 173 | ||
| 174 | (define-key function-key-map "\e[090q" [?\M-f]) | 174 | (define-key function-key-map "\e[089q" [?\M-d]) |
| 175 | 175 | ||
| 176 | (define-key function-key-map "\e[091q" [?\M-g]) | 176 | (define-key function-key-map "\e[090q" [?\M-f]) |
| 177 | 177 | ||
| 178 | (define-key function-key-map "\e[092q" [?\M-h]) | 178 | (define-key function-key-map "\e[091q" [?\M-g]) |
| 179 | 179 | ||
| 180 | (define-key function-key-map "\e[093q" [?\M-j]) | 180 | (define-key function-key-map "\e[092q" [?\M-h]) |
| 181 | 181 | ||
| 182 | (define-key function-key-map "\e[094q" [?\M-k]) | 182 | (define-key function-key-map "\e[093q" [?\M-j]) |
| 183 | 183 | ||
| 184 | (define-key function-key-map "\e[095q" [?\M-l]) | 184 | (define-key function-key-map "\e[094q" [?\M-k]) |
| 185 | 185 | ||
| 186 | (define-key function-key-map "\e[096q" [?\C-\;]) | 186 | (define-key function-key-map "\e[095q" [?\M-l]) |
| 187 | (define-key function-key-map "\e[097q" [?\M-:]) ;; we are cheating | 187 | |
| 188 | ;; here, this is realy | 188 | (define-key function-key-map "\e[096q" [?\C-\;]) |
| 189 | ;; M-;, but M-: | 189 | (define-key function-key-map "\e[097q" [?\M-:]) ;; we are cheating |
| 190 | ;; generates the same | 190 | ;; here, this is |
| 191 | ;; string and is more | 191 | ;; realy M-;, but |
| 192 | ;; usefull. | 192 | ;; M-: generates the |
| 193 | 193 | ;; same string and | |
| 194 | (define-key function-key-map "\e[098q" [?\C-']) | 194 | ;; is more usefull. |
| 195 | (define-key function-key-map "\e[099q" [?\M-']) | 195 | |
| 196 | 196 | (define-key function-key-map "\e[098q" [?\C-']) | |
| 197 | (define-key function-key-map "\e[100q" [?\M-\n]) | 197 | (define-key function-key-map "\e[099q" [?\M-']) |
| 198 | 198 | ||
| 199 | (define-key function-key-map "\e[101q" [?\M-z]) | 199 | (define-key function-key-map "\e[100q" [?\M-\n]) |
| 200 | 200 | ||
| 201 | (define-key function-key-map "\e[102q" [?\M-x]) | 201 | (define-key function-key-map "\e[101q" [?\M-z]) |
| 202 | 202 | ||
| 203 | (define-key function-key-map "\e[103q" [?\M-c]) | 203 | (define-key function-key-map "\e[102q" [?\M-x]) |
| 204 | 204 | ||
| 205 | (define-key function-key-map "\e[104q" [?\M-v]) | 205 | (define-key function-key-map "\e[103q" [?\M-c]) |
| 206 | 206 | ||
| 207 | (define-key function-key-map "\e[105q" [?\M-b]) | 207 | (define-key function-key-map "\e[104q" [?\M-v]) |
| 208 | 208 | ||
| 209 | (define-key function-key-map "\e[106q" [M-n]) | 209 | (define-key function-key-map "\e[105q" [?\M-b]) |
| 210 | 210 | ||
| 211 | (define-key function-key-map "\e[107q" [M-m]) | 211 | (define-key function-key-map "\e[106q" [M-n]) |
| 212 | 212 | ||
| 213 | (define-key function-key-map "\e[108q" [?\C-,]) | 213 | (define-key function-key-map "\e[107q" [M-m]) |
| 214 | (define-key function-key-map "\e[109q" [?\M-,]) | 214 | |
| 215 | 215 | (define-key function-key-map "\e[108q" [?\C-,]) | |
| 216 | (define-key function-key-map "\e[110q" [?\C-.]) | 216 | (define-key function-key-map "\e[109q" [?\M-,]) |
| 217 | (define-key function-key-map "\e[111q" [?\M-.]) | 217 | |
| 218 | 218 | (define-key function-key-map "\e[110q" [?\C-.]) | |
| 219 | (define-key function-key-map "\e[112q" [?\C-/]) | 219 | (define-key function-key-map "\e[111q" [?\M-.]) |
| 220 | (define-key function-key-map "\e[113q" [?\M-/]) | 220 | |
| 221 | 221 | (define-key function-key-map "\e[112q" [?\C-/]) | |
| 222 | (define-key function-key-map "\e[139q" [insert]) | 222 | (define-key function-key-map "\e[113q" [?\M-/]) |
| 223 | (define-key function-key-map "\e[139q" [S-insert]) | 223 | |
| 224 | (define-key function-key-map "\e[140q" [C-insert]) | 224 | (define-key function-key-map "\e[139q" [insert]) |
| 225 | (define-key function-key-map "\e[141q" [M-insert]) | 225 | (define-key function-key-map "\e[139q" [S-insert]) |
| 226 | 226 | (define-key function-key-map "\e[140q" [C-insert]) | |
| 227 | (define-key function-key-map "\e[H" [home]) | 227 | (define-key function-key-map "\e[141q" [M-insert]) |
| 228 | (define-key function-key-map "\e[143q" [S-home]) | 228 | |
| 229 | (define-key function-key-map "\e[144q" [C-home]) | 229 | (define-key function-key-map "\e[H" [home]) |
| 230 | 230 | (define-key function-key-map "\e[143q" [S-home]) | |
| 231 | 231 | (define-key function-key-map "\e[144q" [C-home]) | |
| 232 | (define-key function-key-map "\e[150q" [prior]) | 232 | |
| 233 | (define-key function-key-map "\e[151q" [S-prior]) ;; those don't seem | 233 | |
| 234 | (define-key function-key-map "\e[150q" [prior]) | ||
| 235 | (define-key function-key-map "\e[151q" [S-prior]) ;; those don't | ||
| 236 | ;; seem to | ||
| 237 | ;; generate | ||
| 238 | ;; anything | ||
| 239 | (define-key function-key-map "\e[152q" [C-prior]) | ||
| 240 | |||
| 241 | |||
| 242 | ;; (define-key function-key-map "^?" [delete]) | ||
| 243 | (define-key function-key-map "\e[P" [S-delete]) | ||
| 244 | (define-key function-key-map "\e[142q" [C-delete]) | ||
| 245 | (define-key function-key-map "\e[M" [M-delete]) | ||
| 246 | |||
| 247 | (define-key function-key-map "\e[146q" [end]) | ||
| 248 | (define-key function-key-map "\e[147q" [S-end]) ;; those don't seem | ||
| 234 | ;; to generate | 249 | ;; to generate |
| 235 | ;; anything | 250 | ;; anything |
| 236 | (define-key function-key-map "\e[152q" [C-prior]) | 251 | (define-key function-key-map "\e[148q" [C-end]) |
| 237 | 252 | ||
| 238 | 253 | (define-key function-key-map "\e[154q" [next]) | |
| 239 | ;; (define-key function-key-map "^?" [delete]) ?? something else seems to take care of this. | 254 | (define-key function-key-map "\e[155q" [S-next]) |
| 240 | (define-key function-key-map "\e[P" [S-delete]) | 255 | (define-key function-key-map "\e[156q" [C-next]) |
| 241 | (define-key function-key-map "\e[142q" [C-delete]) | 256 | |
| 242 | (define-key function-key-map "\e[M" [M-delete]) | 257 | |
| 243 | 258 | (define-key function-key-map "\e[161q" [S-up]) | |
| 244 | (define-key function-key-map "\e[146q" [end]) | 259 | (define-key function-key-map "\e[162q" [C-up]) |
| 245 | (define-key function-key-map "\e[147q" [S-end]) ;; those don't seem to | 260 | (define-key function-key-map "\e[163q" [M-up]) |
| 246 | ;; generate anything | 261 | |
| 247 | (define-key function-key-map "\e[148q" [C-end]) | 262 | (define-key function-key-map "\e[158q" [S-left]) |
| 248 | 263 | (define-key function-key-map "\e[159q" [C-left]) | |
| 249 | (define-key function-key-map "\e[154q" [next]) | 264 | (define-key function-key-map "\e[160q" [M-left]) |
| 250 | (define-key function-key-map "\e[155q" [S-next]) | 265 | |
| 251 | (define-key function-key-map "\e[156q" [C-next]) | 266 | (define-key function-key-map "\e[164q" [S-down]) |
| 252 | 267 | (define-key function-key-map "\e[165q" [C-down]) | |
| 253 | 268 | (define-key function-key-map "\e[166q" [M-down]) | |
| 254 | (define-key function-key-map "\e[161q" [S-up]) | 269 | |
| 255 | (define-key function-key-map "\e[162q" [C-up]) | 270 | (define-key function-key-map "\e[167q" [S-right]) |
| 256 | (define-key function-key-map "\e[163q" [M-up]) | 271 | (define-key function-key-map "\e[168q" [C-right]) |
| 257 | 272 | (define-key function-key-map "\e[169q" [M-right]) | |
| 258 | (define-key function-key-map "\e[158q" [S-left]) | 273 | |
| 259 | (define-key function-key-map "\e[159q" [C-left]) | 274 | ;; Keypad functions, most of those are untested. |
| 260 | (define-key function-key-map "\e[160q" [M-left]) | 275 | (define-key function-key-map "\e[179q" [?\C-/]) |
| 261 | 276 | (define-key function-key-map "\e[180q" [?\M-/]) | |
| 262 | (define-key function-key-map "\e[164q" [S-down]) | 277 | |
| 263 | (define-key function-key-map "\e[165q" [C-down]) | 278 | (define-key function-key-map "\e[187q" [?\C-*]) |
| 264 | (define-key function-key-map "\e[166q" [M-down]) | 279 | (define-key function-key-map "\e[188q" [?\M-*]) |
| 265 | 280 | ||
| 266 | (define-key function-key-map "\e[167q" [S-right]) | 281 | (define-key function-key-map "\e[198q" [?\C--]) |
| 267 | (define-key function-key-map "\e[168q" [C-right]) | 282 | (define-key function-key-map "\e[199q" [?\M--]) |
| 268 | (define-key function-key-map "\e[169q" [M-right]) | 283 | |
| 269 | 284 | ;; Something else takes care of home, up, prior, down, left, right, next | |
| 270 | ;; Keypad functions, most of those are untested. | 285 | ;;(define-key function-key-map "\e[H" [home]) |
| 271 | (define-key function-key-map "\e[179q" [?\C-/]) | 286 | (define-key function-key-map "\e[172q" [C-home]) |
| 272 | (define-key function-key-map "\e[180q" [?\M-/]) | 287 | |
| 273 | 288 | ;;(define-key function-key-map "\e[A" [up]) | |
| 274 | (define-key function-key-map "\e[187q" [?\C-*]) | 289 | (define-key function-key-map "\e[182q" [C-up]) |
| 275 | (define-key function-key-map "\e[188q" [?\M-*]) | 290 | |
| 276 | 291 | ||
| 277 | (define-key function-key-map "\e[198q" [?\C--]) | 292 | ;;(define-key function-key-map "\e[150q" [prior]) |
| 278 | (define-key function-key-map "\e[199q" [?\M--]) | 293 | (define-key function-key-map "\e[190q" [C-prior]) |
| 279 | 294 | ||
| 280 | ;; Something else takes care of home, up, prior, down, left, right, next | 295 | |
| 281 | ;(define-key function-key-map "\e[H" [home]) | 296 | (define-key function-key-map "\e[200q" [?\C-+]) |
| 282 | (define-key function-key-map "\e[172q" [C-home]) | 297 | (define-key function-key-map "\e[201q" [?\M-+]) |
| 283 | 298 | ||
| 284 | ;(define-key function-key-map "\e[A" [up]) | 299 | ;;(define-key function-key-map "\e[D" [left]) |
| 285 | (define-key function-key-map "\e[182q" [C-up]) | 300 | (define-key function-key-map "\e[174q" [C-left]) |
| 286 | 301 | ||
| 287 | 302 | ||
| 288 | ;(define-key function-key-map "\e[150q" [prior]) | 303 | (define-key function-key-map "\e[000q" [begin]) |
| 289 | (define-key function-key-map "\e[190q" [C-prior]) | 304 | (define-key function-key-map "\e[184q" [C-begin]) |
| 290 | 305 | ||
| 291 | 306 | ||
| 292 | (define-key function-key-map "\e[200q" [?\C-+]) | 307 | ;;(define-key function-key-map "\e[C" [right]) |
| 293 | (define-key function-key-map "\e[201q" [?\M-+]) | 308 | (define-key function-key-map "\e[192q" [C-right]) |
| 294 | 309 | ||
| 295 | ;(define-key function-key-map "\e[D" [left]) | 310 | ;;(define-key function-key-map "\e[146q" [end]) |
| 296 | (define-key function-key-map "\e[174q" [C-left]) | 311 | (define-key function-key-map "\e[176q" [C-end]) |
| 297 | 312 | ||
| 298 | 313 | ;;(define-key function-key-map "\e[B" [down]) | |
| 299 | (define-key function-key-map "\e[000q" [begin]) | 314 | (define-key function-key-map "\e[186q" [C-down]) |
| 300 | (define-key function-key-map "\e[184q" [C-begin]) | 315 | |
| 301 | 316 | ;;(define-key function-key-map "\e[154q" [next]) | |
| 302 | 317 | (define-key function-key-map "\e[194q" [C-next]) | |
| 303 | ;(define-key function-key-map "\e[C" [right]) | 318 | |
| 304 | (define-key function-key-map "\e[192q" [C-right]) | 319 | |
| 305 | 320 | (define-key function-key-map "\e[100q" [M-enter]) | |
| 306 | ;(define-key function-key-map "\e[146q" [end]) | 321 | |
| 307 | (define-key function-key-map "\e[176q" [C-end]) | 322 | (define-key function-key-map "\e[139q" [insert]) |
| 308 | 323 | (define-key function-key-map "\e[178q" [C-inset]) | |
| 309 | ;(define-key function-key-map "\e[B" [down]) | 324 | |
| 310 | (define-key function-key-map "\e[186q" [C-down]) | 325 | (define-key function-key-map "\e[P" [delete]) |
| 311 | 326 | (define-key function-key-map "\e[196q" [C-delete]) | |
| 312 | ;(define-key function-key-map "\e[154q" [next]) | 327 | (define-key function-key-map "\e[197q" [M-delete])) |
| 313 | (define-key function-key-map "\e[194q" [C-next]) | ||
| 314 | |||
| 315 | |||
| 316 | (define-key function-key-map "\e[100q" [M-enter]) | ||
| 317 | |||
| 318 | (define-key function-key-map "\e[139q" [insert]) | ||
| 319 | (define-key function-key-map "\e[178q" [C-inset]) | ||
| 320 | |||
| 321 | (define-key function-key-map "\e[P" [delete]) | ||
| 322 | (define-key function-key-map "\e[196q" [C-delete]) | ||
| 323 | (define-key function-key-map "\e[197q" [M-delete]) | ||
| 324 | 328 | ||
| 325 | ;;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b | 329 | ;;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b |
| 326 | ;;; iris-ansi.el ends here | 330 | ;;; iris-ansi.el ends here |
diff --git a/lisp/term/linux.el b/lisp/term/linux.el index 71b9e0d4bcf..7fa9a96e9bd 100644 --- a/lisp/term/linux.el +++ b/lisp/term/linux.el | |||
| @@ -1,19 +1,21 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; The Linux console handles Latin-1 by default. | 2 | ;; The Linux console handles Latin-1 by default. |
| 3 | 3 | ||
| 4 | (unless (terminal-coding-system) | 4 | (defun terminal-init-linux () |
| 5 | (set-terminal-coding-system 'iso-latin-1)) | 5 | "Terminal initialization function for linux." |
| 6 | (unless (terminal-coding-system) | ||
| 7 | (set-terminal-coding-system 'iso-latin-1)) | ||
| 6 | 8 | ||
| 7 | ;; It can't really display underlines. | 9 | ;; It can't really display underlines. |
| 8 | (tty-no-underline) | 10 | (tty-no-underline) |
| 9 | 11 | ||
| 10 | ;; Make Latin-1 input characters work, too. | 12 | ;; Make Latin-1 input characters work, too. |
| 11 | ;; Meta will continue to work, because the kernel | 13 | ;; Meta will continue to work, because the kernel |
| 12 | ;; turns that into Escape. | 14 | ;; turns that into Escape. |
| 13 | 15 | ||
| 14 | (let ((value (current-input-mode))) | 16 | (let ((value (current-input-mode))) |
| 15 | ;; The third arg only matters in that it is not t or nil. | 17 | ;; The third arg only matters in that it is not t or nil. |
| 16 | (set-input-mode (nth 0 value) (nth 1 value) 'iso-latin-1 (nth 3 value))) | 18 | (set-input-mode (nth 0 value) (nth 1 value) 'iso-latin-1 (nth 3 value)))) |
| 17 | 19 | ||
| 18 | ;;; arch-tag: 5d0c4f63-739b-4862-abf3-041fe42adb8f | 20 | ;;; arch-tag: 5d0c4f63-739b-4862-abf3-041fe42adb8f |
| 19 | ;;; linux.el ends here | 21 | ;;; linux.el ends here |
diff --git a/lisp/term/news.el b/lisp/term/news.el index 7a24eaf5a0c..f8a4934f8bc 100644 --- a/lisp/term/news.el +++ b/lisp/term/news.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; news.el --- keypad and function key bindings for the Sony NEWS keyboard -*- no-byte-compile: t -*- | 1 | ;;; news.el --- keypad and function key bindings for the Sony NEWS keyboard -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989, 1993 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1989, 1993, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: FSF | 5 | ;; Author: FSF |
| 6 | ;; Keywords: terminals | 6 | ;; Keywords: terminals |
| @@ -28,47 +28,49 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (if (boundp 'news-fkey-prefix) | 31 | (defun terminal-init-news () |
| 32 | nil | 32 | "Terminal initialization function for news." |
| 33 | ;; The terminal initialization should already have set up some keys | 33 | (if (boundp 'news-fkey-prefix) |
| 34 | (setq news-fkey-prefix (lookup-key function-key-map "\eO")) | 34 | nil |
| 35 | (if (not (keymapp news-fkey-prefix)) | 35 | ;; The terminal initialization should already have set up some keys |
| 36 | (error "What? Your news termcap/terminfo has no keycaps in it")) | 36 | (setq news-fkey-prefix (lookup-key function-key-map "\eO")) |
| 37 | (if (not (keymapp news-fkey-prefix)) | ||
| 38 | (error "What? Your news termcap/terminfo has no keycaps in it")) | ||
| 37 | 39 | ||
| 38 | ;; Termcap or terminfo will set these | 40 | ;; Termcap or terminfo will set these |
| 39 | ;; (define-key news-fkey-prefix "P" [f1]) | 41 | ;; (define-key news-fkey-prefix "P" [f1]) |
| 40 | ;; (define-key news-fkey-prefix "Q" [f2]) | 42 | ;; (define-key news-fkey-prefix "Q" [f2]) |
| 41 | ;; (define-key news-fkey-prefix "R" [f3]) | 43 | ;; (define-key news-fkey-prefix "R" [f3]) |
| 42 | ;; (define-key news-fkey-prefix "S" [f4]) | 44 | ;; (define-key news-fkey-prefix "S" [f4]) |
| 43 | ;; (define-key news-fkey-prefix "T" [f5]) | 45 | ;; (define-key news-fkey-prefix "T" [f5]) |
| 44 | ;; (define-key news-fkey-prefix "U" [f6]) | 46 | ;; (define-key news-fkey-prefix "U" [f6]) |
| 45 | ;; (define-key news-fkey-prefix "V" [f7]) | 47 | ;; (define-key news-fkey-prefix "V" [f7]) |
| 46 | ;; (define-key news-fkey-prefix "W" [f8]) | 48 | ;; (define-key news-fkey-prefix "W" [f8]) |
| 47 | ;; (define-key news-fkey-prefix "X" [f9]) | 49 | ;; (define-key news-fkey-prefix "X" [f9]) |
| 48 | ;; (define-key news-fkey-prefix "Y" [f10]) | 50 | ;; (define-key news-fkey-prefix "Y" [f10]) |
| 49 | 51 | ||
| 50 | ;; Terminfo will set these | 52 | ;; Terminfo will set these |
| 51 | (define-key news-fkey-prefix "a" [execute]) | 53 | (define-key news-fkey-prefix "a" [execute]) |
| 52 | (define-key news-fkey-prefix "b" [select]) | 54 | (define-key news-fkey-prefix "b" [select]) |
| 53 | (define-key news-fkey-prefix "c" [cancel]) | 55 | (define-key news-fkey-prefix "c" [cancel]) |
| 54 | (define-key news-fkey-prefix "M" [kp-enter]) | 56 | (define-key news-fkey-prefix "M" [kp-enter]) |
| 55 | (define-key news-fkey-prefix "q" [kp-1]) | 57 | (define-key news-fkey-prefix "q" [kp-1]) |
| 56 | (define-key news-fkey-prefix "s" [kp-3]) | 58 | (define-key news-fkey-prefix "s" [kp-3]) |
| 57 | (define-key news-fkey-prefix "u" [kp-5]) | 59 | (define-key news-fkey-prefix "u" [kp-5]) |
| 58 | (define-key news-fkey-prefix "w" [kp-7]) | 60 | (define-key news-fkey-prefix "w" [kp-7]) |
| 59 | (define-key news-fkey-prefix "y" [kp-9]) | 61 | (define-key news-fkey-prefix "y" [kp-9]) |
| 60 | 62 | ||
| 61 | ;; These aren't in either termcap or terminfo's repertoire | 63 | ;; These aren't in either termcap or terminfo's repertoire |
| 62 | (define-key news-fkey-prefix "m" [kp-subtract]) | 64 | (define-key news-fkey-prefix "m" [kp-subtract]) |
| 63 | (define-key news-fkey-prefix "k" [kp-add]) | 65 | (define-key news-fkey-prefix "k" [kp-add]) |
| 64 | (define-key news-fkey-prefix "l" [kp-separator]) | 66 | (define-key news-fkey-prefix "l" [kp-separator]) |
| 65 | (define-key news-fkey-prefix "n" [kp-decimal]) | 67 | (define-key news-fkey-prefix "n" [kp-decimal]) |
| 66 | (define-key news-fkey-prefix "p" [kp-0]) | 68 | (define-key news-fkey-prefix "p" [kp-0]) |
| 67 | (define-key news-fkey-prefix "r" [kp-2]) | 69 | (define-key news-fkey-prefix "r" [kp-2]) |
| 68 | (define-key news-fkey-prefix "t" [kp-4]) | 70 | (define-key news-fkey-prefix "t" [kp-4]) |
| 69 | (define-key news-fkey-prefix "v" [kp-6]) | 71 | (define-key news-fkey-prefix "v" [kp-6]) |
| 70 | (define-key news-fkey-prefix "x" [kp-8]) | 72 | (define-key news-fkey-prefix "x" [kp-8]) |
| 71 | ) | 73 | )) |
| 72 | 74 | ||
| 73 | ;;; arch-tag: bfe141a0-623b-4b42-b753-5d9353776c5e | 75 | ;;; arch-tag: bfe141a0-623b-4b42-b753-5d9353776c5e |
| 74 | ;;; news.el ends here | 76 | ;;; news.el ends here |
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index 8dcd1826e0a..f0e9dd7b5b1 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; rxvt.el --- define function key sequences and standard colors for rxvt | 1 | ;;; rxvt.el --- define function key sequences and standard colors for rxvt |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eli Zaretskii | 5 | ;; Author: Eli Zaretskii |
| 6 | ;; Keywords: terminals | 6 | ;; Keywords: terminals |
| @@ -26,73 +26,143 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | ;; Set up function-key-map entries that termcap and terminfo don't know. | 29 | (defun terminal-init-rxvt () |
| 30 | (let ((map (make-sparse-keymap))) | 30 | "Terminal initialization function for rxvt." |
| 31 | (define-key map "\e[A" [up]) | 31 | ;; The terminal intialization C code file might have initialized |
| 32 | (define-key map "\e[B" [down]) | 32 | ;; function keys F11->F42 from the termcap/terminfo information. On |
| 33 | (define-key map "\e[C" [right]) | 33 | ;; a PC-style keyboard these keys correspond to |
| 34 | (define-key map "\e[D" [left]) | 34 | ;; MODIFIER-FUNCTION_KEY, where modifier is S-, C-, C-S-. The |
| 35 | (define-key map "\e[7~" [home]) | 35 | ;; code here subsitutes the corresponding defintions in |
| 36 | (define-key map "\e[2~" [insert]) | 36 | ;; function-key-map. This substitution is needed because if a key |
| 37 | (define-key map "\e[3~" [delete]) | 37 | ;; definition if found in function-key-map, there are no further |
| 38 | (define-key map "\e[4~" [select]) | 38 | ;; lookups in other keymaps. |
| 39 | (define-key map "\e[5~" [prior]) | 39 | (substitute-key-definition [f11] [S-f1] function-key-map) |
| 40 | (define-key map "\e[6~" [next]) | 40 | (substitute-key-definition [f12] [S-f2] function-key-map) |
| 41 | (define-key map "\e[11~" [f1]) | 41 | (substitute-key-definition [f13] [S-f3] function-key-map) |
| 42 | (define-key map "\e[12~" [f2]) | 42 | (substitute-key-definition [f14] [S-f4] function-key-map) |
| 43 | (define-key map "\e[13~" [f3]) | 43 | (substitute-key-definition [f15] [S-f5] function-key-map) |
| 44 | (define-key map "\e[14~" [f4]) | 44 | (substitute-key-definition [f16] [S-f6] function-key-map) |
| 45 | (define-key map "\e[15~" [f5]) | 45 | (substitute-key-definition [f17] [S-f7] function-key-map) |
| 46 | (define-key map "\e[17~" [f6]) | 46 | (substitute-key-definition [f18] [S-f8] function-key-map) |
| 47 | (define-key map "\e[18~" [f7]) | 47 | (substitute-key-definition [f19] [S-f9] function-key-map) |
| 48 | (define-key map "\e[19~" [f8]) | 48 | (substitute-key-definition [f20] [S-f10] function-key-map) |
| 49 | (define-key map "\e[20~" [f9]) | 49 | |
| 50 | (define-key map "\e[21~" [f10]) | 50 | (substitute-key-definition [f23] [C-f1] function-key-map) |
| 51 | (define-key map "\e[23~" [f11]) | 51 | (substitute-key-definition [f24] [C-f2] function-key-map) |
| 52 | (define-key map "\e[24~" [f12]) | 52 | (substitute-key-definition [f25] [C-f3] function-key-map) |
| 53 | (define-key map "\e[29~" [print]) | 53 | (substitute-key-definition [f26] [C-f4] function-key-map) |
| 54 | 54 | (substitute-key-definition [f27] [C-f5] function-key-map) | |
| 55 | (define-key map "\e[11^" [C-f1]) | 55 | (substitute-key-definition [f28] [C-f6] function-key-map) |
| 56 | (define-key map "\e[12^" [C-f2]) | 56 | (substitute-key-definition [f29] [C-f7] function-key-map) |
| 57 | (define-key map "\e[13^" [C-f3]) | 57 | (substitute-key-definition [f30] [C-f8] function-key-map) |
| 58 | (define-key map "\e[14^" [C-f4]) | 58 | (substitute-key-definition [f31] [C-f9] function-key-map) |
| 59 | (define-key map "\e[15^" [C-f5]) | 59 | (substitute-key-definition [f32] [C-f10] function-key-map) |
| 60 | (define-key map "\e[17^" [C-f6]) | 60 | |
| 61 | (define-key map "\e[18^" [C-f7]) | 61 | (substitute-key-definition [f33] [C-S-f1] function-key-map) |
| 62 | (define-key map "\e[19^" [C-f8]) | 62 | (substitute-key-definition [f34] [C-S-f2] function-key-map) |
| 63 | (define-key map "\e[20^" [C-f9]) | 63 | (substitute-key-definition [f35] [C-S-f3] function-key-map) |
| 64 | (define-key map "\e[21^" [C-f10]) | 64 | (substitute-key-definition [f36] [C-S-f4] function-key-map) |
| 65 | (define-key map "\e[23^" [C-f11]) | 65 | (substitute-key-definition [f37] [C-S-f5] function-key-map) |
| 66 | (define-key map "\e[24^" [C-f12]) | 66 | (substitute-key-definition [f38] [C-S-f6] function-key-map) |
| 67 | 67 | (substitute-key-definition [f39] [C-S-f7] function-key-map) | |
| 68 | (define-key map "\e[29~" [print]) | 68 | (substitute-key-definition [f40] [C-S-f8] function-key-map) |
| 69 | 69 | (substitute-key-definition [f41] [C-S-f9] function-key-map) | |
| 70 | (define-key map "\e[2;2~" [S-insert]) | 70 | (substitute-key-definition [f42] [C-S-f10] function-key-map) |
| 71 | (define-key map "\e[3$" [S-delete]) | 71 | |
| 72 | 72 | ;; Set up function-key-map entries that termcap and terminfo don't know. | |
| 73 | (define-key map "\e[2^" [C-insert]) | 73 | (let ((map (make-sparse-keymap))) |
| 74 | (define-key map "\e[3^" [C-delete]) | 74 | (define-key map "\e[A" [up]) |
| 75 | (define-key map "\e[5^" [C-prior]) | 75 | (define-key map "\e[B" [down]) |
| 76 | (define-key map "\e[6^" [C-next]) | 76 | (define-key map "\e[C" [right]) |
| 77 | (define-key map "\eOd" [C-left]) | 77 | (define-key map "\e[D" [left]) |
| 78 | (define-key map "\eOc" [C-right]) | 78 | (define-key map "\e[7~" [home]) |
| 79 | (define-key map "\eOa" [C-up]) | 79 | (define-key map "\e[2~" [insert]) |
| 80 | (define-key map "\eOb" [C-down]) | 80 | (define-key map "\e[3~" [delete]) |
| 81 | 81 | (define-key map "\e[4~" [select]) | |
| 82 | (define-key map "\e[5$" [S-prior]) | 82 | (define-key map "\e[5~" [prior]) |
| 83 | (define-key map "\e[6$" [S-next]) | 83 | (define-key map "\e[6~" [next]) |
| 84 | (define-key map "\e[8$" [S-end]) | 84 | (define-key map "\e[11~" [f1]) |
| 85 | (define-key map "\e[7$" [S-home]) | 85 | (define-key map "\e[12~" [f2]) |
| 86 | (define-key map "\e[d" [S-left]) | 86 | (define-key map "\e[13~" [f3]) |
| 87 | (define-key map "\e[c" [S-right]) | 87 | (define-key map "\e[14~" [f4]) |
| 88 | (define-key map "\e[a" [S-up]) | 88 | (define-key map "\e[15~" [f5]) |
| 89 | (define-key map "\e[b" [S-down]) | 89 | (define-key map "\e[17~" [f6]) |
| 90 | 90 | (define-key map "\e[18~" [f7]) | |
| 91 | ;; Use inheritance to let the main keymap override those defaults. | 91 | (define-key map "\e[19~" [f8]) |
| 92 | ;; This way we don't override terminfo-derived settings or settings | 92 | (define-key map "\e[20~" [f9]) |
| 93 | ;; made in the .emacs file. | 93 | (define-key map "\e[21~" [f10]) |
| 94 | (set-keymap-parent map (keymap-parent function-key-map)) | 94 | ;; The strings emitted by f11 and f12 are the same as the strings |
| 95 | (set-keymap-parent function-key-map map)) | 95 | ;; emitted by S-f1 and S-f2, so don't define f11 and f12. |
| 96 | ;; (define-key map "\e[23~" [f11]) | ||
| 97 | ;; (define-key map "\e[24~" [f12]) | ||
| 98 | (define-key map "\e[29~" [print]) | ||
| 99 | |||
| 100 | (define-key map "\e[11^" [C-f1]) | ||
| 101 | (define-key map "\e[12^" [C-f2]) | ||
| 102 | (define-key map "\e[13^" [C-f3]) | ||
| 103 | (define-key map "\e[14^" [C-f4]) | ||
| 104 | (define-key map "\e[15^" [C-f5]) | ||
| 105 | (define-key map "\e[17^" [C-f6]) | ||
| 106 | (define-key map "\e[18^" [C-f7]) | ||
| 107 | (define-key map "\e[19^" [C-f8]) | ||
| 108 | (define-key map "\e[20^" [C-f9]) | ||
| 109 | (define-key map "\e[21^" [C-f10]) | ||
| 110 | |||
| 111 | (define-key map "\e[23~" [S-f1]) | ||
| 112 | (define-key map "\e[24~" [S-f2]) | ||
| 113 | (define-key map "\e[25~" [S-f3]) | ||
| 114 | (define-key map "\e[26~" [S-f4]) | ||
| 115 | (define-key map "\e[28~" [S-f5]) | ||
| 116 | (define-key map "\e[29~" [S-f6]) | ||
| 117 | (define-key map "\e[31~" [S-f7]) | ||
| 118 | (define-key map "\e[32~" [S-f8]) | ||
| 119 | (define-key map "\e[33~" [S-f9]) | ||
| 120 | (define-key map "\e[34~" [S-f10]) | ||
| 121 | |||
| 122 | (define-key map "\e[23^" [C-S-f1]) | ||
| 123 | (define-key map "\e[24^" [C-S-f2]) | ||
| 124 | (define-key map "\e[25^" [C-S-f3]) | ||
| 125 | (define-key map "\e[26^" [C-S-f4]) | ||
| 126 | (define-key map "\e[28^" [C-S-f5]) | ||
| 127 | (define-key map "\e[29^" [C-S-f6]) | ||
| 128 | (define-key map "\e[31^" [C-S-f7]) | ||
| 129 | (define-key map "\e[32^" [C-S-f8]) | ||
| 130 | (define-key map "\e[33^" [C-S-f9]) | ||
| 131 | (define-key map "\e[34^" [C-S-f10]) | ||
| 132 | |||
| 133 | (define-key map "\e[2^" [C-insert]) | ||
| 134 | (define-key map "\e[3^" [C-delete]) | ||
| 135 | (define-key map "\e[5^" [C-prior]) | ||
| 136 | (define-key map "\e[6^" [C-next]) | ||
| 137 | (define-key map "\e[7^" [C-home]) | ||
| 138 | (define-key map "\e[8^" [C-end]) | ||
| 139 | (define-key map "\eOd" [C-left]) | ||
| 140 | (define-key map "\eOc" [C-right]) | ||
| 141 | (define-key map "\eOa" [C-up]) | ||
| 142 | (define-key map "\eOb" [C-down]) | ||
| 143 | |||
| 144 | (define-key map "\e[2;2~" [S-insert]) | ||
| 145 | (define-key map "\e[3$" [S-delete]) | ||
| 146 | (define-key map "\e[5$" [S-prior]) | ||
| 147 | (define-key map "\e[6$" [S-next]) | ||
| 148 | (define-key map "\e[8$" [S-end]) | ||
| 149 | (define-key map "\e[7$" [S-home]) | ||
| 150 | (define-key map "\e[d" [S-left]) | ||
| 151 | (define-key map "\e[c" [S-right]) | ||
| 152 | (define-key map "\e[a" [S-up]) | ||
| 153 | (define-key map "\e[b" [S-down]) | ||
| 154 | |||
| 155 | ;; Use inheritance to let the main keymap override those defaults. | ||
| 156 | ;; This way we don't override terminfo-derived settings or settings | ||
| 157 | ;; made in the .emacs file. | ||
| 158 | (set-keymap-parent map (keymap-parent function-key-map)) | ||
| 159 | (set-keymap-parent function-key-map map)) | ||
| 160 | |||
| 161 | ;; Initialize colors and background mode. | ||
| 162 | (rxvt-register-default-colors) | ||
| 163 | (rxvt-set-background-mode) | ||
| 164 | ;; This recomputes all the default faces given the colors we've just set up. | ||
| 165 | (tty-set-up-initial-frame-faces)) | ||
| 96 | 166 | ||
| 97 | ;; Set up colors, for those versions of rxvt that support it. | 167 | ;; Set up colors, for those versions of rxvt that support it. |
| 98 | (defvar rxvt-standard-colors | 168 | (defvar rxvt-standard-colors |
| @@ -166,11 +236,5 @@ for the currently selected frame." | |||
| 166 | (setq default-frame-background-mode 'dark))) | 236 | (setq default-frame-background-mode 'dark))) |
| 167 | (frame-set-background-mode (selected-frame)))) | 237 | (frame-set-background-mode (selected-frame)))) |
| 168 | 238 | ||
| 169 | ;; Do it! | ||
| 170 | (rxvt-register-default-colors) | ||
| 171 | (rxvt-set-background-mode) | ||
| 172 | ;; This recomputes all the default faces given the colors we've just set up. | ||
| 173 | (tty-set-up-initial-frame-faces) | ||
| 174 | |||
| 175 | ;;; arch-tag: 20cf2fb6-6318-4bab-9dbf-1d15048f2257 | 239 | ;;; arch-tag: 20cf2fb6-6318-4bab-9dbf-1d15048f2257 |
| 176 | ;;; rxvt.el ends here | 240 | ;;; rxvt.el ends here |
diff --git a/lisp/term/sun.el b/lisp/term/sun.el index 18010e0b343..7d857ca1266 100644 --- a/lisp/term/sun.el +++ b/lisp/term/sun.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; sun.el --- keybinding for standard default sunterm keys | 1 | ;;; sun.el --- keybinding for standard default sunterm keys |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1987, 2001 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1987, 2001, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jeff Peck <peck@sun.com> | 5 | ;; Author: Jeff Peck <peck@sun.com> |
| 6 | ;; Keywords: terminals | 6 | ;; Keywords: terminals |
| @@ -93,58 +93,6 @@ | |||
| 93 | ;; | 93 | ;; |
| 94 | 94 | ||
| 95 | (defvar sun-raw-prefix (make-sparse-keymap)) | 95 | (defvar sun-raw-prefix (make-sparse-keymap)) |
| 96 | (define-key function-key-map "\e[" sun-raw-prefix) | ||
| 97 | |||
| 98 | (define-key sun-raw-prefix "210z" [r3]) | ||
| 99 | (define-key sun-raw-prefix "213z" [r6]) | ||
| 100 | (define-key sun-raw-prefix "214z" [r7]) | ||
| 101 | (define-key sun-raw-prefix "216z" [r9]) | ||
| 102 | (define-key sun-raw-prefix "218z" [r11]) | ||
| 103 | (define-key sun-raw-prefix "220z" [r13]) | ||
| 104 | (define-key sun-raw-prefix "222z" [r15]) | ||
| 105 | (define-key sun-raw-prefix "193z" [redo]) | ||
| 106 | (define-key sun-raw-prefix "194z" [props]) | ||
| 107 | (define-key sun-raw-prefix "195z" [undo]) | ||
| 108 | ;; (define-key sun-raw-prefix "196z" 'ignore) ; Expose-down | ||
| 109 | ;; (define-key sun-raw-prefix "197z" [put]) | ||
| 110 | ;; (define-key sun-raw-prefix "198z" 'ignore) ; Open-down | ||
| 111 | ;; (define-key sun-raw-prefix "199z" [get]) | ||
| 112 | (define-key sun-raw-prefix "200z" [find]) | ||
| 113 | ;; (define-key sun-raw-prefix "201z" 'kill-region-and-unmark) ; Delete | ||
| 114 | (define-key sun-raw-prefix "224z" [f1]) | ||
| 115 | (define-key sun-raw-prefix "225z" [f2]) | ||
| 116 | (define-key sun-raw-prefix "226z" [f3]) | ||
| 117 | (define-key sun-raw-prefix "227z" [f4]) | ||
| 118 | (define-key sun-raw-prefix "228z" [f5]) | ||
| 119 | (define-key sun-raw-prefix "229z" [f6]) | ||
| 120 | (define-key sun-raw-prefix "230z" [f7]) | ||
| 121 | (define-key sun-raw-prefix "231z" [f8]) | ||
| 122 | (define-key sun-raw-prefix "232z" [f9]) | ||
| 123 | (define-key sun-raw-prefix "233z" [f10]) | ||
| 124 | (define-key sun-raw-prefix "234z" [f11]) | ||
| 125 | (define-key sun-raw-prefix "235z" [f12]) | ||
| 126 | (define-key sun-raw-prefix "A" [up]) ; R8 | ||
| 127 | (define-key sun-raw-prefix "B" [down]) ; R14 | ||
| 128 | (define-key sun-raw-prefix "C" [right]) ; R12 | ||
| 129 | (define-key sun-raw-prefix "D" [left]) ; R10 | ||
| 130 | |||
| 131 | (global-set-key [r3] 'backward-page) | ||
| 132 | (global-set-key [r6] 'forward-page) | ||
| 133 | (global-set-key [r7] 'beginning-of-buffer) | ||
| 134 | (global-set-key [r9] 'scroll-down) | ||
| 135 | (global-set-key [r11] 'recenter) | ||
| 136 | (global-set-key [r13] 'end-of-buffer) | ||
| 137 | (global-set-key [r15] 'scroll-up) | ||
| 138 | (global-set-key [redo] 'redraw-display) ;FIXME: collides with default. | ||
| 139 | (global-set-key [props] 'list-buffers) | ||
| 140 | (global-set-key [put] 'sun-select-region) | ||
| 141 | (global-set-key [get] 'sun-yank-selection) | ||
| 142 | (global-set-key [find] 'exchange-point-and-mark) | ||
| 143 | (global-set-key [f3] 'scroll-down-in-place) | ||
| 144 | (global-set-key [f4] 'scroll-up-in-place) | ||
| 145 | (global-set-key [f6] 'shrink-window) | ||
| 146 | (global-set-key [f7] 'enlarge-window) | ||
| 147 | |||
| 148 | 96 | ||
| 149 | ;; Since .emacs gets loaded before this file, a hook is supplied | 97 | ;; Since .emacs gets loaded before this file, a hook is supplied |
| 150 | ;; for you to put your own bindings in. | 98 | ;; for you to put your own bindings in. |
| @@ -152,13 +100,6 @@ | |||
| 152 | (defvar sun-raw-prefix-hooks nil | 100 | (defvar sun-raw-prefix-hooks nil |
| 153 | "List of forms to evaluate after setting sun-raw-prefix.") | 101 | "List of forms to evaluate after setting sun-raw-prefix.") |
| 154 | 102 | ||
| 155 | (when sun-raw-prefix-hooks | ||
| 156 | (message "sun-raw-prefix-hooks is obsolete! Use term-setup-hook instead!") | ||
| 157 | (let ((hooks sun-raw-prefix-hooks)) | ||
| 158 | (while hooks | ||
| 159 | (eval (car hooks)) | ||
| 160 | (setq hooks (cdr hooks))))) | ||
| 161 | |||
| 162 | 103 | ||
| 163 | ;;; This section adds definitions for the emacstool users | 104 | ;;; This section adds definitions for the emacstool users |
| 164 | ;; emacstool event filter converts function keys to C-x*{c}{lrt} | 105 | ;; emacstool event filter converts function keys to C-x*{c}{lrt} |
| @@ -188,44 +129,6 @@ | |||
| 188 | (defvar suntool-map (make-sparse-keymap) | 129 | (defvar suntool-map (make-sparse-keymap) |
| 189 | "*Keymap for Emacstool bindings.") | 130 | "*Keymap for Emacstool bindings.") |
| 190 | 131 | ||
| 191 | (define-key suntool-map "gr" 'beginning-of-buffer) ; r7 | ||
| 192 | (define-key suntool-map "iR" 'backward-page) ; R9 | ||
| 193 | (define-key suntool-map "ir" 'scroll-down) ; r9 | ||
| 194 | (define-key suntool-map "kr" 'recenter) ; r11 | ||
| 195 | (define-key suntool-map "mr" 'end-of-buffer) ; r13 | ||
| 196 | (define-key suntool-map "oR" 'forward-page) ; R15 | ||
| 197 | (define-key suntool-map "or" 'scroll-up) ; r15 | ||
| 198 | (define-key suntool-map "b\M-L" 'rerun-prev-command) ; M-AGAIN | ||
| 199 | (define-key suntool-map "b\M-l" 'prev-complex-command) ; M-Again | ||
| 200 | (define-key suntool-map "bl" 'redraw-display) ; Again | ||
| 201 | (define-key suntool-map "cl" 'list-buffers) ; Props | ||
| 202 | (define-key suntool-map "dl" 'undo) ; Undo | ||
| 203 | (define-key suntool-map "el" 'ignore) ; Expose-Open | ||
| 204 | (define-key suntool-map "fl" 'sun-select-region) ; Put | ||
| 205 | (define-key suntool-map "f," 'copy-region-as-kill) ; C-Put | ||
| 206 | (define-key suntool-map "gl" 'ignore) ; Open-Open | ||
| 207 | (define-key suntool-map "hl" 'sun-yank-selection) ; Get | ||
| 208 | (define-key suntool-map "h," 'yank) ; C-Get | ||
| 209 | (define-key suntool-map "il" 'research-forward) ; Find | ||
| 210 | (define-key suntool-map "i," 're-search-forward) ; C-Find | ||
| 211 | (define-key suntool-map "i\M-l" 'research-backward) ; M-Find | ||
| 212 | (define-key suntool-map "i\M-," 're-search-backward) ; C-M-Find | ||
| 213 | |||
| 214 | (define-key suntool-map "jL" 'yank) ; DELETE | ||
| 215 | (define-key suntool-map "jl" 'kill-region-and-unmark) ; Delete | ||
| 216 | (define-key suntool-map "j\M-l" 'exchange-point-and-mark); M-Delete | ||
| 217 | (define-key suntool-map "j," | ||
| 218 | (lambda () (interactive) (pop-mark))) ; C-Delete | ||
| 219 | |||
| 220 | (define-key suntool-map "fT" 'shrink-window-horizontally) ; T6 | ||
| 221 | (define-key suntool-map "gT" 'enlarge-window-horizontally) ; T7 | ||
| 222 | (define-key suntool-map "ft" 'shrink-window) ; t6 | ||
| 223 | (define-key suntool-map "gt" 'enlarge-window) ; t7 | ||
| 224 | (define-key suntool-map "cT" (lambda (n) (interactive "p") (scroll-down n))) | ||
| 225 | (define-key suntool-map "dT" (lambda (n) (interactive "p") (scroll-up n))) | ||
| 226 | (define-key suntool-map "ct" 'scroll-down-in-place) ; t3 | ||
| 227 | (define-key suntool-map "dt" 'scroll-up-in-place) ; t4 | ||
| 228 | (define-key ctl-x-map "*" suntool-map) | ||
| 229 | 132 | ||
| 230 | ;; Since .emacs gets loaded before this file, a hook is supplied | 133 | ;; Since .emacs gets loaded before this file, a hook is supplied |
| 231 | ;; for you to put your own bindings in. | 134 | ;; for you to put your own bindings in. |
| @@ -233,13 +136,6 @@ | |||
| 233 | (defvar suntool-map-hooks nil | 136 | (defvar suntool-map-hooks nil |
| 234 | "List of forms to evaluate after setting suntool-map.") | 137 | "List of forms to evaluate after setting suntool-map.") |
| 235 | 138 | ||
| 236 | (when suntool-map-hooks | ||
| 237 | (message "suntool-map-hooks is obsolete! Use term-setup-hook instead!") | ||
| 238 | (let ((hooks suntool-map-hooks)) | ||
| 239 | (while hooks | ||
| 240 | (eval (car hooks)) | ||
| 241 | (setq hooks (cdr hooks))))) | ||
| 242 | |||
| 243 | ;; | 139 | ;; |
| 244 | ;; If running under emacstool, arrange to call suspend-emacstool | 140 | ;; If running under emacstool, arrange to call suspend-emacstool |
| 245 | ;; instead of suspend-emacs. | 141 | ;; instead of suspend-emacs. |
| @@ -251,6 +147,115 @@ | |||
| 251 | (autoload 'sun-mouse-handler "sun-mouse" | 147 | (autoload 'sun-mouse-handler "sun-mouse" |
| 252 | "Sun Emacstool handler for mouse blips (not loaded)." t) | 148 | "Sun Emacstool handler for mouse blips (not loaded)." t) |
| 253 | 149 | ||
| 150 | (defun terminal-init-sun () | ||
| 151 | "Terminal initialization function for sun." | ||
| 152 | (define-key function-key-map "\e[" sun-raw-prefix) | ||
| 153 | |||
| 154 | (define-key sun-raw-prefix "210z" [r3]) | ||
| 155 | (define-key sun-raw-prefix "213z" [r6]) | ||
| 156 | (define-key sun-raw-prefix "214z" [r7]) | ||
| 157 | (define-key sun-raw-prefix "216z" [r9]) | ||
| 158 | (define-key sun-raw-prefix "218z" [r11]) | ||
| 159 | (define-key sun-raw-prefix "220z" [r13]) | ||
| 160 | (define-key sun-raw-prefix "222z" [r15]) | ||
| 161 | (define-key sun-raw-prefix "193z" [redo]) | ||
| 162 | (define-key sun-raw-prefix "194z" [props]) | ||
| 163 | (define-key sun-raw-prefix "195z" [undo]) | ||
| 164 | ;; (define-key sun-raw-prefix "196z" 'ignore) ; Expose-down | ||
| 165 | ;; (define-key sun-raw-prefix "197z" [put]) | ||
| 166 | ;; (define-key sun-raw-prefix "198z" 'ignore) ; Open-down | ||
| 167 | ;; (define-key sun-raw-prefix "199z" [get]) | ||
| 168 | (define-key sun-raw-prefix "200z" [find]) | ||
| 169 | ;; (define-key sun-raw-prefix "201z" 'kill-region-and-unmark) ; Delete | ||
| 170 | (define-key sun-raw-prefix "224z" [f1]) | ||
| 171 | (define-key sun-raw-prefix "225z" [f2]) | ||
| 172 | (define-key sun-raw-prefix "226z" [f3]) | ||
| 173 | (define-key sun-raw-prefix "227z" [f4]) | ||
| 174 | (define-key sun-raw-prefix "228z" [f5]) | ||
| 175 | (define-key sun-raw-prefix "229z" [f6]) | ||
| 176 | (define-key sun-raw-prefix "230z" [f7]) | ||
| 177 | (define-key sun-raw-prefix "231z" [f8]) | ||
| 178 | (define-key sun-raw-prefix "232z" [f9]) | ||
| 179 | (define-key sun-raw-prefix "233z" [f10]) | ||
| 180 | (define-key sun-raw-prefix "234z" [f11]) | ||
| 181 | (define-key sun-raw-prefix "235z" [f12]) | ||
| 182 | (define-key sun-raw-prefix "A" [up]) ; R8 | ||
| 183 | (define-key sun-raw-prefix "B" [down]) ; R14 | ||
| 184 | (define-key sun-raw-prefix "C" [right]) ; R12 | ||
| 185 | (define-key sun-raw-prefix "D" [left]) ; R10 | ||
| 186 | |||
| 187 | (global-set-key [r3] 'backward-page) | ||
| 188 | (global-set-key [r6] 'forward-page) | ||
| 189 | (global-set-key [r7] 'beginning-of-buffer) | ||
| 190 | (global-set-key [r9] 'scroll-down) | ||
| 191 | (global-set-key [r11] 'recenter) | ||
| 192 | (global-set-key [r13] 'end-of-buffer) | ||
| 193 | (global-set-key [r15] 'scroll-up) | ||
| 194 | (global-set-key [redo] 'redraw-display) ;FIXME: collides with default. | ||
| 195 | (global-set-key [props] 'list-buffers) | ||
| 196 | (global-set-key [put] 'sun-select-region) | ||
| 197 | (global-set-key [get] 'sun-yank-selection) | ||
| 198 | (global-set-key [find] 'exchange-point-and-mark) | ||
| 199 | (global-set-key [f3] 'scroll-down-in-place) | ||
| 200 | (global-set-key [f4] 'scroll-up-in-place) | ||
| 201 | (global-set-key [f6] 'shrink-window) | ||
| 202 | (global-set-key [f7] 'enlarge-window) | ||
| 203 | |||
| 204 | (when sun-raw-prefix-hooks | ||
| 205 | (message "sun-raw-prefix-hooks is obsolete! Use term-setup-hook instead!") | ||
| 206 | (let ((hooks sun-raw-prefix-hooks)) | ||
| 207 | (while hooks | ||
| 208 | (eval (car hooks)) | ||
| 209 | (setq hooks (cdr hooks))))) | ||
| 210 | |||
| 211 | (define-key suntool-map "gr" 'beginning-of-buffer) ; r7 | ||
| 212 | (define-key suntool-map "iR" 'backward-page) ; R9 | ||
| 213 | (define-key suntool-map "ir" 'scroll-down) ; r9 | ||
| 214 | (define-key suntool-map "kr" 'recenter) ; r11 | ||
| 215 | (define-key suntool-map "mr" 'end-of-buffer) ; r13 | ||
| 216 | (define-key suntool-map "oR" 'forward-page) ; R15 | ||
| 217 | (define-key suntool-map "or" 'scroll-up) ; r15 | ||
| 218 | (define-key suntool-map "b\M-L" 'rerun-prev-command) ; M-AGAIN | ||
| 219 | (define-key suntool-map "b\M-l" 'prev-complex-command) ; M-Again | ||
| 220 | (define-key suntool-map "bl" 'redraw-display) ; Again | ||
| 221 | (define-key suntool-map "cl" 'list-buffers) ; Props | ||
| 222 | (define-key suntool-map "dl" 'undo) ; Undo | ||
| 223 | (define-key suntool-map "el" 'ignore) ; Expose-Open | ||
| 224 | (define-key suntool-map "fl" 'sun-select-region) ; Put | ||
| 225 | (define-key suntool-map "f," 'copy-region-as-kill) ; C-Put | ||
| 226 | (define-key suntool-map "gl" 'ignore) ; Open-Open | ||
| 227 | (define-key suntool-map "hl" 'sun-yank-selection) ; Get | ||
| 228 | (define-key suntool-map "h," 'yank) ; C-Get | ||
| 229 | (define-key suntool-map "il" 'research-forward) ; Find | ||
| 230 | (define-key suntool-map "i," 're-search-forward) ; C-Find | ||
| 231 | (define-key suntool-map "i\M-l" 'research-backward) ; M-Find | ||
| 232 | (define-key suntool-map "i\M-," 're-search-backward) ; C-M-Find | ||
| 233 | |||
| 234 | (define-key suntool-map "jL" 'yank) ; DELETE | ||
| 235 | (define-key suntool-map "jl" 'kill-region-and-unmark) ; Delete | ||
| 236 | (define-key suntool-map "j\M-l" 'exchange-point-and-mark) ; M-Delete | ||
| 237 | (define-key suntool-map "j," | ||
| 238 | (lambda () (interactive) (pop-mark))) ; C-Delete | ||
| 239 | |||
| 240 | (define-key suntool-map "fT" 'shrink-window-horizontally) ; T6 | ||
| 241 | (define-key suntool-map "gT" 'enlarge-window-horizontally) ; T7 | ||
| 242 | (define-key suntool-map "ft" 'shrink-window) ; t6 | ||
| 243 | (define-key suntool-map "gt" 'enlarge-window) ; t7 | ||
| 244 | (define-key suntool-map "cT" (lambda (n) (interactive "p") (scroll-down n))) | ||
| 245 | (define-key suntool-map "dT" (lambda (n) (interactive "p") (scroll-up n))) | ||
| 246 | (define-key suntool-map "ct" 'scroll-down-in-place) ; t3 | ||
| 247 | (define-key suntool-map "dt" 'scroll-up-in-place) ; t4 | ||
| 248 | (define-key ctl-x-map "*" suntool-map) | ||
| 249 | |||
| 250 | (when suntool-map-hooks | ||
| 251 | (message "suntool-map-hooks is obsolete! Use term-setup-hook instead!") | ||
| 252 | (let ((hooks suntool-map-hooks)) | ||
| 253 | (while hooks | ||
| 254 | (eval (car hooks)) | ||
| 255 | (setq hooks (cdr hooks))))) | ||
| 256 | |||
| 257 | (define-key ctl-x-map "\C-@" 'sun-mouse-once)) | ||
| 258 | |||
| 254 | (defun emacstool-init () | 259 | (defun emacstool-init () |
| 255 | "Set up Emacstool window, if you know you are in an emacstool." | 260 | "Set up Emacstool window, if you know you are in an emacstool." |
| 256 | ;; Make sure sun-mouse and sun-fns are loaded. | 261 | ;; Make sure sun-mouse and sun-fns are loaded. |
| @@ -272,7 +277,6 @@ | |||
| 272 | (interactive) | 277 | (interactive) |
| 273 | (emacstool-init) | 278 | (emacstool-init) |
| 274 | (sun-mouse-handler)) ; Now, execute this mouse blip. | 279 | (sun-mouse-handler)) ; Now, execute this mouse blip. |
| 275 | (define-key ctl-x-map "\C-@" 'sun-mouse-once) | ||
| 276 | 280 | ||
| 277 | ;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6 | 281 | ;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6 |
| 278 | ;;; sun.el ends here | 282 | ;;; sun.el ends here |
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index c24464fbbd5..f7bc8c852a9 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu>, January 1992 | 3 | ;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu>, January 1992 |
| 4 | ;; Keywords: terminals | 4 | ;; Keywords: terminals |
| 5 | 5 | ||
| 6 | ;; Copyright (C) 1992 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1992, 2005 Free Software Foundation, Inc. |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
| @@ -28,77 +28,80 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (or (lookup-key function-key-map "\e[") | 31 | (defun terminal-init-tvi970 () |
| 32 | (define-key function-key-map "\e[" (make-keymap))) | 32 | "Terminal initialization function for tvi970." |
| 33 | ;; (or (lookup-key function-key-map "\eO") | 33 | (or (lookup-key function-key-map "\e[") |
| 34 | ;; (define-key function-key-map "\eO" (make-keymap))) | 34 | (define-key function-key-map "\e[" (make-keymap))) |
| 35 | 35 | ;; (or (lookup-key function-key-map "\eO") | |
| 36 | ;; Miscellaneous keys | 36 | ;; (define-key function-key-map "\eO" (make-keymap))) |
| 37 | (mapcar (function (lambda (key-binding) | 37 | |
| 38 | (define-key function-key-map | 38 | ;; Miscellaneous keys |
| 39 | (car key-binding) (nth 1 key-binding)))) | 39 | (mapcar (function (lambda (key-binding) |
| 40 | '( | 40 | (define-key function-key-map |
| 41 | ;; These are set up by termcap or terminfo | 41 | (car key-binding) (nth 1 key-binding)))) |
| 42 | ;; ("\eOP" [kp-f1]) | 42 | '( |
| 43 | ;; ("\eOQ" [kp-f2]) | 43 | ;; These are set up by termcap or terminfo |
| 44 | ;; ("\eOR" [kp-f3]) | 44 | ;; ("\eOP" [kp-f1]) |
| 45 | ;; ("\eOS" [kp-f4]) | 45 | ;; ("\eOQ" [kp-f2]) |
| 46 | 46 | ;; ("\eOR" [kp-f3]) | |
| 47 | ;; These might br set by terminfo | 47 | ;; ("\eOS" [kp-f4]) |
| 48 | ("\e[H" [home]) | 48 | |
| 49 | ("\e[Z" [backtab]) | 49 | ;; These might br set by terminfo |
| 50 | ("\e[i" [print]) | 50 | ("\e[H" [home]) |
| 51 | ("\e[@" [insert]) | 51 | ("\e[Z" [backtab]) |
| 52 | ("\e[L" [insertline]) | 52 | ("\e[i" [print]) |
| 53 | ("\e[M" [deleteline]) | 53 | ("\e[@" [insert]) |
| 54 | ("\e[U" [next]) ;; actually the `page' key | 54 | ("\e[L" [insertline]) |
| 55 | 55 | ("\e[M" [deleteline]) | |
| 56 | ;; These won't be set up by either | 56 | ("\e[U" [next]) ;; actually the `page' key |
| 57 | ("\eOm" [kp-subtract]) | 57 | |
| 58 | ("\eOl" [kp-separator]) | 58 | ;; These won't be set up by either |
| 59 | ("\eOn" [kp-decimal]) | 59 | ("\eOm" [kp-subtract]) |
| 60 | ("\eOM" [kp-enter]) | 60 | ("\eOl" [kp-separator]) |
| 61 | 61 | ("\eOn" [kp-decimal]) | |
| 62 | ;; These won't be set up by either either | 62 | ("\eOM" [kp-enter]) |
| 63 | ("\e[K" [key_eol]) ;; Not an X keysym | 63 | |
| 64 | ("\e[J" [key_eos]) ;; Not an X keysym | 64 | ;; These won't be set up by either either |
| 65 | ("\e[2J" [key_clear]) ;; Not an X keysym | 65 | ("\e[K" [key_eol]) ;; Not an X keysym |
| 66 | ("\e[P" [key_dc]) ;; Not an X keysym | 66 | ("\e[J" [key_eos]) ;; Not an X keysym |
| 67 | ("\e[g" [S-tab]) ;; Not an X keysym | 67 | ("\e[2J" [key_clear]) ;; Not an X keysym |
| 68 | ("\e[2N" [clearentry]) ;; Not an X keysym | 68 | ("\e[P" [key_dc]) ;; Not an X keysym |
| 69 | ("\e[2K" [S-clearentry]) ;; Not an X keysym | 69 | ("\e[g" [S-tab]) ;; Not an X keysym |
| 70 | ("\e[E" [?\C-j]) ;; Not an X keysym | 70 | ("\e[2N" [clearentry]) ;; Not an X keysym |
| 71 | ("\e[g" [S-backtab]) ;; Not an X keysym | 71 | ("\e[2K" [S-clearentry]) ;; Not an X keysym |
| 72 | ("\e[?1i" [key_sprint]) ;; Not an X keysym | 72 | ("\e[E" [?\C-j]) ;; Not an X keysym |
| 73 | ("\e[4h" [key_sic]) ;; Not an X keysym | 73 | ("\e[g" [S-backtab]) ;; Not an X keysym |
| 74 | ("\e[4l" [S-delete]) ;; Not an X keysym | 74 | ("\e[?1i" [key_sprint]) ;; Not an X keysym |
| 75 | ("\e[Q" [S-insertline]) ;; Not an X keysym | 75 | ("\e[4h" [key_sic]) ;; Not an X keysym |
| 76 | ("\e[1Q" [key_sdl]) ;; Not an X keysym | 76 | ("\e[4l" [S-delete]) ;; Not an X keysym |
| 77 | ("\e[19l" [key_seol]) ;; Not an X keysym | 77 | ("\e[Q" [S-insertline]) ;; Not an X keysym |
| 78 | ("\e[19h" [S-erasepage]) ;; Not an X keysym | 78 | ("\e[1Q" [key_sdl]) ;; Not an X keysym |
| 79 | ("\e[V" [S-page]) ;; Not an X keysym | 79 | ("\e[19l" [key_seol]) ;; Not an X keysym |
| 80 | ("\eS" [send]) ;; Not an X keysym | 80 | ("\e[19h" [S-erasepage]) ;; Not an X keysym |
| 81 | ("\e5" [S-send]) ;; Not an X keysym | 81 | ("\e[V" [S-page]) ;; Not an X keysym |
| 82 | )) | 82 | ("\eS" [send]) ;; Not an X keysym |
| 83 | 83 | ("\e5" [S-send]) ;; Not an X keysym | |
| 84 | ;; The numeric keypad keys. | 84 | )) |
| 85 | (let ((i 0)) | 85 | |
| 86 | (while (< i 10) | 86 | ;; The numeric keypad keys. |
| 87 | (define-key function-key-map | 87 | (let ((i 0)) |
| 88 | (format "\eO%c" (+ i ?p)) | 88 | (while (< i 10) |
| 89 | (vector (intern (format "kp-%d" i)))) | 89 | (define-key function-key-map |
| 90 | (setq i (1+ i)))) | 90 | (format "\eO%c" (+ i ?p)) |
| 91 | ;; The numbered function keys. | 91 | (vector (intern (format "kp-%d" i)))) |
| 92 | (let ((i 0)) | 92 | (setq i (1+ i)))) |
| 93 | (while (< i 16) | 93 | ;; The numbered function keys. |
| 94 | (define-key function-key-map | 94 | (let ((i 0)) |
| 95 | (format "\e?%c" (+ i ?a)) | 95 | (while (< i 16) |
| 96 | (vector (intern (format "f%d" (1+ i))))) | 96 | (define-key function-key-map |
| 97 | (define-key function-key-map | 97 | (format "\e?%c" (+ i ?a)) |
| 98 | (format "\e?%c" (+ i ?A)) | 98 | (vector (intern (format "f%d" (1+ i))))) |
| 99 | (vector (intern (format "S-f%d" (1+ i))))) | 99 | (define-key function-key-map |
| 100 | (setq i (1+ i)))) | 100 | (format "\e?%c" (+ i ?A)) |
| 101 | 101 | (vector (intern (format "S-f%d" (1+ i))))) | |
| 102 | (setq i (1+ i)))) | ||
| 103 | |||
| 104 | (tvi970-set-keypad-mode 1)) | ||
| 102 | 105 | ||
| 103 | ;;; Should keypad numbers send ordinary digits or distinct escape sequences? | 106 | ;;; Should keypad numbers send ordinary digits or distinct escape sequences? |
| 104 | (defvar tvi970-keypad-numeric nil | 107 | (defvar tvi970-keypad-numeric nil |
| @@ -121,7 +124,5 @@ With a negative argument, select numeric keypad mode." | |||
| 121 | (> (prefix-numeric-value arg) 0))) | 124 | (> (prefix-numeric-value arg) 0))) |
| 122 | (send-string-to-terminal (if tvi970-keypad-numeric "\e=" "\e>"))) | 125 | (send-string-to-terminal (if tvi970-keypad-numeric "\e=" "\e>"))) |
| 123 | 126 | ||
| 124 | (tvi970-set-keypad-mode 1) | ||
| 125 | |||
| 126 | ;;; arch-tag: c1334cf0-1462-41c3-a963-c077d175f8f0 | 127 | ;;; arch-tag: c1334cf0-1462-41c3-a963-c077d175f8f0 |
| 127 | ;;; tvi970.el ends here | 128 | ;;; tvi970.el ends here |
diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el index dfe011c0f6e..6b44e941813 100644 --- a/lisp/term/vt100.el +++ b/lisp/term/vt100.el | |||
| @@ -36,8 +36,12 @@ | |||
| 36 | ;;; Code: | 36 | ;;; Code: |
| 37 | 37 | ||
| 38 | ;; Set up function-key-map entries that termcap and terminfo don't know. | 38 | ;; Set up function-key-map entries that termcap and terminfo don't know. |
| 39 | (load "term/lk201" nil t) | ||
| 40 | 39 | ||
| 40 | |||
| 41 | (defun terminal-init-vt100 () | ||
| 42 | "Terminal initialization function for vt100." | ||
| 43 | (load "term/lk201" nil t)) | ||
| 44 | |||
| 41 | ;;; Controlling the screen width. | 45 | ;;; Controlling the screen width. |
| 42 | (defvar vt100-wide-mode (= (frame-width) 132) | 46 | (defvar vt100-wide-mode (= (frame-width) 132) |
| 43 | "t if vt100 is in 132-column mode.") | 47 | "t if vt100 is in 132-column mode.") |
diff --git a/lisp/term/vt102.el b/lisp/term/vt102.el index 887f63837eb..ad780ed5081 100644 --- a/lisp/term/vt102.el +++ b/lisp/term/vt102.el | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | (load "term/vt100" nil t) | 3 | (defun terminal-init-vt102 () |
| 4 | "Terminal initialization function for vt102." | ||
| 5 | (load "term/vt100" nil t)) | ||
| 4 | 6 | ||
| 5 | ;;; arch-tag: 6e839cfc-125a-4574-82f1-c23a51f7c50f | 7 | ;;; arch-tag: 6e839cfc-125a-4574-82f1-c23a51f7c50f |
| 6 | ;;; vt102.el ends here | 8 | ;;; vt102.el ends here |
diff --git a/lisp/term/vt125.el b/lisp/term/vt125.el index 458e0dafc22..2221e597aed 100644 --- a/lisp/term/vt125.el +++ b/lisp/term/vt125.el | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | (load "term/vt100" nil t) | 3 | (defun terminal-init-vt125 () |
| 4 | "Terminal initialization function for vt125." | ||
| 5 | (load "term/vt100" nil t)) | ||
| 4 | 6 | ||
| 5 | ;;; arch-tag: 1d92d70f-dd55-4a1d-9088-e215a4883801 | 7 | ;;; arch-tag: 1d92d70f-dd55-4a1d-9088-e215a4883801 |
| 6 | ;;; vt125.el ends here | 8 | ;;; vt125.el ends here |
diff --git a/lisp/term/vt200.el b/lisp/term/vt200.el index 0ff0a30f567..e1215d15023 100644 --- a/lisp/term/vt200.el +++ b/lisp/term/vt200.el | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. | 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. |
| 3 | ;; Most differences are handled by the termcap entry. | 3 | ;; Most differences are handled by the termcap entry. |
| 4 | (load "term/vt100" nil t) | ||
| 5 | 4 | ||
| 6 | ;; Make F11 an escape key. | 5 | (defun terminal-init-vt200 () |
| 7 | (define-key function-key-map "\e[23~" [?\e]) | 6 | "Terminal initialization function for vt200." |
| 7 | (load "term/vt100" nil t) | ||
| 8 | ;; Make F11 an escape key. | ||
| 9 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 8 | 10 | ||
| 9 | ;;; arch-tag: 0f78f583-9f32-4237-b106-28bcfff21d89 | 11 | ;;; arch-tag: 0f78f583-9f32-4237-b106-28bcfff21d89 |
| 10 | ;;; vt200.el ends here | 12 | ;;; vt200.el ends here |
diff --git a/lisp/term/vt201.el b/lisp/term/vt201.el index d7deeaf11c7..315030ab687 100644 --- a/lisp/term/vt201.el +++ b/lisp/term/vt201.el | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. | 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. |
| 3 | ;; Most differences are handled by the termcap entry. | 3 | ;; Most differences are handled by the termcap entry. |
| 4 | (load "term/vt100" nil t) | 4 | (defun terminal-init-vt201 () |
| 5 | 5 | "Terminal initialization function for vt201." | |
| 6 | ;; Make F11 an escape key. | 6 | (load "term/vt100" nil t) |
| 7 | (define-key function-key-map "\e[23~" [?\e]) | 7 | ;; Make F11 an escape key. |
| 8 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 8 | 9 | ||
| 9 | ;;; arch-tag: a6abb38f-60ea-449e-a9e9-3fb8572c52ae | 10 | ;;; arch-tag: a6abb38f-60ea-449e-a9e9-3fb8572c52ae |
| 10 | ;;; vt201.el ends here | 11 | ;;; vt201.el ends here |
diff --git a/lisp/term/vt220.el b/lisp/term/vt220.el index 7ea1e3b57fa..cccd2a6dfb7 100644 --- a/lisp/term/vt220.el +++ b/lisp/term/vt220.el | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. | 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. |
| 3 | ;; Most differences are handled by the termcap entry. | 3 | ;; Most differences are handled by the termcap entry. |
| 4 | (load "term/vt100" nil t) | 4 | (defun terminal-init-vt220 () |
| 5 | 5 | "Terminal initialization function for vt220." | |
| 6 | ;; Make F11 an escape key. | 6 | (load "term/vt100" nil t) |
| 7 | (define-key function-key-map "\e[23~" [?\e]) | 7 | ;; Make F11 an escape key. |
| 8 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 8 | 9 | ||
| 9 | ;;; arch-tag: 98fc4867-a20d-46a1-a276-d7be31e49871 | 10 | ;;; arch-tag: 98fc4867-a20d-46a1-a276-d7be31e49871 |
| 10 | ;;; vt220.el ends here | 11 | ;;; vt220.el ends here |
diff --git a/lisp/term/vt240.el b/lisp/term/vt240.el index 05f0bebe50f..bb3931edac8 100644 --- a/lisp/term/vt240.el +++ b/lisp/term/vt240.el | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. | 2 | ;; For our purposes we can treat the vt200 and vt100 almost alike. |
| 3 | ;; Most differences are handled by the termcap entry. | 3 | ;; Most differences are handled by the termcap entry. |
| 4 | (load "term/vt100" nil t) | 4 | (defun terminal-init-vt240 () |
| 5 | 5 | "Terminal initialization function for vt240." | |
| 6 | ;; Make F11 an escape key. | 6 | (load "term/vt100" nil t) |
| 7 | (define-key function-key-map "\e[23~" [?\e]) | 7 | ;; Make F11 an escape key. |
| 8 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 8 | 9 | ||
| 9 | ;;; arch-tag: d9f88e9c-02dc-49ff-871c-a415f08e4eb7 | 10 | ;;; arch-tag: d9f88e9c-02dc-49ff-871c-a415f08e4eb7 |
| 10 | ;;; vt240.el ends here | 11 | ;;; vt240.el ends here |
diff --git a/lisp/term/vt300.el b/lisp/term/vt300.el index 871ed234bc6..ff600f47a1e 100644 --- a/lisp/term/vt300.el +++ b/lisp/term/vt300.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | (load "term/vt100" nil t) | 2 | (defun terminal-init-vt300 () |
| 3 | 3 | "Terminal initialization function for vt300." | |
| 4 | ;; Make F11 an escape key. | 4 | (load "term/vt100" nil t) |
| 5 | (define-key function-key-map "\e[23~" [?\e]) | 5 | ;; Make F11 an escape key. |
| 6 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 6 | 7 | ||
| 7 | ;;; arch-tag: 876831c9-a6f2-444a-b033-706e6fbc149f | 8 | ;;; arch-tag: 876831c9-a6f2-444a-b033-706e6fbc149f |
| 8 | ;;; vt300.el ends here | 9 | ;;; vt300.el ends here |
diff --git a/lisp/term/vt320.el b/lisp/term/vt320.el index c99b8672fc1..fb7772c7b5b 100644 --- a/lisp/term/vt320.el +++ b/lisp/term/vt320.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | (load "term/vt100" nil t) | 2 | (defun terminal-init-vt320 () |
| 3 | 3 | "Terminal initialization function for vt320." | |
| 4 | ;; Make F11 an escape key. | 4 | (load "term/vt100" nil t) |
| 5 | (define-key function-key-map "\e[23~" [?\e]) | 5 | ;; Make F11 an escape key. |
| 6 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 6 | 7 | ||
| 7 | ;;; arch-tag: f9f4c954-0b9e-45f9-b450-a320d32abd9c | 8 | ;;; arch-tag: f9f4c954-0b9e-45f9-b450-a320d32abd9c |
| 8 | ;;; vt320.el ends here | 9 | ;;; vt320.el ends here |
diff --git a/lisp/term/vt400.el b/lisp/term/vt400.el index 666266e2bf5..97c0c5d7372 100644 --- a/lisp/term/vt400.el +++ b/lisp/term/vt400.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | (load "term/vt100" nil t) | 2 | (defun terminal-init-vt400 () |
| 3 | 3 | "Terminal initialization function for vt400." | |
| 4 | ;; Make F11 an escape key. | 4 | (load "term/vt100" nil t) |
| 5 | (define-key function-key-map "\e[23~" [?\e]) | 5 | ;; Make F11 an escape key. |
| 6 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 6 | 7 | ||
| 7 | ;;; arch-tag: a70809c5-6b21-42cc-ba20-536683e5e7d5 | 8 | ;;; arch-tag: a70809c5-6b21-42cc-ba20-536683e5e7d5 |
| 8 | ;;; vt400.el ends here | 9 | ;;; vt400.el ends here |
diff --git a/lisp/term/vt420.el b/lisp/term/vt420.el index 9ed5fbe135b..65ffa759c17 100644 --- a/lisp/term/vt420.el +++ b/lisp/term/vt420.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | (load "term/vt100" nil t) | 2 | (defun terminal-init-vt420 () |
| 3 | 3 | "Terminal initialization function for vt420." | |
| 4 | ;; Make F11 an escape key. | 4 | (load "term/vt100" nil t) |
| 5 | (define-key function-key-map "\e[23~" [?\e]) | 5 | ;; Make F11 an escape key. |
| 6 | (define-key function-key-map "\e[23~" [?\e])) | ||
| 6 | 7 | ||
| 7 | ;;; arch-tag: df2f897c-3a12-4b3c-9259-df089f96c160 | 8 | ;;; arch-tag: df2f897c-3a12-4b3c-9259-df089f96c160 |
| 8 | ;;; vt420.el ends here | 9 | ;;; vt420.el ends here |
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el index 562f5c728c0..64c489d7204 100644 --- a/lisp/term/wyse50.el +++ b/lisp/term/wyse50.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; wyse50.el --- terminal support code for Wyse 50 -*- no-byte-compile: t -*- | 1 | ;;; wyse50.el --- terminal support code for Wyse 50 -*- no-byte-compile: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1989, 1993, 1994, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org>, | 5 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org>, |
| 6 | ;; Jim Blandy <jimb@occs.cs.oberlin.edu> | 6 | ;; Jim Blandy <jimb@occs.cs.oberlin.edu> |
| @@ -37,74 +37,92 @@ | |||
| 37 | 37 | ||
| 38 | ;;; Code: | 38 | ;;; Code: |
| 39 | 39 | ||
| 40 | (define-key function-key-map "\C-a" (make-keymap)) | 40 | (defun terminal-init-wyse50 () |
| 41 | (mapcar (function (lambda (key-definition) | 41 | "Terminal initialization function for wyse50." |
| 42 | (define-key function-key-map | 42 | (define-key function-key-map "\C-a" (make-keymap)) |
| 43 | (car key-definition) (nth 1 key-definition)))) | 43 | (mapcar (function (lambda (key-definition) |
| 44 | '( | 44 | (define-key function-key-map |
| 45 | ;; These might be set up by termcap and terminfo | 45 | (car key-definition) (nth 1 key-definition)))) |
| 46 | ("\C-k" [up]) | 46 | '( |
| 47 | ("\C-j" [down]) | 47 | ;; These might be set up by termcap and terminfo |
| 48 | ("\C-l" [right]) | 48 | ("\C-k" [up]) |
| 49 | ("\C-h" [left]) | 49 | ("\C-j" [down]) |
| 50 | ("\^a@\^m" [f1]) | 50 | ("\C-l" [right]) |
| 51 | ("\^aA\^m" [f2]) | 51 | ("\C-h" [left]) |
| 52 | ("\^aB\^m" [f3]) | 52 | ("\^a@\^m" [f1]) |
| 53 | ("\^aC\^m" [f4]) | 53 | ("\^aA\^m" [f2]) |
| 54 | ("\^aD\^m" [f5]) | 54 | ("\^aB\^m" [f3]) |
| 55 | ("\^aE\^m" [f6]) | 55 | ("\^aC\^m" [f4]) |
| 56 | ("\^aF\^m" [f7]) | 56 | ("\^aD\^m" [f5]) |
| 57 | ("\^aG\^m" [f8]) | 57 | ("\^aE\^m" [f6]) |
| 58 | ("\^aH\^m" [f9]) | 58 | ("\^aF\^m" [f7]) |
| 59 | 59 | ("\^aG\^m" [f8]) | |
| 60 | ;; These might be set up by terminfo | 60 | ("\^aH\^m" [f9]) |
| 61 | ("\eK" [next]) | 61 | |
| 62 | ("\eT" [clearline]) | 62 | ;; These might be set up by terminfo |
| 63 | ("\^^" [home]) | 63 | ("\eK" [next]) |
| 64 | ("\e\^^" [end]) | 64 | ("\eT" [clearline]) |
| 65 | ("\eQ" [insert]) | 65 | ("\^^" [home]) |
| 66 | ("\eE" [insertline]) | 66 | ("\e\^^" [end]) |
| 67 | ("\eR" [deleteline]) | 67 | ("\eQ" [insert]) |
| 68 | ("\eP" [print]) | 68 | ("\eE" [insertline]) |
| 69 | ("\er" [replace]) | 69 | ("\eR" [deleteline]) |
| 70 | ("\^aI\^m" [f10]) | 70 | ("\eP" [print]) |
| 71 | ("\^aJ\^m" [f11]) | 71 | ("\er" [replace]) |
| 72 | ("\^aK\^m" [f12]) | 72 | ("\^aI\^m" [f10]) |
| 73 | ("\^aL\^m" [f13]) | 73 | ("\^aJ\^m" [f11]) |
| 74 | ("\^aM\^m" [f14]) | 74 | ("\^aK\^m" [f12]) |
| 75 | ("\^aN\^m" [f15]) | 75 | ("\^aL\^m" [f13]) |
| 76 | ("\^aO\^m" [f16]) | 76 | ("\^aM\^m" [f14]) |
| 77 | ("\^a`\^m" [f17]) | 77 | ("\^aN\^m" [f15]) |
| 78 | ("\^aa\^m" [f18]) | 78 | ("\^aO\^m" [f16]) |
| 79 | ("\^ab\^m" [f19]) | 79 | ("\^a`\^m" [f17]) |
| 80 | ("\^ac\^m" [f20]) | 80 | ("\^aa\^m" [f18]) |
| 81 | ("\^ad\^m" [f21]) | 81 | ("\^ab\^m" [f19]) |
| 82 | ("\^ae\^m" [f22]) | 82 | ("\^ac\^m" [f20]) |
| 83 | ("\^af\^m" [f23]) | 83 | ("\^ad\^m" [f21]) |
| 84 | ("\^ag\^m" [f24]) | 84 | ("\^ae\^m" [f22]) |
| 85 | ("\^ah\^m" [f25]) | 85 | ("\^af\^m" [f23]) |
| 86 | ("\^ai\^m" [f26]) | 86 | ("\^ag\^m" [f24]) |
| 87 | ("\^aj\^m" [f27]) | 87 | ("\^ah\^m" [f25]) |
| 88 | ("\^ak\^m" [f28]) | 88 | ("\^ai\^m" [f26]) |
| 89 | ("\^al\^m" [f29]) | 89 | ("\^aj\^m" [f27]) |
| 90 | ("\^am\^m" [f30]) | 90 | ("\^ak\^m" [f28]) |
| 91 | ("\^an\^m" [f31]) | 91 | ("\^al\^m" [f29]) |
| 92 | ("\^ao\^m" [f32]) | 92 | ("\^am\^m" [f30]) |
| 93 | 93 | ("\^an\^m" [f31]) | |
| 94 | ;; Terminfo may know about these, but X won't | 94 | ("\^ao\^m" [f32]) |
| 95 | ("\eI" [key-stab]) ;; Not an X keysym | 95 | |
| 96 | ("\eJ" [key-snext]) ;; Not an X keysym | 96 | ;; Terminfo may know about these, but X won't |
| 97 | ("\eY" [key-clear]) ;; Not an X keysym | 97 | ("\eI" [key-stab]) ;; Not an X keysym |
| 98 | 98 | ("\eJ" [key-snext]) ;; Not an X keysym | |
| 99 | ;; These are totally strange :-) | 99 | ("\eY" [key-clear]) ;; Not an X keysym |
| 100 | ("\eW" [?\C-?]) ;; Not an X keysym | 100 | |
| 101 | ("\^a\^k\^m" [funct-up]) ;; Not an X keysym | 101 | ;; These are totally strange :-) |
| 102 | ("\^a\^j\^m" [funct-down]) ;; Not an X keysym | 102 | ("\eW" [?\C-?]) ;; Not an X keysym |
| 103 | ("\^a\^l\^m" [funct-right]) ;; Not an X keysym | 103 | ("\^a\^k\^m" [funct-up]) ;; Not an X keysym |
| 104 | ("\^a\^h\^m" [funct-left]) ;; Not an X keysym | 104 | ("\^a\^j\^m" [funct-down]) ;; Not an X keysym |
| 105 | ("\^a\^m\^m" [funct-return]) ;; Not an X keysym | 105 | ("\^a\^l\^m" [funct-right]) ;; Not an X keysym |
| 106 | ("\^a\^i\^m" [funct-tab]) ;; Not an X keysym | 106 | ("\^a\^h\^m" [funct-left]) ;; Not an X keysym |
| 107 | )) | 107 | ("\^a\^m\^m" [funct-return]) ;; Not an X keysym |
| 108 | ("\^a\^i\^m" [funct-tab]) ;; Not an X keysym | ||
| 109 | )) | ||
| 110 | |||
| 111 | ;; Miscellaneous hacks | ||
| 112 | |||
| 113 | ;; This is an ugly hack for a nasty problem: | ||
| 114 | ;; Wyse 50 takes one character cell to store video attributes (which seems to | ||
| 115 | ;; explain width 79 rather than 80, column 1 is not used!!!). | ||
| 116 | ;; On killing (C-x C-c) the end inverse code (on column 1 of line 24) | ||
| 117 | ;; of the mode line is overwritten AFTER all the y-or-n questions. | ||
| 118 | ;; This causes the attribute to remain in effect until the mode line has | ||
| 119 | ;; scrolled of the screen. Suspending (C-z) does not cause this problem. | ||
| 120 | ;; On such terminals, Emacs should sacrifice the first and last character of | ||
| 121 | ;; each mode line, rather than a whole screen column! | ||
| 122 | (add-hook 'kill-emacs-hook | ||
| 123 | (function (lambda () (interactive) | ||
| 124 | (send-string-to-terminal | ||
| 125 | (concat "\ea23R" (1+ (frame-width)) "C\eG0")))))) | ||
| 108 | 126 | ||
| 109 | (defun enable-arrow-keys () | 127 | (defun enable-arrow-keys () |
| 110 | "To be called by term-setup-hook. Overrides 6 Emacs standard keys | 128 | "To be called by term-setup-hook. Overrides 6 Emacs standard keys |
| @@ -131,22 +149,5 @@ M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar | |||
| 131 | ("\er" nil))) | 149 | ("\er" nil))) |
| 132 | (fset 'enable-arrow-keys nil)) | 150 | (fset 'enable-arrow-keys nil)) |
| 133 | 151 | ||
| 134 | |||
| 135 | ;;; Miscellaneous hacks | ||
| 136 | |||
| 137 | ;;; This is an ugly hack for a nasty problem: | ||
| 138 | ;;; Wyse 50 takes one character cell to store video attributes (which seems to | ||
| 139 | ;;; explain width 79 rather than 80, column 1 is not used!!!). | ||
| 140 | ;;; On killing (C-x C-c) the end inverse code (on column 1 of line 24) | ||
| 141 | ;;; of the mode line is overwritten AFTER all the y-or-n questions. | ||
| 142 | ;;; This causes the attribute to remain in effect until the mode line has | ||
| 143 | ;;; scrolled of the screen. Suspending (C-z) does not cause this problem. | ||
| 144 | ;;; On such terminals, Emacs should sacrifice the first and last character of | ||
| 145 | ;;; each mode line, rather than a whole screen column! | ||
| 146 | (add-hook 'kill-emacs-hook | ||
| 147 | (function (lambda () (interactive) | ||
| 148 | (send-string-to-terminal | ||
| 149 | (concat "\ea23R" (1+ (frame-width)) "C\eG0"))))) | ||
| 150 | |||
| 151 | ;;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c | 152 | ;;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c |
| 152 | ;;; wyse50.el ends here | 153 | ;;; wyse50.el ends here |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 17d7cde0e8a..d0c26aa4b94 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -26,222 +26,238 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | ;;; The terminal intialization C code file might have initialized | 29 | (defun terminal-init-xterm () |
| 30 | ;;; function keys F13->F60 from the termcap/terminfo information. On | 30 | "Terminal initialization function for xterm." |
| 31 | ;;; a PC-style keyboard these keys correspond to | 31 | ;; rxvt terminals sometimes set the TERM variable to "xterm", but |
| 32 | ;;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The | 32 | ;; rxvt's keybindings that are incompatible with xterm's. It is |
| 33 | ;;; code here subsitutes the corresponding defintions in | 33 | ;; better in that case to use rxvt's initializion function. |
| 34 | ;;; function-key-map. This substitution is needed because if a key | 34 | (if (and (getenv "COLORTERM") |
| 35 | ;;; definition if found in function-key-map, there are no further | 35 | (string-match "\\`rxvt" (getenv "COLORTERM"))) |
| 36 | ;;; lookups in other keymaps. | 36 | (progn |
| 37 | (substitute-key-definition [f13] [S-f1] function-key-map) | 37 | (load "term/rxvt") |
| 38 | (substitute-key-definition [f14] [S-f2] function-key-map) | 38 | (terminal-init-rxvt)) |
| 39 | (substitute-key-definition [f15] [S-f3] function-key-map) | 39 | |
| 40 | (substitute-key-definition [f16] [S-f4] function-key-map) | 40 | ;; The terminal intialization C code file might have initialized |
| 41 | (substitute-key-definition [f17] [S-f5] function-key-map) | 41 | ;; function keys F13->F60 from the termcap/terminfo information. On |
| 42 | (substitute-key-definition [f18] [S-f6] function-key-map) | 42 | ;; a PC-style keyboard these keys correspond to |
| 43 | (substitute-key-definition [f19] [S-f7] function-key-map) | 43 | ;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The |
| 44 | (substitute-key-definition [f20] [S-f8] function-key-map) | 44 | ;; code here subsitutes the corresponding defintions in |
| 45 | (substitute-key-definition [f21] [S-f9] function-key-map) | 45 | ;; function-key-map. This substitution is needed because if a key |
| 46 | (substitute-key-definition [f22] [S-f10] function-key-map) | 46 | ;; definition if found in function-key-map, there are no further |
| 47 | (substitute-key-definition [f23] [S-f11] function-key-map) | 47 | ;; lookups in other keymaps. |
| 48 | (substitute-key-definition [f24] [S-f12] function-key-map) | 48 | (substitute-key-definition [f13] [S-f1] function-key-map) |
| 49 | 49 | (substitute-key-definition [f14] [S-f2] function-key-map) | |
| 50 | (substitute-key-definition [f25] [C-f1] function-key-map) | 50 | (substitute-key-definition [f15] [S-f3] function-key-map) |
| 51 | (substitute-key-definition [f26] [C-f2] function-key-map) | 51 | (substitute-key-definition [f16] [S-f4] function-key-map) |
| 52 | (substitute-key-definition [f27] [C-f3] function-key-map) | 52 | (substitute-key-definition [f17] [S-f5] function-key-map) |
| 53 | (substitute-key-definition [f28] [C-f4] function-key-map) | 53 | (substitute-key-definition [f18] [S-f6] function-key-map) |
| 54 | (substitute-key-definition [f29] [C-f5] function-key-map) | 54 | (substitute-key-definition [f19] [S-f7] function-key-map) |
| 55 | (substitute-key-definition [f30] [C-f6] function-key-map) | 55 | (substitute-key-definition [f20] [S-f8] function-key-map) |
| 56 | (substitute-key-definition [f31] [C-f7] function-key-map) | 56 | (substitute-key-definition [f21] [S-f9] function-key-map) |
| 57 | (substitute-key-definition [f32] [C-f8] function-key-map) | 57 | (substitute-key-definition [f22] [S-f10] function-key-map) |
| 58 | (substitute-key-definition [f33] [C-f9] function-key-map) | 58 | (substitute-key-definition [f23] [S-f11] function-key-map) |
| 59 | (substitute-key-definition [f34] [C-f10] function-key-map) | 59 | (substitute-key-definition [f24] [S-f12] function-key-map) |
| 60 | (substitute-key-definition [f35] [C-f11] function-key-map) | 60 | |
| 61 | (substitute-key-definition [f36] [C-f12] function-key-map) | 61 | (substitute-key-definition [f25] [C-f1] function-key-map) |
| 62 | 62 | (substitute-key-definition [f26] [C-f2] function-key-map) | |
| 63 | (substitute-key-definition [f37] [C-S-f1] function-key-map) | 63 | (substitute-key-definition [f27] [C-f3] function-key-map) |
| 64 | (substitute-key-definition [f38] [C-S-f2] function-key-map) | 64 | (substitute-key-definition [f28] [C-f4] function-key-map) |
| 65 | (substitute-key-definition [f39] [C-S-f3] function-key-map) | 65 | (substitute-key-definition [f29] [C-f5] function-key-map) |
| 66 | (substitute-key-definition [f40] [C-S-f4] function-key-map) | 66 | (substitute-key-definition [f30] [C-f6] function-key-map) |
| 67 | (substitute-key-definition [f41] [C-S-f5] function-key-map) | 67 | (substitute-key-definition [f31] [C-f7] function-key-map) |
| 68 | (substitute-key-definition [f42] [C-S-f6] function-key-map) | 68 | (substitute-key-definition [f32] [C-f8] function-key-map) |
| 69 | (substitute-key-definition [f43] [C-S-f7] function-key-map) | 69 | (substitute-key-definition [f33] [C-f9] function-key-map) |
| 70 | (substitute-key-definition [f44] [C-S-f8] function-key-map) | 70 | (substitute-key-definition [f34] [C-f10] function-key-map) |
| 71 | (substitute-key-definition [f45] [C-S-f9] function-key-map) | 71 | (substitute-key-definition [f35] [C-f11] function-key-map) |
| 72 | (substitute-key-definition [f46] [C-S-f10] function-key-map) | 72 | (substitute-key-definition [f36] [C-f12] function-key-map) |
| 73 | (substitute-key-definition [f47] [C-S-f11] function-key-map) | 73 | |
| 74 | (substitute-key-definition [f48] [C-S-f12] function-key-map) | 74 | (substitute-key-definition [f37] [C-S-f1] function-key-map) |
| 75 | 75 | (substitute-key-definition [f38] [C-S-f2] function-key-map) | |
| 76 | (substitute-key-definition [f49] [A-f1] function-key-map) | 76 | (substitute-key-definition [f39] [C-S-f3] function-key-map) |
| 77 | (substitute-key-definition [f50] [A-f2] function-key-map) | 77 | (substitute-key-definition [f40] [C-S-f4] function-key-map) |
| 78 | (substitute-key-definition [f51] [A-f3] function-key-map) | 78 | (substitute-key-definition [f41] [C-S-f5] function-key-map) |
| 79 | (substitute-key-definition [f52] [A-f4] function-key-map) | 79 | (substitute-key-definition [f42] [C-S-f6] function-key-map) |
| 80 | (substitute-key-definition [f53] [A-f5] function-key-map) | 80 | (substitute-key-definition [f43] [C-S-f7] function-key-map) |
| 81 | (substitute-key-definition [f54] [A-f6] function-key-map) | 81 | (substitute-key-definition [f44] [C-S-f8] function-key-map) |
| 82 | (substitute-key-definition [f55] [A-f7] function-key-map) | 82 | (substitute-key-definition [f45] [C-S-f9] function-key-map) |
| 83 | (substitute-key-definition [f56] [A-f8] function-key-map) | 83 | (substitute-key-definition [f46] [C-S-f10] function-key-map) |
| 84 | (substitute-key-definition [f57] [A-f9] function-key-map) | 84 | (substitute-key-definition [f47] [C-S-f11] function-key-map) |
| 85 | (substitute-key-definition [f58] [A-f10] function-key-map) | 85 | (substitute-key-definition [f48] [C-S-f12] function-key-map) |
| 86 | (substitute-key-definition [f59] [A-f11] function-key-map) | 86 | |
| 87 | (substitute-key-definition [f60] [A-f12] function-key-map) | 87 | (substitute-key-definition [f49] [A-f1] function-key-map) |
| 88 | 88 | (substitute-key-definition [f50] [A-f2] function-key-map) | |
| 89 | (let ((map (make-sparse-keymap))) | 89 | (substitute-key-definition [f51] [A-f3] function-key-map) |
| 90 | (define-key map "\e[A" [up]) | 90 | (substitute-key-definition [f52] [A-f4] function-key-map) |
| 91 | (define-key map "\e[B" [down]) | 91 | (substitute-key-definition [f53] [A-f5] function-key-map) |
| 92 | (define-key map "\e[C" [right]) | 92 | (substitute-key-definition [f54] [A-f6] function-key-map) |
| 93 | (define-key map "\e[D" [left]) | 93 | (substitute-key-definition [f55] [A-f7] function-key-map) |
| 94 | (define-key map "\e[1~" [home]) | 94 | (substitute-key-definition [f56] [A-f8] function-key-map) |
| 95 | (define-key map "\e[2~" [insert]) | 95 | (substitute-key-definition [f57] [A-f9] function-key-map) |
| 96 | (define-key map "\e[3~" [delete]) | 96 | (substitute-key-definition [f58] [A-f10] function-key-map) |
| 97 | (define-key map "\e[4~" [select]) | 97 | (substitute-key-definition [f59] [A-f11] function-key-map) |
| 98 | (define-key map "\e[5~" [prior]) | 98 | (substitute-key-definition [f60] [A-f12] function-key-map) |
| 99 | (define-key map "\e[6~" [next]) | 99 | |
| 100 | (define-key map "\e[11~" [f1]) | 100 | (let ((map (make-sparse-keymap))) |
| 101 | (define-key map "\e[12~" [f2]) | 101 | (define-key map "\e[A" [up]) |
| 102 | (define-key map "\e[13~" [f3]) | 102 | (define-key map "\e[B" [down]) |
| 103 | (define-key map "\e[14~" [f4]) | 103 | (define-key map "\e[C" [right]) |
| 104 | (define-key map "\e[15~" [f5]) | 104 | (define-key map "\e[D" [left]) |
| 105 | (define-key map "\e[17~" [f6]) | 105 | (define-key map "\e[1~" [home]) |
| 106 | (define-key map "\e[18~" [f7]) | 106 | (define-key map "\e[2~" [insert]) |
| 107 | (define-key map "\e[19~" [f8]) | 107 | (define-key map "\e[3~" [delete]) |
| 108 | (define-key map "\e[20~" [f9]) | 108 | (define-key map "\e[4~" [select]) |
| 109 | (define-key map "\e[21~" [f10]) | 109 | (define-key map "\e[5~" [prior]) |
| 110 | (define-key map "\e[23~" [f11]) | 110 | (define-key map "\e[6~" [next]) |
| 111 | (define-key map "\e[24~" [f12]) | 111 | (define-key map "\e[11~" [f1]) |
| 112 | (define-key map "\e[29~" [print]) | 112 | (define-key map "\e[12~" [f2]) |
| 113 | 113 | (define-key map "\e[13~" [f3]) | |
| 114 | (define-key map "\eOP" [f1]) | 114 | (define-key map "\e[14~" [f4]) |
| 115 | (define-key map "\eOQ" [f2]) | 115 | (define-key map "\e[15~" [f5]) |
| 116 | (define-key map "\eOR" [f3]) | 116 | (define-key map "\e[17~" [f6]) |
| 117 | (define-key map "\eOS" [f4]) | 117 | (define-key map "\e[18~" [f7]) |
| 118 | 118 | (define-key map "\e[19~" [f8]) | |
| 119 | (define-key map "\eO2P" [S-f1]) | 119 | (define-key map "\e[20~" [f9]) |
| 120 | (define-key map "\eO2Q" [S-f2]) | 120 | (define-key map "\e[21~" [f10]) |
| 121 | (define-key map "\eO2R" [S-f3]) | 121 | (define-key map "\e[23~" [f11]) |
| 122 | (define-key map "\eO2S" [S-f4]) | 122 | (define-key map "\e[24~" [f12]) |
| 123 | (define-key map "\e[15;2~" [S-f5]) | 123 | (define-key map "\e[29~" [print]) |
| 124 | (define-key map "\e[17;2~" [S-f6]) | 124 | |
| 125 | (define-key map "\e[18;2~" [S-f7]) | 125 | (define-key map "\eOP" [f1]) |
| 126 | (define-key map "\e[19;2~" [S-f8]) | 126 | (define-key map "\eOQ" [f2]) |
| 127 | (define-key map "\e[20;2~" [S-f9]) | 127 | (define-key map "\eOR" [f3]) |
| 128 | (define-key map "\e[21;2~" [S-f10]) | 128 | (define-key map "\eOS" [f4]) |
| 129 | (define-key map "\e[23;2~" [S-f11]) | 129 | |
| 130 | (define-key map "\e[24;2~" [S-f12]) | 130 | (define-key map "\eO2P" [S-f1]) |
| 131 | 131 | (define-key map "\eO2Q" [S-f2]) | |
| 132 | (define-key map "\eO5P" [C-f1]) | 132 | (define-key map "\eO2R" [S-f3]) |
| 133 | (define-key map "\eO5Q" [C-f2]) | 133 | (define-key map "\eO2S" [S-f4]) |
| 134 | (define-key map "\eO5R" [C-f3]) | 134 | (define-key map "\e[15;2~" [S-f5]) |
| 135 | (define-key map "\eO5S" [C-f4]) | 135 | (define-key map "\e[17;2~" [S-f6]) |
| 136 | (define-key map "\e[15;5~" [C-f5]) | 136 | (define-key map "\e[18;2~" [S-f7]) |
| 137 | (define-key map "\e[17;5~" [C-f6]) | 137 | (define-key map "\e[19;2~" [S-f8]) |
| 138 | (define-key map "\e[18;5~" [C-f7]) | 138 | (define-key map "\e[20;2~" [S-f9]) |
| 139 | (define-key map "\e[19;5~" [C-f8]) | 139 | (define-key map "\e[21;2~" [S-f10]) |
| 140 | (define-key map "\e[20;5~" [C-f9]) | 140 | (define-key map "\e[23;2~" [S-f11]) |
| 141 | (define-key map "\e[21;5~" [C-f10]) | 141 | (define-key map "\e[24;2~" [S-f12]) |
| 142 | (define-key map "\e[23;5~" [C-f11]) | 142 | |
| 143 | (define-key map "\e[24;5~" [C-f12]) | 143 | (define-key map "\eO5P" [C-f1]) |
| 144 | 144 | (define-key map "\eO5Q" [C-f2]) | |
| 145 | (define-key map "\eO6P" [C-S-f1]) | 145 | (define-key map "\eO5R" [C-f3]) |
| 146 | (define-key map "\eO6Q" [C-S-f2]) | 146 | (define-key map "\eO5S" [C-f4]) |
| 147 | (define-key map "\eO6R" [C-S-f3]) | 147 | (define-key map "\e[15;5~" [C-f5]) |
| 148 | (define-key map "\eO6S" [C-S-f4]) | 148 | (define-key map "\e[17;5~" [C-f6]) |
| 149 | (define-key map "\e[15;6~" [C-S-f5]) | 149 | (define-key map "\e[18;5~" [C-f7]) |
| 150 | (define-key map "\e[17;6~" [C-S-f6]) | 150 | (define-key map "\e[19;5~" [C-f8]) |
| 151 | (define-key map "\e[18;6~" [C-S-f7]) | 151 | (define-key map "\e[20;5~" [C-f9]) |
| 152 | (define-key map "\e[19;6~" [C-S-f8]) | 152 | (define-key map "\e[21;5~" [C-f10]) |
| 153 | (define-key map "\e[20;6~" [C-S-f9]) | 153 | (define-key map "\e[23;5~" [C-f11]) |
| 154 | (define-key map "\e[21;6~" [C-S-f10]) | 154 | (define-key map "\e[24;5~" [C-f12]) |
| 155 | (define-key map "\e[23;6~" [C-S-f11]) | 155 | |
| 156 | (define-key map "\e[24;6~" [C-S-f12]) | 156 | (define-key map "\eO6P" [C-S-f1]) |
| 157 | 157 | (define-key map "\eO6Q" [C-S-f2]) | |
| 158 | (define-key map "\eO3P" [A-f1]) | 158 | (define-key map "\eO6R" [C-S-f3]) |
| 159 | (define-key map "\eO3Q" [A-f2]) | 159 | (define-key map "\eO6S" [C-S-f4]) |
| 160 | (define-key map "\eO3R" [A-f3]) | 160 | (define-key map "\e[15;6~" [C-S-f5]) |
| 161 | (define-key map "\eO3S" [A-f4]) | 161 | (define-key map "\e[17;6~" [C-S-f6]) |
| 162 | (define-key map "\e[15;3~" [A-f5]) | 162 | (define-key map "\e[18;6~" [C-S-f7]) |
| 163 | (define-key map "\e[17;3~" [A-f6]) | 163 | (define-key map "\e[19;6~" [C-S-f8]) |
| 164 | (define-key map "\e[18;3~" [A-f7]) | 164 | (define-key map "\e[20;6~" [C-S-f9]) |
| 165 | (define-key map "\e[19;3~" [A-f8]) | 165 | (define-key map "\e[21;6~" [C-S-f10]) |
| 166 | (define-key map "\e[20;3~" [A-f9]) | 166 | (define-key map "\e[23;6~" [C-S-f11]) |
| 167 | (define-key map "\e[21;3~" [A-f10]) | 167 | (define-key map "\e[24;6~" [C-S-f12]) |
| 168 | (define-key map "\e[23;3~" [A-f11]) | 168 | |
| 169 | (define-key map "\e[24;3~" [A-f12]) | 169 | (define-key map "\eO3P" [A-f1]) |
| 170 | 170 | (define-key map "\eO3Q" [A-f2]) | |
| 171 | (define-key map "\e[1;2A" [S-up]) | 171 | (define-key map "\eO3R" [A-f3]) |
| 172 | (define-key map "\e[1;2B" [S-down]) | 172 | (define-key map "\eO3S" [A-f4]) |
| 173 | (define-key map "\e[1;2C" [S-right]) | 173 | (define-key map "\e[15;3~" [A-f5]) |
| 174 | (define-key map "\e[1;2D" [S-left]) | 174 | (define-key map "\e[17;3~" [A-f6]) |
| 175 | (define-key map "\e[1;2F" [S-end]) | 175 | (define-key map "\e[18;3~" [A-f7]) |
| 176 | (define-key map "\e[1;2H" [S-home]) | 176 | (define-key map "\e[19;3~" [A-f8]) |
| 177 | 177 | (define-key map "\e[20;3~" [A-f9]) | |
| 178 | (define-key map "\e[1;5A" [C-up]) | 178 | (define-key map "\e[21;3~" [A-f10]) |
| 179 | (define-key map "\e[1;5B" [C-down]) | 179 | (define-key map "\e[23;3~" [A-f11]) |
| 180 | (define-key map "\e[1;5C" [C-right]) | 180 | (define-key map "\e[24;3~" [A-f12]) |
| 181 | (define-key map "\e[1;5D" [C-left]) | 181 | |
| 182 | (define-key map "\e[1;5F" [C-end]) | 182 | (define-key map "\e[1;2A" [S-up]) |
| 183 | (define-key map "\e[1;5H" [C-home]) | 183 | (define-key map "\e[1;2B" [S-down]) |
| 184 | 184 | (define-key map "\e[1;2C" [S-right]) | |
| 185 | (define-key map "\e[1;6A" [C-S-up]) | 185 | (define-key map "\e[1;2D" [S-left]) |
| 186 | (define-key map "\e[1;6B" [C-S-down]) | 186 | (define-key map "\e[1;2F" [S-end]) |
| 187 | (define-key map "\e[1;6C" [C-S-right]) | 187 | (define-key map "\e[1;2H" [S-home]) |
| 188 | (define-key map "\e[1;6D" [C-S-left]) | 188 | |
| 189 | (define-key map "\e[1;6F" [C-S-end]) | 189 | (define-key map "\e[1;5A" [C-up]) |
| 190 | (define-key map "\e[1;6H" [C-S-home]) | 190 | (define-key map "\e[1;5B" [C-down]) |
| 191 | 191 | (define-key map "\e[1;5C" [C-right]) | |
| 192 | (define-key map "\e[1;3A" [A-up]) | 192 | (define-key map "\e[1;5D" [C-left]) |
| 193 | (define-key map "\e[1;3B" [A-down]) | 193 | (define-key map "\e[1;5F" [C-end]) |
| 194 | (define-key map "\e[1;3C" [A-right]) | 194 | (define-key map "\e[1;5H" [C-home]) |
| 195 | (define-key map "\e[1;3D" [A-left]) | 195 | |
| 196 | (define-key map "\e[1;3F" [A-end]) | 196 | (define-key map "\e[1;6A" [C-S-up]) |
| 197 | (define-key map "\e[1;3H" [A-home]) | 197 | (define-key map "\e[1;6B" [C-S-down]) |
| 198 | 198 | (define-key map "\e[1;6C" [C-S-right]) | |
| 199 | (define-key map "\e[2;2~" [S-insert]) | 199 | (define-key map "\e[1;6D" [C-S-left]) |
| 200 | (define-key map "\e[3;2~" [S-delete]) | 200 | (define-key map "\e[1;6F" [C-S-end]) |
| 201 | (define-key map "\e[5;2~" [S-prior]) | 201 | (define-key map "\e[1;6H" [C-S-home]) |
| 202 | (define-key map "\e[6;2~" [S-next]) | 202 | |
| 203 | 203 | (define-key map "\e[1;3A" [A-up]) | |
| 204 | (define-key map "\e[2;5~" [C-insert]) | 204 | (define-key map "\e[1;3B" [A-down]) |
| 205 | (define-key map "\e[3;5~" [C-delete]) | 205 | (define-key map "\e[1;3C" [A-right]) |
| 206 | (define-key map "\e[5;5~" [C-prior]) | 206 | (define-key map "\e[1;3D" [A-left]) |
| 207 | (define-key map "\e[6;5~" [C-next]) | 207 | (define-key map "\e[1;3F" [A-end]) |
| 208 | 208 | (define-key map "\e[1;3H" [A-home]) | |
| 209 | (define-key map "\e[2;6~" [C-S-insert]) | 209 | |
| 210 | (define-key map "\e[3;6~" [C-S-delete]) | 210 | (define-key map "\e[2;2~" [S-insert]) |
| 211 | (define-key map "\e[5;6~" [C-S-prior]) | 211 | (define-key map "\e[3;2~" [S-delete]) |
| 212 | (define-key map "\e[6;6~" [C-S-next]) | 212 | (define-key map "\e[5;2~" [S-prior]) |
| 213 | 213 | (define-key map "\e[6;2~" [S-next]) | |
| 214 | (define-key map "\e[2;3~" [A-insert]) | 214 | |
| 215 | (define-key map "\e[3;3~" [A-delete]) | 215 | (define-key map "\e[2;5~" [C-insert]) |
| 216 | (define-key map "\e[5;3~" [A-prior]) | 216 | (define-key map "\e[3;5~" [C-delete]) |
| 217 | (define-key map "\e[6;3~" [A-next]) | 217 | (define-key map "\e[5;5~" [C-prior]) |
| 218 | 218 | (define-key map "\e[6;5~" [C-next]) | |
| 219 | (define-key map "\eOA" [up]) | 219 | |
| 220 | (define-key map "\eOB" [down]) | 220 | (define-key map "\e[2;6~" [C-S-insert]) |
| 221 | (define-key map "\eOC" [right]) | 221 | (define-key map "\e[3;6~" [C-S-delete]) |
| 222 | (define-key map "\eOD" [left]) | 222 | (define-key map "\e[5;6~" [C-S-prior]) |
| 223 | (define-key map "\eOF" [end]) | 223 | (define-key map "\e[6;6~" [C-S-next]) |
| 224 | (define-key map "\eOH" [home]) | 224 | |
| 225 | 225 | (define-key map "\e[2;3~" [A-insert]) | |
| 226 | (define-key map "\eO2A" [S-up]) | 226 | (define-key map "\e[3;3~" [A-delete]) |
| 227 | (define-key map "\eO2B" [S-down]) | 227 | (define-key map "\e[5;3~" [A-prior]) |
| 228 | (define-key map "\eO2C" [S-right]) | 228 | (define-key map "\e[6;3~" [A-next]) |
| 229 | (define-key map "\eO2D" [S-left]) | 229 | |
| 230 | (define-key map "\eO2F" [S-end]) | 230 | (define-key map "\eOA" [up]) |
| 231 | (define-key map "\eO2H" [S-home]) | 231 | (define-key map "\eOB" [down]) |
| 232 | 232 | (define-key map "\eOC" [right]) | |
| 233 | (define-key map "\eO5A" [C-up]) | 233 | (define-key map "\eOD" [left]) |
| 234 | (define-key map "\eO5B" [C-down]) | 234 | (define-key map "\eOF" [end]) |
| 235 | (define-key map "\eO5C" [C-right]) | 235 | (define-key map "\eOH" [home]) |
| 236 | (define-key map "\eO5D" [C-left]) | 236 | |
| 237 | (define-key map "\eO5F" [C-end]) | 237 | (define-key map "\eO2A" [S-up]) |
| 238 | (define-key map "\eO5H" [C-home]) | 238 | (define-key map "\eO2B" [S-down]) |
| 239 | 239 | (define-key map "\eO2C" [S-right]) | |
| 240 | ;; Use inheritance to let the main keymap override those defaults. | 240 | (define-key map "\eO2D" [S-left]) |
| 241 | ;; This way we don't override terminfo-derived settings or settings | 241 | (define-key map "\eO2F" [S-end]) |
| 242 | ;; made in the .emacs file. | 242 | (define-key map "\eO2H" [S-home]) |
| 243 | (set-keymap-parent map (keymap-parent function-key-map)) | 243 | |
| 244 | (set-keymap-parent function-key-map map)) | 244 | (define-key map "\eO5A" [C-up]) |
| 245 | (define-key map "\eO5B" [C-down]) | ||
| 246 | (define-key map "\eO5C" [C-right]) | ||
| 247 | (define-key map "\eO5D" [C-left]) | ||
| 248 | (define-key map "\eO5F" [C-end]) | ||
| 249 | (define-key map "\eO5H" [C-home]) | ||
| 250 | |||
| 251 | ;; Use inheritance to let the main keymap override those defaults. | ||
| 252 | ;; This way we don't override terminfo-derived settings or settings | ||
| 253 | ;; made in the .emacs file. | ||
| 254 | (set-keymap-parent map (keymap-parent function-key-map)) | ||
| 255 | (set-keymap-parent function-key-map map)) | ||
| 256 | |||
| 257 | ;; Do it! | ||
| 258 | (xterm-register-default-colors) | ||
| 259 | ;; This recomputes all the default faces given the colors we've just set up. | ||
| 260 | (tty-set-up-initial-frame-faces))) | ||
| 245 | 261 | ||
| 246 | ;; Set up colors, for those versions of xterm that support it. | 262 | ;; Set up colors, for those versions of xterm that support it. |
| 247 | (defvar xterm-standard-colors | 263 | (defvar xterm-standard-colors |
| @@ -359,38 +375,5 @@ versions of xterm." | |||
| 359 | ;; right colors, so clear them. | 375 | ;; right colors, so clear them. |
| 360 | (clear-face-cache))) | 376 | (clear-face-cache))) |
| 361 | 377 | ||
| 362 | ;; rxvt puts the default colors into an environment variable | ||
| 363 | ;; COLORFGBG. We use this to set the background mode in a more | ||
| 364 | ;; intelligent way than the default guesswork in startup.el. | ||
| 365 | (defun xterm-rxvt-set-background-mode () | ||
| 366 | "Set background mode as appropriate for the default rxvt colors." | ||
| 367 | (let ((fgbg (getenv "COLORFGBG")) | ||
| 368 | bg rgb) | ||
| 369 | (setq default-frame-background-mode 'light) | ||
| 370 | (when (and fgbg | ||
| 371 | (string-match ".*;\\([0-9][0-9]?\\)\\'" fgbg)) | ||
| 372 | (setq bg (string-to-number (substring fgbg (match-beginning 1)))) | ||
| 373 | ;; The next line assumes that xterm-standard-colors are ordered | ||
| 374 | ;; by the color index in the ascending order! | ||
| 375 | (setq rgb (car (cddr (nth bg xterm-standard-colors)))) | ||
| 376 | ;; See the commentary in frame-set-background-mode about the | ||
| 377 | ;; computation below. | ||
| 378 | (if (< (apply '+ rgb) | ||
| 379 | ;; The following line assumes that white is the 15th | ||
| 380 | ;; color in xterm-standard-colors. | ||
| 381 | (* (apply '+ (car (cddr (nth 15 xterm-standard-colors)))) 0.6)) | ||
| 382 | (setq default-frame-background-mode 'dark))) | ||
| 383 | (frame-set-background-mode (selected-frame)))) | ||
| 384 | |||
| 385 | ;; Do it! | ||
| 386 | (xterm-register-default-colors) | ||
| 387 | ;; If this xterm is actually a disguised rxvt, be more intelligent about | ||
| 388 | ;; determining the background mode. | ||
| 389 | (and (getenv "COLORTERM") | ||
| 390 | (string-match "\\`rxvt" (getenv "COLORTERM")) | ||
| 391 | (xterm-rxvt-set-background-mode)) | ||
| 392 | ;; This recomputes all the default faces given the colors we've just set up. | ||
| 393 | (tty-set-up-initial-frame-faces) | ||
| 394 | |||
| 395 | ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a | 378 | ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a |
| 396 | ;;; xterm.el ends here | 379 | ;;; xterm.el ends here |
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 309edde1749..c8991c07e54 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el | |||
| @@ -159,7 +159,7 @@ This might return nil if the event did not occur over a buffer." | |||
| 159 | With ARG, turn tooltip mode on if and only if ARG is positive." | 159 | With ARG, turn tooltip mode on if and only if ARG is positive." |
| 160 | :global t | 160 | :global t |
| 161 | :init-value (not (or noninteractive | 161 | :init-value (not (or noninteractive |
| 162 | emacs-quick-startup | 162 | emacs-basic-display |
| 163 | (not (display-graphic-p)) | 163 | (not (display-graphic-p)) |
| 164 | (not (fboundp 'x-show-tip)))) | 164 | (not (fboundp 'x-show-tip)))) |
| 165 | :initialize 'custom-initialize-safe-default | 165 | :initialize 'custom-initialize-safe-default |