From: Karoly Lorentey Date: Sat, 24 Feb 2007 19:26:54 +0000 (+0000) Subject: Merged from emacs@sv.gnu.org X-Git-Tag: emacs-pretest-23.0.90~11236^2~141^2~9 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f65f7603312547e51230192daf34349b8ac569a0;p=emacs.git Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-619 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-620 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-621 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-622 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-623 Remove RCS keywords * emacs@sv.gnu.org/emacs--devo--0--patch-624 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-625 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-626 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-627 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-628 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-629 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-630 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-631 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-632 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-633 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-634 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-635 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-636 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-637 Remove RCS keywords * emacs@sv.gnu.org/emacs--devo--0--patch-638 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-639 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-640 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-641 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-642 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-643 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-644 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-645 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-646 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-647 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-648 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-649 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-197 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-198 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-199 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-200 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-201 Update from CVS: lisp/nnweb.el (nnweb-google-parse-1): Update parser. * emacs@sv.gnu.org/gnus--rel--5.10--patch-202 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-596 --- f65f7603312547e51230192daf34349b8ac569a0 diff --cc README index ebb42242dea,4f8c6d6bb49..2926e4cbf31 --- a/README +++ b/README @@@ -1,4 -1,9 +1,9 @@@ + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. + See the end of the file for license conditions. + + -This directory tree holds version 22.0.94 of GNU Emacs, the extensible, +This directory tree holds version 23.0.51 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --cc lisp/faces.el index 29f2729094f,54388fd54ca..4c058ba1fd3 --- a/lisp/faces.el +++ b/lisp/faces.el @@@ -1607,26 -1609,16 +1604,26 @@@ according to the `background-mode' and (cond (frame-background-mode) (bg-resource (intern (downcase bg-resource))) - ((and (null window-system) (null bg-color)) - ;; No way to determine this automatically (?). - (or default-frame-background-mode 'dark)) - ;; Unspecified frame background color can only happen - ;; on tty's. - ((member bg-color '(unspecified "unspecified-bg")) - (or default-frame-background-mode 'dark)) + (terminal-bg-mode) + ((and (null (window-system frame)) + ;; Unspecified frame background color can only + ;; happen on tty's. + (member bg-color '(nil unspecified "unspecified-bg"))) + ;; There is no way to determine the background mode + ;; automatically, so we make a guess based on the + ;; terminal type. + (if (and tty-type + (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" + tty-type)) + 'light + 'dark)) ((equal bg-color "unspecified-fg") ; inverted colors - (if (eq default-frame-background-mode 'light) 'dark 'light)) + (if (and tty-type + (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" + tty-type)) + 'dark + 'light)) - ((>= (apply '+ (x-color-values bg-color frame)) + ((>= (apply '+ (color-values bg-color frame)) ;; Just looking at the screen, colors whose ;; values add up to .6 of the white total ;; still look dark to me. @@@ -1634,9 -1626,9 +1631,9 @@@ 'light) (t 'dark))) (display-type - (cond ((null window-system) + (cond ((null (window-system frame)) (if (tty-display-color-p frame) 'color 'mono)) - ((x-display-color-p frame) + ((display-color-p frame) 'color) ((x-display-grayscale-p frame) 'grayscale) @@@ -1772,35 -1755,48 +1769,48 @@@ Initialize colors of certain faces fro (face-attribute 'default :weight t)) (set-face-attribute 'default frame :width (face-attribute 'default :width t)))) - (dolist (face (face-list)) - ;; Don't let frame creation fail because of an invalid face spec. - (condition-case () - (when (not (equal face 'default)) - (face-spec-set face (face-user-default-spec face) frame) - (internal-merge-in-global-face face frame) - (when (and (memq (window-system frame) '(x w32 mac)) - (or (not (boundp 'inhibit-default-face-x-resources)) - (not (eq face 'default)))) - (make-face-x-resource-internal face frame))) - (error nil))) - ;; Initialize attributes from frame parameters. - (let ((params '((foreground-color default :foreground) - (background-color default :background) - (border-color border :background) - (cursor-color cursor :background) - (scroll-bar-foreground scroll-bar :foreground) - (scroll-bar-background scroll-bar :background) - (mouse-color mouse :background)))) - (dolist (param params) - (let ((frame-param (frame-parameter frame (nth 0 param))) - (face (nth 1 param)) - (attr (nth 2 param))) - (when (and frame-param - ;; Don't override face attributes explicitly - ;; specified for new frames. - (eq (face-attribute face attr t) 'unspecified)) - (set-face-attribute face frame attr frame-param)))))) - + ;; Find attributes that should be initialized from frame parameters. + (let ((face-params '((foreground-color default :foreground) + (background-color default :background) + (border-color border :background) + (cursor-color cursor :background) + (scroll-bar-foreground scroll-bar :foreground) + (scroll-bar-background scroll-bar :background) + (mouse-color mouse :background))) + apply-params) + (dolist (param face-params) + (let* ((value (frame-parameter frame (nth 0 param))) + (face (nth 1 param)) + (attr (nth 2 param)) + (default-value (face-attribute face attr t))) + ;; Compile a list of face attributes to set, but don't set + ;; them yet. The call to make-face-x-resource-internal, + ;; below, can change frame parameters, and the final set of + ;; frame parameters should be the ones acquired at this step. + (if (eq default-value 'unspecified) + ;; The face spec does not specify a new-frame value for + ;; this attribute. Check if the existing frame parameter + ;; specifies it. + (if value + (push (list face frame attr value) apply-params)) + ;; The face spec specifies a value for this attribute, to be + ;; applied to the face on all new frames. + (push (list face frame attr default-value) apply-params)))) + ;; Initialize faces from face specs and X resources. The + ;; condition-case prevents invalid specs from causing frame + ;; creation to fail. + (dolist (face (delq 'default (face-list))) + (condition-case () + (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))) + (error nil))) + ;; Apply the attributes specified by frame parameters. This + ;; rewrites parameters changed by make-face-x-resource-internal + (dolist (param apply-params) + (apply 'set-face-attribute param)))) (defun tty-handle-reverse-video (frame parameters) "Handle the reverse-video frame parameter for terminal frames." diff --cc lisp/ldefs-boot.el index 82b8aeea059,efe2784a905..f69fba42aca --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@@ -7490,9 -7480,24 +7493,24 @@@ buffer and try again \(fn &optional OTHER-WINDOW)" t nil) + (autoload (quote dired-do-relsymlink) "dired-x" "\ + Relative symlink all marked (or next ARG) files into a directory. + Otherwise make a relative symbolic link to the current file. + This creates relative symbolic links like + + foo -> ../bar/foo + + not absolute ones like + + foo -> /ugly/file/name/that/may/change/any/day/bar/foo + + For absolute symlinks, use \\[dired-do-symlink]. + + \(fn &optional ARG)" t nil) + ;;;*** -;;;### (autoloads (dirtrack) "dirtrack" "dirtrack.el" (17851 10823)) +;;;### (autoloads (dirtrack) "dirtrack" "dirtrack.el" (17817 13975)) ;;; Generated autoloads from dirtrack.el (autoload (quote dirtrack) "dirtrack" "\ @@@ -14995,22 -14984,18 +15041,27 @@@ Image types are symbols like `xbm' or ` \(fn TYPE)" nil nil) +(autoload (quote image-type-auto-detected-p) "image" "\ +Return t iff the current buffer contains an auto-detectable image. +Whether image types are auto-detectable or not depends on the setting +of the variable `image-type-auto-detectable'. + +This function is intended to be used from `magic-mode-alist' (which see). + +\(fn)" nil nil) + (autoload (quote image-type-auto-detected-p) "image" "\ Return t iff the current buffer contains an auto-detectable image. - Whether image types are auto-detectable or not depends on the setting - of the variable `image-type-auto-detectable'. - This function is intended to be used from `magic-mode-alist' (which see). + First, compare the beginning of the buffer with `image-type-header-regexps'. + If an appropriate image type is found, check if that image type can be + autodetected using the variable `image-type-auto-detectable'. Finally, + if `buffer-file-name' is non-nil, check if it matches another major mode + in `auto-mode-alist' apart from `image-mode'; if there is another match, + the autodetection is considered to have failed. Return t if all the above + steps succeed. + \(fn)" nil nil) (autoload (quote create-image) "image" "\ diff --cc lisp/startup.el index c19a997da82,76bec878338..7e88b5f29e9 --- a/lisp/startup.el +++ b/lisp/startup.el @@@ -646,27 -636,35 +646,31 @@@ opening the first frame (e.g. open a co (cdr error) ", ")))) 'external-debugging-output) (terpri 'external-debugging-output) - (setq window-system nil) + (setq initial-window-system nil) (kill-emacs))) - ;; Windowed displays do this inside their *-win.el. - (unless (or (display-graphic-p) noninteractive) - (setq command-line-args (tty-handle-args command-line-args))) - (set-locale-environment nil) - ;; Convert preloaded file names to absolute. - (let ((lisp-dir - (file-truename - (file-name-directory - (locate-file "simple" load-path - (get-load-suffixes)))))) - - (setq load-history - (mapcar (lambda (elt) - (if (and (stringp (car elt)) - (not (file-name-absolute-p (car elt)))) - (cons (concat lisp-dir - (car elt)) - (cdr elt)) - elt)) - load-history))) + ;; Convert preloaded file names in load-history to absolute. + (let ((simple-file-name + (locate-file "simple" load-path (get-load-suffixes))) + lisp-dir) + ;; Don't abort if simple.el cannot be found, but print a warning. + (if (null simple-file-name) + (progn + (princ "Warning: Could not find simple.el nor simple.elc" + 'external-debugging-output) + (terpri 'external-debugging-output)) + (setq lisp-dir (file-truename (file-name-directory simple-file-name))) + (setq load-history + (mapcar (lambda (elt) + (if (and (stringp (car elt)) + (not (file-name-absolute-p (car elt)))) + (cons (concat lisp-dir + (car elt)) + (cdr elt)) + elt)) + load-history)))) ;; Convert the arguments to Emacs internal representation. (let ((args (cdr command-line-args))) diff --cc src/frame.c index 7d5bdcb1cb6,5990b9e0717..48cca967cc1 --- a/src/frame.c +++ b/src/frame.c @@@ -2342,6 -2072,6 +2341,8 @@@ store_frame_param (f, prop, val /* Install the chosen minibuffer window, with proper buffer. */ f->minibuffer_window = val; } ++ ++ return Qnil; } DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, @@@ -2601,46 -2321,9 +2593,44 @@@ enabled such bindings for that variabl call1 (Qframe_set_background_mode, frame); } } - - return unbind_to (count, Qnil); +} - return Qnil; +DEFUN ("frame-with-environment", Fframe_with_environment, Sframe_with_environment, 0, 1, 0, + doc: /* Return the frame that has the environment variable list for FRAME. + +The frame-local environment variable list is normally shared between +frames that were created in the same Emacsclient session. The +environment list is stored in a single frame's 'environment parameter; +the other frames' 'environment parameter is set to this frame. This +function follows the chain of 'environment references to reach the +frame that stores the actual local environment list, and returns that +frame. */) + (frame) + Lisp_Object frame; +{ + Lisp_Object hare, tortoise; + + if (NILP (frame)) + frame = selected_frame; + CHECK_FRAME (frame); + + hare = tortoise = get_frame_param (XFRAME (frame), Qenvironment); + while (!NILP (hare) && FRAMEP (hare)) + { + frame = hare; + hare = get_frame_param (XFRAME (hare), Qenvironment); + if (NILP (hare) || !FRAMEP (hare)) + break; + frame = hare; + hare = get_frame_param (XFRAME (hare), Qenvironment); + tortoise = get_frame_param (XFRAME (tortoise), Qenvironment); + if (EQ (hare, tortoise)) + error ("Cyclic frame-local environment indirection"); + } + + return frame; } + DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height, 0, 1, 0, @@@ -4424,12 -4107,8 +4429,8 @@@ Setting this variable does not affect e Vdefault_frame_scroll_bars = Qnil; #endif - Qinhibit_default_face_x_resources - = intern ("inhibit-default-face-x-resources"); - staticpro (&Qinhibit_default_face_x_resources); - DEFVAR_LISP ("terminal-frame", &Vterminal_frame, - doc: /* The initial frame-object, which represents Emacs's stdout. */); + doc: /* The initial frame-object, which represents Emacs's stdout. */); DEFVAR_LISP ("emacs-iconified", &Vemacs_iconified, doc: /* Non-nil if all of Emacs is iconified and frame updates are not needed. */); diff --cc src/minibuf.c index bdd810cb201,667799bf170..51a64ffed8b --- a/src/minibuf.c +++ b/src/minibuf.c @@@ -480,6 -483,15 +484,14 @@@ read_minibuf (map, initial, prompt, bac specbind (Qminibuffer_default, defalt); + /* If Vminibuffer_completing_file_name is `lambda' on entry, it was t + in previous recursive minibuffer, but was not set explicitly + to t for this invocation, so set it to nil in this minibuffer. + Save the old value now, before we change it. */ + specbind (intern ("minibuffer-completing-file-name"), Vminibuffer_completing_file_name); + if (EQ (Vminibuffer_completing_file_name, Qlambda)) + Vminibuffer_completing_file_name = Qnil; + - single_kboard_state (); #ifdef HAVE_X_WINDOWS if (display_hourglass_p) cancel_hourglass ();