From: Karoly Lorentey Date: Sun, 22 Apr 2007 12:12:29 +0000 (+0000) Subject: Merged from emacs@sv.gnu.org X-Git-Tag: emacs-pretest-23.0.90~11236^2~141^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e18c709364b095ea0be8ecabe458ac9a642a252f;p=emacs.git Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-660 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-661 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-662 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-663 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-664 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-665 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-666 Fix read-only prompt problem in isearch * emacs@sv.gnu.org/emacs--devo--0--patch-667 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-668 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-669 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-670 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-671 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-672 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-673 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-206 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-207 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-208 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-600 --- e18c709364b095ea0be8ecabe458ac9a642a252f diff --cc lisp/faces.el index 4c058ba1fd3,16598c2d581..904db10efa5 --- a/lisp/faces.el +++ b/lisp/faces.el @@@ -1804,8 -1790,12 +1804,12 @@@ Initialize colors of certain faces fro (progn (face-spec-set face (face-user-default-spec face) frame) (internal-merge-in-global-face face frame) - (if (memq window-system '(x w32 mac)) + (if (memq (window-system frame) '(x w32 mac)) - (make-face-x-resource-internal face frame))) + (make-face-x-resource-internal face frame)) + ;; If the user has customized the face, don't let X + ;; resources override the customizations. + (if (get face 'theme-face) + (custom-theme-recalc-face face))) (error nil))) ;; Apply the attributes specified by frame parameters. This ;; rewrites parameters changed by make-face-x-resource-internal diff --cc lisp/ldefs-boot.el index 923b309a1dd,68c79ed49f3..f9dac3493f1 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@@ -63,7 -63,7 +63,7 @@@ should return a grid vector array that ;;;*** - ;;;### (autoloads nil "abbrev" "abbrev.el" (17888 32278)) -;;;### (autoloads nil "abbrev" "abbrev.el" (17905 55681)) ++;;;### (autoloads nil "abbrev" "abbrev.el" (17963 19063)) ;;; Generated autoloads from abbrev.el (put 'abbrev-mode 'safe-local-variable 'booleanp) @@@ -830,7 -830,7 +830,7 @@@ setup for auto-startup ;;;*** ;;;### (autoloads (ange-ftp-hook-function ange-ftp-reread-dir) "ange-ftp" - ;;;;;; "net/ange-ftp.el" (17888 36583)) -;;;;;; "net/ange-ftp.el" (17905 9579)) ++;;;;;; "net/ange-ftp.el" (17963 19063)) ;;; Generated autoloads from net/ange-ftp.el (defalias (quote ange-ftp-re-read-dir) (quote ange-ftp-reread-dir)) @@@ -1611,7 -1595,7 +1611,7 @@@ Calls `update-directory-autoloads' on t ;;;### (autoloads (global-auto-revert-mode turn-on-auto-revert-tail-mode ;;;;;; auto-revert-tail-mode turn-on-auto-revert-mode auto-revert-mode) - ;;;;;; "autorevert" "autorevert.el" (17888 32278)) -;;;;;; "autorevert" "autorevert.el" (17916 20866)) ++;;;;;; "autorevert" "autorevert.el" (17963 19298)) ;;; Generated autoloads from autorevert.el (autoload (quote auto-revert-mode) "autorevert" "\ @@@ -2687,7 -2671,7 +2687,7 @@@ Also see `make-text-button' ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile ;;;;;; compile-defun byte-compile-file byte-recompile-directory ;;;;;; byte-force-recompile byte-compile-warnings-safe-p) "bytecomp" - ;;;;;; "emacs-lisp/bytecomp.el" (17888 36933)) -;;;;;; "emacs-lisp/bytecomp.el" (17908 29081)) ++;;;;;; "emacs-lisp/bytecomp.el" (17963 19282)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) @@@ -2793,7 -2777,7 +2793,7 @@@ and corresponding effects ;;;*** - ;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (17888 32279)) -;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (17916 10823)) ++;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (17963 19298)) ;;; Generated autoloads from calendar/cal-dst.el (put (quote calendar-daylight-savings-starts) (quote risky-local-variable) t) @@@ -2818,7 -2802,7 +2818,7 @@@ from the cursor position ;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle ;;;;;; calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc ;;;;;; full-calc calc calc-dispatch calc-settings-file) "calc" "calc/calc.el" - ;;;;;; (17888 32278)) -;;;;;; (17919 4936)) ++;;;;;; (17963 19309)) ;;; Generated autoloads from calc/calc.el (defvar calc-settings-file (convert-standard-filename "~/.calc.el") "\ @@@ -2925,7 -2909,7 +2925,7 @@@ See the documentation for `calculator-m ;;;;;; mark-holidays-in-calendar view-calendar-holidays-initially ;;;;;; calendar-remove-frame-by-deleting mark-diary-entries-in-calendar ;;;;;; view-diary-entries-initially calendar-offset) "calendar" - ;;;;;; "calendar/calendar.el" (17888 32279)) -;;;;;; "calendar/calendar.el" (17916 10881)) ++;;;;;; "calendar/calendar.el" (17963 20580)) ;;; Generated autoloads from calendar/calendar.el (defvar calendar-offset 0 "\ @@@ -3322,7 -3306,7 +3322,7 @@@ diary buffer will not show days for whi if that day is a holiday; if you want such days to be shown in the fancy diary buffer, set the variable `diary-list-include-blanks' to t.") --(custom-autoload (quote diary-display-hook) "calendar" t) ++(custom-autoload (quote diary-display-hook) "calendar" nil) (defvar nongregorian-diary-listing-hook nil "\ List of functions called for listing diary file and included files. @@@ -3523,7 -3507,7 +3523,7 @@@ it fails ;;;*** ;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el" - ;;;;;; (17888 36644)) -;;;;;; (17904 34206)) ++;;;;;; (17963 19063)) ;;; Generated autoloads from progmodes/cc-engine.el (autoload (quote c-guess-basic-syntax) "cc-engine" "\ @@@ -3535,7 -3519,7 +3535,7 @@@ Return the syntactic context of the cur ;;;### (autoloads (pike-mode idl-mode java-mode objc-mode c++-mode ;;;;;; c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el" - ;;;;;; (17888 32281)) -;;;;;; (17905 59795)) ++;;;;;; (17963 19063)) ;;; Generated autoloads from progmodes/cc-mode.el (autoload (quote c-initialize-cc-mode) "cc-mode" "\ @@@ -4483,7 -4467,7 +4483,7 @@@ read/written by MS-DOS software, or fo ;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list ;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command ;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el" - ;;;;;; (17888 37037)) -;;;;;; (17916 11954)) ++;;;;;; (17963 19298)) ;;; Generated autoloads from comint.el (defvar comint-output-filter-functions (quote (comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt)) "\ @@@ -4611,7 -4595,7 +4611,7 @@@ on third call it again advances points ;;;;;; compilation-shell-minor-mode compilation-mode compilation-start ;;;;;; compile compilation-disable-input compile-command compilation-search-path ;;;;;; compilation-ask-about-save compilation-window-height compilation-mode-hook) - ;;;;;; "compile" "progmodes/compile.el" (17888 32281)) -;;;;;; "compile" "progmodes/compile.el" (17917 19252)) ++;;;;;; "compile" "progmodes/compile.el" (17963 19298)) ;;; Generated autoloads from progmodes/compile.el (defvar compilation-mode-hook nil "\ @@@ -4773,7 -4757,7 +4773,7 @@@ This is the value of `next-error-functi ;;;*** ;;;### (autoloads (partial-completion-mode) "complete" "complete.el" - ;;;;;; (17888 32279)) -;;;;;; (17906 28255)) ++;;;;;; (17963 19063)) ;;; Generated autoloads from complete.el (defvar partial-completion-mode nil "\ @@@ -5275,7 -5259,7 +5275,7 @@@ Insert a copyright by $ORGANIZATION not ;;;*** ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) - ;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (17888 32281)) -;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (17899 1957)) ++;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (17963 19041)) ;;; Generated autoloads from progmodes/cperl-mode.el (autoload (quote cperl-mode) "cperl-mode" "\ @@@ -5613,7 -5597,7 +5613,7 @@@ Enable CUA selection mode without the C ;;;;;; customize-mode customize customize-save-variable customize-set-variable ;;;;;; customize-set-value custom-menu-sort-alphabetically custom-buffer-sort-alphabetically ;;;;;; custom-browse-sort-alphabetically) "cus-edit" "cus-edit.el" - ;;;;;; (17888 37037)) -;;;;;; (17900 13368)) ++;;;;;; (17963 19047)) ;;; Generated autoloads from cus-edit.el (defvar custom-browse-sort-alphabetically nil "\ @@@ -6757,7 -6735,7 +6751,7 @@@ Not documente ;;;*** ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" - ;;;;;; "calendar/diary-lib.el" (17888 32279)) -;;;;;; "calendar/diary-lib.el" (17916 10940)) ++;;;;;; "calendar/diary-lib.el" (17963 20580)) ;;; Generated autoloads from calendar/diary-lib.el (autoload (quote diary) "diary-lib" "\ @@@ -6837,7 -6815,7 +6831,7 @@@ With prefix arg, prompt for diff switch ;;;*** ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el" - ;;;;;; (17888 36650)) -;;;;;; (17907 56729)) ++;;;;;; (17963 19282)) ;;; Generated autoloads from diff-mode.el (autoload (quote diff-mode) "diff-mode" "\ @@@ -8488,7 -8472,7 +8488,7 @@@ With prefix arg NOCONFIRM, execute curr ;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form ;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug" - ;;;;;; "emacs-lisp/edebug.el" (17888 32279)) -;;;;;; "emacs-lisp/edebug.el" (17899 1919)) ++;;;;;; "emacs-lisp/edebug.el" (17963 19041)) ;;; Generated autoloads from emacs-lisp/edebug.el (defvar edebug-all-defs nil "\ @@@ -9059,7 -9043,7 +9059,7 @@@ displayed ;;;*** ;;;### (autoloads (report-emacs-bug) "emacsbug" "mail/emacsbug.el" - ;;;;;; (17888 32280)) -;;;;;; (17907 23437)) ++;;;;;; (17963 19063)) ;;; Generated autoloads from mail/emacsbug.el (autoload (quote report-emacs-bug) "emacsbug" "\ @@@ -9657,8 -9657,8 +9657,8 @@@ Add a file to `erc-xdcc-files' ;;;*** - ;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (17888 - ;;;;;; 32279)) -;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (17914 -;;;;;; 52082)) ++;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (17963 ++;;;;;; 19298)) ;;; Generated autoloads from eshell/esh-mode.el (autoload (quote eshell-mode) "esh-mode" "\ @@@ -12670,7 -12630,7 +12670,7 @@@ Also fontifies the buffer appropriatel ;;;### (autoloads (rgrep lgrep grep-find grep grep-mode grep-compute-defaults ;;;;;; grep-process-setup grep-setup-hook grep-find-command grep-command - ;;;;;; grep-window-height) "grep" "progmodes/grep.el" (17888 36935)) -;;;;;; grep-window-height) "grep" "progmodes/grep.el" (17908 16392)) ++;;;;;; grep-window-height) "grep" "progmodes/grep.el" (17963 19282)) ;;; Generated autoloads from progmodes/grep.el (defvar grep-window-height nil "\ @@@ -12824,7 -12784,7 +12824,7 @@@ the form \"WINDOW-ID PIXMAP-ID\". Valu ;;;*** ;;;### (autoloads (gdb-script-mode jdb pdb perldb xdb dbx sdb gdb) - ;;;;;; "gud" "progmodes/gud.el" (17963 18441)) -;;;;;; "gud" "progmodes/gud.el" (17903 50960)) ++;;;;;; "gud" "progmodes/gud.el" (17963 19063)) ;;; Generated autoloads from progmodes/gud.el (autoload (quote gdb) "gud" "\ @@@ -13536,7 -13495,7 +13536,7 @@@ how the hiding is done ;;;*** ;;;### (autoloads (hs-minor-mode) "hideshow" "progmodes/hideshow.el" - ;;;;;; (17888 32281)) -;;;;;; (17899 12613)) ++;;;;;; (17963 19041)) ;;; Generated autoloads from progmodes/hideshow.el (defvar hs-special-modes-alist (quote ((c-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (bibtex-mode ("^@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning))) "\ @@@ -14431,7 -14363,7 +14431,7 @@@ FORMATS is the value to use for `ibuffe ;;;### (autoloads (icalendar-import-buffer icalendar-import-file ;;;;;; icalendar-export-region icalendar-export-file) "icalendar" - ;;;;;; "calendar/icalendar.el" (17888 32279)) -;;;;;; "calendar/icalendar.el" (17842 53792)) ++;;;;;; "calendar/icalendar.el" (17963 20580)) ;;; Generated autoloads from calendar/icalendar.el (autoload (quote icalendar-export-file) "icalendar" "\ @@@ -14469,8 -14401,8 +14469,8 @@@ object, reads it and adds all VEVENT el DIARY-FILE. It will ask for each appointment whether to add it to the diary --when DO-NOT-ASK is non-nil. When called interactively, --DO-NOT-ASK is set to t, so that you are asked fore each event. ++unless DO-NOT-ASK is non-nil. When called interactively, ++DO-NOT-ASK is nil, so that you are asked for each event. NON-MARKING determines whether diary events are created as non-marking. @@@ -14483,8 -14415,8 +14483,8 @@@ buffer `*icalendar-errors*' ;;;*** - ;;;### (autoloads (icomplete-mode) "icomplete" "icomplete.el" (17888 - ;;;;;; 32280)) -;;;### (autoloads (icomplete-mode) "icomplete" "icomplete.el" (17907 -;;;;;; 1407)) ++;;;### (autoloads (icomplete-mode) "icomplete" "icomplete.el" (17963 ++;;;;;; 19063)) ;;; Generated autoloads from icomplete.el (defvar icomplete-mode nil "\ @@@ -14706,8 -14638,8 +14706,8 @@@ The main features of this mode ar ;;;;;; ido-find-alternate-file ido-find-file-other-window ido-find-file ;;;;;; ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer ;;;;;; ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window -;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (17916 -;;;;;; 11714)) +;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (17963 - ;;;;;; 18439)) ++;;;;;; 19298)) ;;; Generated autoloads from ido.el (defvar ido-mode nil "\ @@@ -15783,7 -15715,7 +15783,7 @@@ For example, invoke \"emacs -batch -f b ;;;### (autoloads (isearch-process-search-multibyte-characters isearch-toggle-input-method ;;;;;; isearch-toggle-specified-input-method) "isearch-x" "international/isearch-x.el" - ;;;;;; (17888 32280)) -;;;;;; (17903 2305)) ++;;;;;; (17963 19057)) ;;; Generated autoloads from international/isearch-x.el (autoload (quote isearch-toggle-specified-input-method) "isearch-x" "\ @@@ -15803,8 -15735,8 +15803,8 @@@ Not documente ;;;*** - ;;;### (autoloads (isearchb-activate) "isearchb" "isearchb.el" (17888 - ;;;;;; 36581)) -;;;### (autoloads (isearchb-activate) "isearchb" "isearchb.el" (17918 -;;;;;; 44913)) ++;;;### (autoloads (isearchb-activate) "isearchb" "isearchb.el" (17963 ++;;;;;; 19309)) ;;; Generated autoloads from isearchb.el (autoload (quote isearchb-activate) "isearchb" "\ @@@ -15948,7 -15849,7 +15948,7 @@@ Add submenus to the File menu, to conve ;;;;;; ispell-region ispell-change-dictionary ispell-kill-ispell ;;;;;; ispell-help ispell-pdict-save ispell-word ispell-local-dictionary-alist ;;;;;; ispell-personal-dictionary) "ispell" "textmodes/ispell.el" - ;;;;;; (17888 36935)) -;;;;;; (17875 1098)) ++;;;;;; (17963 19313)) ;;; Generated autoloads from textmodes/ispell.el (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) @@@ -17134,8 -16967,8 +17134,8 @@@ Otherwise they are treated as Emacs reg ;;;*** - ;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el" (17888 - ;;;;;; 32279)) -;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el" (17916 -;;;;;; 10998)) ++;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el" (17963 ++;;;;;; 19298)) ;;; Generated autoloads from calendar/lunar.el (autoload (quote phases-of-moon) "lunar" "\ @@@ -19507,7 -19318,7 +19507,7 @@@ The Custom feature is intended to make ;;;;;; org-remember-handler org-remember org-remember-apply-template ;;;;;; org-remember-annotation org-store-link orgtbl-mode turn-on-orgtbl ;;;;;; org-global-cycle org-cycle org-mode) "org" "textmodes/org.el" - ;;;;;; (17963 18455)) -;;;;;; (17916 11508)) ++;;;;;; (17963 19299)) ;;; Generated autoloads from textmodes/org.el (autoload (quote org-mode) "org" "\ @@@ -20161,8 -19972,8 +20161,8 @@@ Completion for the `chgrp' command ;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list ;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete - ;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (17888 - ;;;;;; 32280)) -;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (17900 -;;;;;; 30230)) ++;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (17963 ++;;;;;; 19047)) ;;; Generated autoloads from pcomplete.el (autoload (quote pcomplete) "pcomplete" "\ @@@ -21465,8 -21276,8 +21465,8 @@@ Not documente ;;;;;; ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ;;;;;; ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ;;;;;; ps-print-buffer ps-print-customize ps-print-color-p ps-paper-type -;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (17900 -;;;;;; 43896)) +;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (17963 - ;;;;;; 18455)) ++;;;;;; 19047)) ;;; Generated autoloads from ps-print.el (defvar ps-page-dimensions-database (list (list (quote a4) (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list (quote a3) (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list (quote letter) (* 72 8.5) (* 72 11.0) "Letter") (list (quote legal) (* 72 8.5) (* 72 14.0) "Legal") (list (quote letter-small) (* 72 7.68) (* 72 10.16) "LetterSmall") (list (quote tabloid) (* 72 11.0) (* 72 17.0) "Tabloid") (list (quote ledger) (* 72 17.0) (* 72 11.0) "Ledger") (list (quote statement) (* 72 5.5) (* 72 8.5) "Statement") (list (quote executive) (* 72 7.5) (* 72 10.0) "Executive") (list (quote a4small) (* 72 7.47) (* 72 10.85) "A4Small") (list (quote b4) (* 72 10.125) (* 72 14.33) "B4") (list (quote b5) (* 72 7.16) (* 72 10.125) "B5")) "\ @@@ -21663,7 -21474,7 +21663,7 @@@ If EXTENSION is any other symbol, it i ;;;*** ;;;### (autoloads (jython-mode python-mode run-python) "python" "progmodes/python.el" - ;;;;;; (17963 18448)) -;;;;;; (17918 44913)) ++;;;;;; (17963 19313)) ;;; Generated autoloads from progmodes/python.el (add-to-list (quote interpreter-mode-alist) (quote ("jython" . jython-mode))) @@@ -21761,7 -21572,7 +21761,7 @@@ them into characters should be done sep ;;;;;; quail-defrule quail-install-decode-map quail-install-map ;;;;;; quail-define-rules quail-show-keyboard-layout quail-set-keyboard-layout ;;;;;; quail-define-package quail-use-package quail-title) "quail" - ;;;;;; "international/quail.el" (17888 36644)) -;;;;;; "international/quail.el" (17859 9187)) ++;;;;;; "international/quail.el" (17963 19309)) ;;; Generated autoloads from international/quail.el (autoload (quote quail-title) "quail" "\ @@@ -22065,7 -21876,7 +22065,7 @@@ Display `quickurl-list' as a formatted ;;;*** ;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc" - ;;;;;; "net/rcirc.el" (17888 32280)) -;;;;;; "net/rcirc.el" (17907 1946)) ++;;;;;; "net/rcirc.el" (17963 19063)) ;;; Generated autoloads from net/rcirc.el (autoload (quote rcirc) "rcirc" "\ @@@ -22110,7 -21921,7 +22110,7 @@@ See \\[compile] ;;;*** ;;;### (autoloads (re-builder) "re-builder" "emacs-lisp/re-builder.el" - ;;;;;; (17888 32279)) -;;;;;; (17917 37732)) ++;;;;;; (17963 19309)) ;;; Generated autoloads from emacs-lisp/re-builder.el (defalias (quote regexp-builder) (quote re-builder)) @@@ -24064,8 -23793,8 +24064,8 @@@ Like `mail' command, but display mail b ;;;*** -;;;### (autoloads (server-mode server-start) "server" "server.el" -;;;;;; (17851 41487)) +;;;### (autoloads (server-save-buffers-kill-terminal server-mode - ;;;;;; server-start) "server" "server.el" (17888 32281)) ++;;;;;; server-start) "server" "server.el" (17963 20687)) ;;; Generated autoloads from server.el (autoload (quote server-start) "server" "\ @@@ -24097,19 -23826,9 +24097,19 @@@ Server mode runs a process that accept \(fn &optional ARG)" t nil) +(autoload (quote server-save-buffers-kill-terminal) "server" "\ +Offer to save each buffer, then kill PROC. + +With prefix arg, silently save all file-visiting buffers, then kill. + +If emacsclient was started with a list of filenames to edit, then +only these files will be asked to be saved. + +\(fn PROC &optional ARG)" nil nil) + ;;;*** - ;;;### (autoloads (ses-mode) "ses" "ses.el" (17888 32281)) -;;;### (autoloads (ses-mode) "ses" "ses.el" (17902 31690)) ++;;;### (autoloads (ses-mode) "ses" "ses.el" (17963 19052)) ;;; Generated autoloads from ses.el (autoload (quote ses-mode) "ses" "\ @@@ -24362,7 -24081,7 +24362,7 @@@ Set up file shadowing ;;;*** ;;;### (autoloads (shell shell-dumb-shell-regexp) "shell" "shell.el" - ;;;;;; (17888 32281)) -;;;;;; (17899 1575)) ++;;;;;; (17963 19041)) ;;; Generated autoloads from shell.el (defvar shell-dumb-shell-regexp "cmd\\(proxy\\)?\\.exe" "\ @@@ -24445,7 -24164,7 +24445,7 @@@ Turning on Sieve mode runs `sieve-mode- ;;;*** - ;;;### (autoloads nil "simple" "simple.el" (17888 36936)) -;;;### (autoloads nil "simple" "simple.el" (17918 54827)) ++;;;### (autoloads nil "simple" "simple.el" (17963 19313)) ;;; Generated autoloads from simple.el (put 'fill-prefix 'safe-local-variable 'string-or-null-p) @@@ -24611,7 -24330,7 +24611,7 @@@ symmetrical ones, and the same characte ;;;*** ;;;### (autoloads (smerge-mode smerge-ediff) "smerge-mode" "smerge-mode.el" - ;;;;;; (17888 32281)) -;;;;;; (17904 28230)) ++;;;;;; (17963 19063)) ;;; Generated autoloads from smerge-mode.el (autoload (quote smerge-ediff) "smerge-mode" "\ @@@ -24718,7 -24437,7 +24718,7 @@@ then `snmpv2-mode-hook' ;;;### (autoloads (solar-equinoxes-solstices sunrise-sunset calendar-location-name ;;;;;; calendar-longitude calendar-latitude calendar-time-display-form) - ;;;;;; "solar" "calendar/solar.el" (17888 32279)) -;;;;;; "solar" "calendar/solar.el" (17916 11038)) ++;;;;;; "solar" "calendar/solar.el" (17963 19298)) ;;; Generated autoloads from calendar/solar.el (defvar calendar-time-display-form (quote (12-hours ":" minutes am-pm (if time-zone " (") time-zone (if time-zone ")"))) "\ @@@ -25708,7 -25427,7 +25708,7 @@@ Studlify-case the current buffer ;;;*** - ;;;### (autoloads (locate-library) "subr" "subr.el" (17888 36928)) -;;;### (autoloads (locate-library) "subr" "subr.el" (17918 55391)) ++;;;### (autoloads (locate-library) "subr" "subr.el" (17963 19313)) ;;; Generated autoloads from subr.el (autoload (quote locate-library) "subr" "\ @@@ -25762,7 -25481,7 +25762,7 @@@ before, and `sc-post-hook' is run afte ;;;*** - ;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (17888 32281)) -;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (17919 4935)) ++;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (17963 19313)) ;;; Generated autoloads from t-mouse.el (defvar t-mouse-mode nil "\ @@@ -27972,7 -27681,7 +27972,7 @@@ BUFFER defaults to `trace-buffer' ;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion ;;;;;; tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers ;;;;;; tramp-file-name-handler tramp-completion-file-name-regexp - ;;;;;; tramp-file-name-regexp) "tramp" "net/tramp.el" (17963 18447)) -;;;;;; tramp-file-name-regexp) "tramp" "net/tramp.el" (17899 48055)) ++;;;;;; tramp-file-name-regexp) "tramp" "net/tramp.el" (17963 19047)) ;;; Generated autoloads from net/tramp.el (defvar tramp-unified-filenames (not (featurep (quote xemacs))) "\ @@@ -28308,7 -28017,7 +28308,7 @@@ First column's text sSs Second colu ;;;;;; type-break type-break-mode type-break-keystroke-threshold ;;;;;; type-break-good-break-interval type-break-good-rest-interval ;;;;;; type-break-interval type-break-mode) "type-break" "type-break.el" - ;;;;;; (17888 36583)) -;;;;;; (17908 29123)) ++;;;;;; (17963 19282)) ;;; Generated autoloads from type-break.el (defvar type-break-mode nil "\ @@@ -30843,7 -30552,7 +30843,7 @@@ With arg, turn Winner mode on if and on ;;;*** ;;;### (autoloads (woman-find-file woman-dired-find-file woman) "woman" - ;;;;;; "woman.el" (17888 32281)) -;;;;;; "woman.el" (17916 11282)) ++;;;;;; "woman.el" (17963 19299)) ;;; Generated autoloads from woman.el (autoload (quote woman) "woman" "\ @@@ -30992,7 -30701,7 +30992,7 @@@ The key bindings are ;;;*** ;;;### (autoloads (xml-parse-region xml-parse-file) "xml" "xml.el" - ;;;;;; (17888 32281)) -;;;;;; (17916 14776)) ++;;;;;; (17963 19299)) ;;; Generated autoloads from xml.el (autoload (quote xml-parse-file) "xml" "\ @@@ -31228,7 -30937,7 +31228,7 @@@ Zone out, completely ;;;;;; "url/url-vars.el" "url/vc-dav.el" "vc-hooks.el" "vcursor.el" ;;;;;; "version.el" "vms-patch.el" "vmsproc.el" "vt-control.el" ;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "widget.el" "window.el" - ;;;;;; "x-dnd.el") (17963 18741 697794)) -;;;;;; "x-dnd.el") (17919 12178 847464)) ++;;;;;; "x-dnd.el") (17963 20717 345010)) ;;;*** diff --cc lisp/server.el index e0465324e05,690f51034f2..2e344084d0f --- a/lisp/server.el +++ b/lisp/server.el @@@ -664,289 -412,114 +664,299 @@@ The following commands are accepted by ;; Similarly with recursive-edits such as the splash screen. (process-put proc :previous-string string) (run-with-timer 0 nil (lexical-let ((proc proc)) - (lambda () (server-process-filter proc "")))) + (lambda () (server-process-filter proc "")))) (top-level)) + (condition-case nil + ;; If we're running isearch, we must abort it to allow Emacs to + ;; display the buffer and switch to it. + (mapc #'(lambda (buffer) + (with-current-buffer buffer + (when (bound-and-true-p isearch-mode) + (isearch-cancel)))) + (buffer-list)) + ;; Signaled by isearch-cancel + (quit (message nil))) - ;; If the input is multiple lines, - ;; process each line individually. - (while (string-match "\n" string) - (let ((request (substring string 0 (match-beginning 0))) - (coding-system (and default-enable-multibyte-characters - (or file-name-coding-system - default-file-name-coding-system))) - client nowait eval - (files nil) - (lineno 1) - (tmp-frame nil) ;; Sometimes used to embody the selected display. - (columnno 0)) - ;; Remove this line from STRING. - (setq string (substring string (match-end 0))) - (setq client (cons proc nil)) - (while (string-match "[^ ]* " request) - (let ((arg (substring request (match-beginning 0) (1- (match-end 0))))) - (setq request (substring request (match-end 0))) - (cond - ((equal "-nowait" arg) (setq nowait t)) - ((equal "-eval" arg) (setq eval t)) - ((and (equal "-display" arg) (string-match "\\([^ ]*\\) " request)) - (let ((display (server-unquote-arg (match-string 1 request)))) - (setq request (substring request (match-end 0))) - (condition-case err - (setq tmp-frame (server-select-display display)) - (error (process-send-string proc (nth 1 err)) - (setq request ""))))) - ;; ARG is a line number option. - ((string-match "\\`\\+[0-9]+\\'" arg) - (setq lineno (string-to-number (substring arg 1)))) - ;; ARG is line number:column option. - ((string-match "\\`+\\([0-9]+\\):\\([0-9]+\\)\\'" arg) - (setq lineno (string-to-number (match-string 1 arg)) - columnno (string-to-number (match-string 2 arg)))) - (t - ;; Undo the quoting that emacsclient does - ;; for certain special characters. - (setq arg (server-unquote-arg arg)) - ;; Now decode the file name if necessary. - (when coding-system - (setq arg (decode-coding-string arg coding-system))) - (if eval - (let* (errorp - (v (condition-case errobj - (eval (car (read-from-string arg))) - (error (setq errorp t) errobj)))) - (when v - (with-temp-buffer - (let ((standard-output (current-buffer))) - (when errorp (princ "error: ")) - (pp v) - (ignore-errors - (process-send-region proc (point-min) (point-max))) - )))) - ;; ARG is a file name. - ;; Collapse multiple slashes to single slashes. - (setq arg (command-line-normalize-file-name arg)) - (push (list arg lineno columnno) files)) - (setq lineno 1) - (setq columnno 0))))) - (when files - (run-hooks 'pre-command-hook) - (server-visit-files files client nowait) - (run-hooks 'post-command-hook)) - ;; CLIENT is now a list (CLIENTNUM BUFFERS...) - (if (null (cdr client)) - ;; This client is empty; get rid of it immediately. - (progn - (delete-process proc) - (server-log "Close empty client" proc)) - ;; We visited some buffer for this client. - (or nowait (push client server-clients)) - (unless (or isearch-mode (minibufferp)) - (server-switch-buffer (nth 1 client)) - (run-hooks 'server-switch-hook) - (unless nowait - (message "%s" (substitute-command-keys - "When done with a buffer, type \\[server-edit]"))))) - (when (frame-live-p tmp-frame) - ;; Delete tmp-frame or make it visible depending on whether it's - ;; been used or not. - (server-unselect-display tmp-frame)))) - ;; Save for later any partial line that remains. - (when (> (length string) 0) - (process-put proc :previous-string string))) + (let ((prev (process-get proc 'previous-string))) + (when prev + (setq string (concat prev string)) + (process-put proc 'previous-string nil))) + (condition-case err + (progn + (server-add-client proc) + ;; If the input is multiple lines, + ;; process each line individually. + (while (string-match "\n" string) + (let ((request (substring string 0 (match-beginning 0))) + (coding-system (and default-enable-multibyte-characters + (or file-name-coding-system + default-file-name-coding-system))) + (client (server-client proc)) + current-frame + nowait ; t if emacsclient does not want to wait for us. + frame ; The frame that was opened for the client (if any). + display ; Open the frame on this display. + dontkill ; t if the client should not be killed. + env + dir + (files nil) + (lineno 1) + (columnno 0)) + ;; Remove this line from STRING. + (setq string (substring string (match-end 0))) + (while (string-match " *[^ ]* " request) + (let ((arg (substring request (match-beginning 0) (1- (match-end 0))))) + (setq request (substring request (match-end 0))) + (cond + ;; -version CLIENT-VERSION: + ;; Check version numbers, signal an error if there is a mismatch. + ((and (equal "-version" arg) + (string-match "\\([0-9.]+\\) " request)) + (let* ((client-version (match-string 1 request)) + (truncated-emacs-version + (substring emacs-version 0 (length client-version)))) + (setq request (substring request (match-end 0))) + (if (equal client-version truncated-emacs-version) + (progn + (server-send-string proc "-good-version \n") + (server-client-set client 'version client-version)) + (error (concat "Version mismatch: Emacs is " + truncated-emacs-version + ", emacsclient is " client-version))))) + + ;; -nowait: Emacsclient won't wait for a result. + ((equal "-nowait" arg) (setq nowait t)) + + ;; -current-frame: Don't create frames. + ((equal "-current-frame" arg) (setq current-frame t)) + + ;; -display DISPLAY: + ;; Open X frames on the given display instead of the default. + ((and (equal "-display" arg) (string-match "\\([^ ]*\\) " request)) + (setq display (match-string 1 request) + request (substring request (match-end 0)))) + + ;; -window-system: Open a new X frame. + ((equal "-window-system" arg) + (unless (server-client-get client 'version) + (error "Protocol error; make sure to use the correct version of emacsclient")) + (unless current-frame + (if (fboundp 'x-create-frame) + (let ((params (if nowait + ;; Flag frame as client-created, but use a dummy client. + ;; This will prevent the frame from being deleted when + ;; emacsclient quits while also preventing + ;; `server-save-buffers-kill-terminal' from unexpectedly + ;; killing emacs on that frame. + (list (cons 'client 'nowait) (cons 'environment env)) + (list (cons 'client proc) (cons 'environment env))))) + (setq frame (make-frame-on-display + (or display + (frame-parameter nil 'display) + (getenv "DISPLAY") + (error "Please specify display")) + params)) + (server-log (format "%s created" frame) proc) + ;; XXX We need to ensure the parameters are + ;; really set because Emacs forgets unhandled + ;; initialization parameters for X frames at + ;; the moment. + (modify-frame-parameters frame params) + (select-frame frame) + (server-client-set client 'frame frame) + (server-client-set client 'terminal (frame-terminal frame)) + + ;; Display *scratch* by default. + (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) + (if dir (setq default-directory dir)) + + (setq dontkill t)) + ;; This emacs does not support X. + (server-log "Window system unsupported" proc) + (server-send-string proc "-window-system-unsupported \n") + (setq dontkill t)))) + + ;; -resume: Resume a suspended tty frame. + ((equal "-resume" arg) + (let ((terminal (server-client-get client 'terminal))) + (setq dontkill t) + (when (eq (terminal-live-p terminal) t) + (resume-tty terminal)))) + + ;; -suspend: Suspend the client's frame. (In case we + ;; get out of sync, and a C-z sends a SIGTSTP to + ;; emacsclient.) + ((equal "-suspend" arg) + (let ((terminal (server-client-get client 'terminal))) + (setq dontkill t) + (when (eq (terminal-live-p terminal) t) + (suspend-tty terminal)))) + + ;; -ignore COMMENT: Noop; useful for debugging emacsclient. + ;; (The given comment appears in the server log.) + ((and (equal "-ignore" arg) (string-match "\\([^ ]*\\) " request)) + (setq dontkill t + request (substring request (match-end 0)))) + + ;; -tty DEVICE-NAME TYPE: Open a new tty frame at the client. + ((and (equal "-tty" arg) (string-match "\\([^ ]*\\) \\([^ ]*\\) " request)) + (let ((tty (server-unquote-arg (match-string 1 request))) + (type (server-unquote-arg (match-string 2 request)))) + (setq request (substring request (match-end 0))) + (unless (server-client-get client 'version) + (error "Protocol error; make sure you use the correct version of emacsclient")) + (unless current-frame + (server-with-environment env + '("LANG" "LC_CTYPE" "LC_ALL" + ;; For tgetent(3); list according to ncurses(3). + "BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES" + "NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING" + "NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO" + "TERMINFO_DIRS" "TERMPATH") + (setq frame (make-frame-on-tty tty type + ;; Ignore nowait here; we always need to clean + ;; up opened ttys when the client dies. + `((client . ,proc) + (environment . ,env))))) + (select-frame frame) + (server-client-set client 'frame frame) + (server-client-set client 'tty (terminal-name frame)) + (server-client-set client 'terminal (frame-terminal frame)) + + ;; Display *scratch* by default. + (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) + (if dir (setq default-directory dir)) + + ;; Reply with our pid. + (server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n")) + (setq dontkill t)))) + + ;; -position LINE: Go to the given line in the next file. + ((and (equal "-position" arg) (string-match "\\(\\+[0-9]+\\) " request)) + (setq lineno (string-to-number (substring (match-string 1 request) 1)) + request (substring request (match-end 0)))) + + ;; -position LINE:COLUMN: Set point to the given position in the next file. + ((and (equal "-position" arg) (string-match "\\+\\([0-9]+\\):\\([0-9]+\\) " request)) + (setq lineno (string-to-number (match-string 1 request)) + columnno (string-to-number (match-string 2 request)) + request (substring request (match-end 0)))) + + ;; -file FILENAME: Load the given file. + ((and (equal "-file" arg) (string-match "\\([^ ]+\\) " request)) + (let ((file (server-unquote-arg (match-string 1 request)))) + (setq request (substring request (match-end 0))) + (if coding-system + (setq file (decode-coding-string file coding-system))) + (setq file (command-line-normalize-file-name file)) + (push (list file lineno columnno) files) + (server-log (format "New file: %s (%d:%d)" file lineno columnno) proc)) + (setq lineno 1 + columnno 0)) + + ;; -eval EXPR: Evaluate a Lisp expression. + ((and (equal "-eval" arg) (string-match "\\([^ ]+\\) " request)) + (let ((expr (server-unquote-arg (match-string 1 request)))) + (setq request (substring request (match-end 0))) + (if coding-system + (setq expr (decode-coding-string expr coding-system))) + (let ((v (eval (car (read-from-string expr))))) + (when (and (not frame) v) + (with-temp-buffer + (let ((standard-output (current-buffer))) + (pp v) + (server-send-string + proc (format "-print %s\n" + (server-quote-arg + (buffer-substring-no-properties (point-min) + (point-max))))))))) + (setq lineno 1 + columnno 0))) + + ;; -env NAME=VALUE: An environment variable. + ((and (equal "-env" arg) (string-match "\\([^ ]+\\) " request)) + (let ((var (server-unquote-arg (match-string 1 request)))) + ;; XXX Variables should be encoded as in getenv/setenv. + (setq request (substring request (match-end 0))) + (setq env (cons var env)))) + + ;; -dir DIRNAME: The cwd of the emacsclient process. + ((and (equal "-dir" arg) (string-match "\\([^ ]+\\) " request)) + (setq dir (server-unquote-arg (match-string 1 request))) + (setq request (substring request (match-end 0))) + (if coding-system + (setq dir (decode-coding-string dir coding-system))) + (setq dir (command-line-normalize-file-name dir))) + + ;; Unknown command. + (t (error "Unknown command: %s" arg))))) + + (let (buffers) + (when files + (run-hooks 'pre-command-hook) + (setq buffers (server-visit-files files client nowait)) + (run-hooks 'post-command-hook)) + + (when frame + (with-selected-frame frame + (display-startup-echo-area-message) + (unless inhibit-splash-screen + (condition-case err + ;; This looks scary because `fancy-splash-screens' + ;; will call `recursive-edit' from a process filter. + ;; However, that should be safe to do now. + (display-splash-screen t) + ;; `recursive-edit' will throw an error if Emacs is + ;; already doing a recursive edit elsewhere. Catch it + ;; here so that we can finish normally. + (error nil))))) + + ;; Delete the client if necessary. + (cond + (nowait + ;; Client requested nowait; return immediately. + (server-log "Close nowait client" proc) + (server-delete-client proc)) + ((and (not dontkill) (null buffers)) + ;; This client is empty; get rid of it immediately. + (server-log "Close empty client" proc) + (server-delete-client proc))) + (cond + ((or isearch-mode (minibufferp)) + nil) + ((and frame (null buffers)) + (message "%s" (substitute-command-keys + "When done with this frame, type \\[delete-frame]"))) + ((not (null buffers)) + (server-switch-buffer (car buffers)) + (run-hooks 'server-switch-hook) + (unless nowait + (message "%s" (substitute-command-keys + "When done with a buffer, type \\[server-edit]")))))))) + + ;; Save for later any partial line that remains. + (when (> (length string) 0) + (process-put proc 'previous-string string))) + ;; condition-case + (error (ignore-errors + (server-send-string + proc (concat "-error " (server-quote-arg (error-message-string err)))) + (setq string "") + (server-log (error-message-string err) proc) + (delete-process proc))))) (defun server-goto-line-column (file-line-col) + "Move point to the position indicated in FILE-LINE-COL. +FILE-LINE-COL should be a three-element list as described in +`server-visit-files'." (goto-line (nth 1 file-line-col)) (let ((column-number (nth 2 file-line-col))) - (when (> column-number 0) - (move-to-column (1- column-number))))) + (if (> column-number 0) + (move-to-column (1- column-number))))) (defun server-visit-files (files client &optional nowait) - "Find FILES and return the list CLIENT with the buffers nconc'd. + "Find FILES and return a list of buffers created. FILES is an alist whose elements are (FILENAME LINENUMBER COLUMNNUMBER). +CLIENT is the client that requested this operation. NOWAIT non-nil means this client is not waiting for the results, so don't mark these buffers specially, just visit them normally." ;; Bind last-nonmenu-event to force use of keyboard, not mouse, for queries. diff --cc src/Makefile.in index e19083e3e15,1ce3702336f..31fc7b5c23e --- a/src/Makefile.in +++ b/src/Makefile.in @@@ -1121,8 -1113,8 +1119,8 @@@ pre-crt0.o: pre-crt0. ecrt0.o: ecrt0.c $(config_h) CRT0_COMPILE ${srcdir}/ecrt0.c dired.o: dired.c commands.h buffer.h $(config_h) charset.h coding.h regex.h \ - systime.h blockinput.h + systime.h blockinput.h atimer.h -dispnew.o: dispnew.c systty.h systime.h commands.h process.h frame.h \ +dispnew.o: dispnew.c systime.h commands.h process.h frame.h \ window.h buffer.h dispextern.h termchar.h termopts.h termhooks.h cm.h \ disptab.h indent.h intervals.h \ xterm.h blockinput.h atimer.h charset.h msdos.h composite.h keyboard.h \ @@@ -1193,13 -1185,11 +1192,13 @@@ syntax.o: syntax.c syntax.h buffer.h co composite.h keymap.h regex.h $(INTERVAL_SRC) $(config_h) sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \ process.h dispextern.h termhooks.h termchar.h termopts.h \ - frame.h atimer.h window.h msdos.h dosfns.h keyboard.h $(config_h) + frame.h atimer.h window.h msdos.h dosfns.h keyboard.h cm.h $(config_h) term.o: term.c termchar.h termhooks.h termopts.h $(config_h) cm.h frame.h \ disptab.h dispextern.h keyboard.h charset.h coding.h ccl.h msdos.h \ - window.h keymap.h + window.h keymap.h blockinput.h atimer.h systime.h termcap.o: termcap.c $(config_h) +terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ + keyboard.h $(config_h) terminfo.o: terminfo.c $(config_h) tparam.o: tparam.c $(config_h) undo.o: undo.c buffer.h commands.h window.h $(config_h) @@@ -1212,8 -1202,9 +1211,9 @@@ w16select.o: w16select.c dispextern.h f widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \ $(srcdir)/../lwlib/lwlib.h $(config_h) window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \ - termhooks.h disptab.h keyboard.h dispextern.h msdos.h composite.h \ + disptab.h keyboard.h dispextern.h msdos.h composite.h \ - keymap.h blockinput.h $(INTERVAL_SRC) xterm.h w32term.h macterm.h $(config_h) + keymap.h blockinput.h atimer.h systime.h $(INTERVAL_SRC) \ + xterm.h w32term.h macterm.h $(config_h) xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h coding.h \ termchar.h frame.h window.h disptab.h termhooks.h charset.h $(config_h) \ keyboard.h $(INTERVAL_SRC) region-cache.h xterm.h w32term.h macterm.h \ @@@ -1256,12 -1247,13 +1257,12 @@@ eval.o: eval.c commands.h keyboard.h bl floatfns.o: floatfns.c $(config_h) fns.o: fns.c commands.h $(config_h) frame.h buffer.h charset.h keyboard.h \ keymap.h frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h md5.h \ - blockinput.h xterm.h termhooks.h - blockinput.h atimer.h systime.h xterm.h ++ blockinput.h atimer.h systime.h xterm.h termhooks.h print.o: print.c process.h frame.h window.h buffer.h keyboard.h charset.h \ $(config_h) dispextern.h termchar.h $(INTERVAL_SRC) msdos.h composite.h \ - termchar.h + blockinput.h atimer.h systime.h lread.o: lread.c commands.h keyboard.h buffer.h epaths.h charset.h \ - $(config_h) $(INTERVAL_SRC) termhooks.h coding.h msdos.h blockinput.h \ - atimer.h systime.h + $(config_h) $(INTERVAL_SRC) termhooks.h coding.h msdos.h /* Text properties support */ textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVAL_SRC) \ diff --cc src/dispnew.c index 4c3a4ca3f02,a7efa8249ba..697773f4daf --- a/src/dispnew.c +++ b/src/dispnew.c @@@ -6373,16 -6360,13 +6373,20 @@@ FILE = nil means just close any termscr (file) Lisp_Object file; { - if (termscript != 0) - { - BLOCK_INPUT; - fclose (termscript); - UNBLOCK_INPUT; - } - termscript = 0; + struct tty_display_info *tty; + + if (! FRAME_TERMCAP_P (SELECTED_FRAME ())) + error ("Current frame is not on a tty device"); + + tty = CURTTY (); + + if (tty->termscript != 0) ++ { ++ BLOCK_INPUT; + fclose (tty->termscript); ++ UNBLOCK_INPUT; ++ } + tty->termscript = 0; if (! NILP (file)) { @@@ -6396,35 -6380,24 +6400,37 @@@ DEFUN ("send-string-to-terminal", Fsend_string_to_terminal, - Ssend_string_to_terminal, 1, 1, 0, + Ssend_string_to_terminal, 1, 2, 0, doc: /* Send STRING to the terminal without alteration. -Control characters in STRING will have terminal-dependent effects. */) - (string) +Control characters in STRING will have terminal-dependent effects. + +Optional parameter TERMINAL specifies the tty terminal device to use. +It may be a terminal id, a frame, or nil for the terminal used by the +currently selected frame. */) + (string, terminal) Lisp_Object string; + Lisp_Object terminal; { + struct terminal *t = get_tty_terminal (terminal, 1); + struct tty_display_info *tty; + /* ??? Perhaps we should do something special for multibyte strings here. */ CHECK_STRING (string); + BLOCK_INPUT; - fwrite (SDATA (string), 1, SBYTES (string), stdout); - fflush (stdout); - if (termscript) + + if (!t) + error ("Unknown terminal device"); + + tty = t->display_info.tty; + + if (tty->termscript) { - fwrite (SDATA (string), 1, SBYTES (string), - termscript); - fflush (termscript); + fwrite (SDATA (string), 1, SBYTES (string), tty->termscript); + fflush (tty->termscript); } + fwrite (SDATA (string), 1, SBYTES (string), tty->output); + fflush (tty->output); + UNBLOCK_INPUT; return Qnil; } diff --cc src/keyboard.c index 82e97441667,f7a0c018d63..686d16a504f --- a/src/keyboard.c +++ b/src/keyboard.c @@@ -2533,6 -2450,21 +2533,17 @@@ Lisp_Object print_help () static Lisp_Object kbd_buffer_get_event (); static void record_char (); + static Lisp_Object help_form_saved_window_configs; + static Lisp_Object + read_char_help_form_unwind (arg) + { + Lisp_Object window_config = XCAR (help_form_saved_window_configs); + help_form_saved_window_configs = XCDR (help_form_saved_window_configs); + if (!NILP (window_config)) + Fset_window_configuration (window_config); + return Qnil; + } + -#ifdef MULTI_KBOARD -static jmp_buf wrong_kboard_jmpbuf; -#endif - #define STOP_POLLING \ do { if (! polling_stopped_here) stop_polling (); \ polling_stopped_here = 1; } while (0) diff --cc src/lread.c index f1671c4543c,30aab7cce32..cee6cf5a92e --- a/src/lread.c +++ b/src/lread.c @@@ -35,9 -34,9 +35,10 @@@ Boston, MA 02110-1301, USA. * #include #include "commands.h" #include "keyboard.h" +#include "frame.h" #include "termhooks.h" #include "coding.h" + #include "blockinput.h" #ifdef lint #include diff --cc src/term.c index a12f982844c,556ae9f65b1..dcbe3f88a16 --- a/src/term.c +++ b/src/term.c @@@ -47,8 -38,7 +47,9 @@@ Boston, MA 02110-1301, USA. * #include "dispextern.h" #include "window.h" #include "keymap.h" + #include "blockinput.h" +#include "syssignal.h" +#include "systty.h" /* For now, don't try to include termcap.h. On some systems, configure finds a non-standard termcap.h that the main build @@@ -695,11 -991,13 +696,13 @@@ tty_write_glyphs (struct frame *f, stru conversion_buffer = encode_terminal_code (string, n, coding); if (coding->produced > 0) { + BLOCK_INPUT; - fwrite (conversion_buffer, 1, coding->produced, stdout); - if (ferror (stdout)) - clearerr (stdout); - if (termscript) - fwrite (conversion_buffer, 1, coding->produced, termscript); + fwrite (conversion_buffer, 1, coding->produced, tty->output); + if (ferror (tty->output)) + clearerr (tty->output); + if (tty->termscript) + fwrite (conversion_buffer, 1, coding->produced, tty->termscript); + UNBLOCK_INPUT; } len -= n; string += n; @@@ -781,14 -1092,16 +784,16 @@@ tty_insert_glyphs (struct frame *f, str if (coding->produced > 0) { + BLOCK_INPUT; - fwrite (conversion_buffer, 1, coding->produced, stdout); - if (ferror (stdout)) - clearerr (stdout); - if (termscript) - fwrite (conversion_buffer, 1, coding->produced, termscript); + fwrite (conversion_buffer, 1, coding->produced, tty->output); + if (ferror (tty->output)) + clearerr (tty->output); + if (tty->termscript) + fwrite (conversion_buffer, 1, coding->produced, tty->termscript); + UNBLOCK_INPUT; } - OUTPUT1_IF (TS_pad_inserted_char); + OUTPUT1_IF (tty, tty->TS_pad_inserted_char); if (start) { turn_off_face (f, glyph->face_id);