changeset 83259:cf4b5d1da82f

Merged from miles@gnu.org--gnu-2005 (patch 119) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-119 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-299
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 23 Feb 2005 11:24:05 +0000
parents 73700d004690 (current diff) a23b0b211b2a (diff)
children 25f02aeb20f4
files lisp/ChangeLog lisp/frame.el src/xdisp.c
diffstat 9 files changed, 105 insertions(+), 104 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Feb 21 13:10:42 2005 +0000
+++ b/lisp/ChangeLog	Wed Feb 23 11:24:05 2005 +0000
@@ -1,5 +1,21 @@
+2005-02-21  Wolfgang Jenkner  <wjenkner@inode.at>  (tiny change)
+
+	* pcvs.el (cvs-retrieve-revision): Fix thinko.
+
+2005-02-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* frame.el (blink-cursor-mode): Use define-minor-mode.
+
+	* term/mac-win.el (function-key-map): Use char-names more consistently.
+	(file-name-coding-system): Only set it for MacOS-9.  The other case is
+	already handled in mule-cmds.el (where it also works when mac-win.el
+	is not used).
+
 2005-02-21  Kenichi Handa  <handa@m17n.org>
 
+	* international/mule.el (ctext-pre-write-conversion): Always use
+	" *code-converting-work*" buffer for work.
+
 	* textmodes/ispell.el (ispell-dictionary-alist): Fix docstring.
 
 2005-02-20  Thien-Thi Nguyen  <ttn@gnu.org>
@@ -8,7 +24,7 @@
 
 2005-02-20  Jonathan Yavner  <jyavner@member.fsf.org>
 
-	* ses.el (undo-more): restore defadvice, but only the part that
+	* ses.el (undo-more): Restore defadvice, but only the part that
 	allows changes outside the restricted area of the buffer.
 
 2005-02-20  Kim F. Storm  <storm@cua.dk>
--- a/lisp/frame.el	Mon Feb 21 13:10:42 2005 +0000
+++ b/lisp/frame.el	Wed Feb 23 11:24:05 2005 +0000
@@ -1,6 +1,6 @@
 ;;; frame.el --- multi-frame management independent of window systems
 
-;; Copyright (C) 1993, 1994, 1996, 1997, 2000, 2001, 2003, 2004
+;; Copyright (C) 1993, 1994, 1996, 1997, 2000, 2001, 2003, 2004, 2005
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -1327,35 +1327,11 @@
 This timer calls `blink-cursor-timer-function' every
 `blink-cursor-interval' seconds.")
 
-;; The strange sequence below is meant to set both the right temporary
-;; value and the right "standard expression" , according to Custom,
-;; for blink-cursor-mode.  We do not know the standard _evaluated_
-;; value yet, because the standard expression uses values that are not
-;; yet set.  Evaluating it now would yield an error, but we make sure
-;; that it is not evaluated, by ensuring that blink-cursor-mode is set
-;; before the defcustom is evaluated and by using the right :initialize
-;; function.  The correct evaluated standard value will be installed
-;; in startup.el using exactly the same expression as in the defcustom.
-(defvar blink-cursor-mode)
-(unless (boundp 'blink-cursor-mode) (setq blink-cursor-mode nil))
-(defcustom blink-cursor-mode
-  (not (or noninteractive
-	   emacs-quick-startup
-	   (eq system-type 'ms-dos)
-	   (not (memq initial-window-system '(x w32)))))
-  "*Non-nil means Blinking Cursor mode is active."
-  :group 'cursor
-  :tag "Blinking cursor"
-  :type 'boolean
-  :initialize 'custom-initialize-set
-  :set #'(lambda (symbol value)
-	   (set-default symbol value)
-	   (blink-cursor-mode (or value 0))))
-
-(defvaralias 'blink-cursor 'blink-cursor-mode)
-(make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1")
-
-(defun blink-cursor-mode (arg)
+;; We do not know the standard _evaluated_ value yet, because the standard
+;; expression uses values that are not yet set.  The correct evaluated
+;; standard value will be installed in startup.el using exactly the same
+;; expression as in the defcustom.
+(define-minor-mode blink-cursor-mode
   "Toggle blinking cursor mode.
 With a numeric argument, turn blinking cursor mode on iff ARG is positive.
 When blinking cursor mode is enabled, the cursor of the selected
@@ -1364,27 +1340,27 @@
 Note that this command is effective only when Emacs
 displays through a window system, because then Emacs does its own
 cursor display.  On a text-only terminal, this is not implemented."
-  (interactive "P")
-  (let ((on-p (if (null arg)
-		  (not blink-cursor-mode)
-		(> (prefix-numeric-value arg) 0))))
-    (if blink-cursor-idle-timer
-	(cancel-timer blink-cursor-idle-timer))
-    (if blink-cursor-timer
-	(cancel-timer blink-cursor-timer))
-    (setq blink-cursor-idle-timer nil
-	  blink-cursor-timer nil
-	  blink-cursor-mode nil)
-    (if on-p
-	(progn
-	  ;; Hide the cursor.
-	  ;(internal-show-cursor nil nil)
-	  (setq blink-cursor-idle-timer
-		(run-with-idle-timer blink-cursor-delay
-				     blink-cursor-delay
-				     'blink-cursor-start))
-	  (setq blink-cursor-mode t))
-      (internal-show-cursor nil t))))
+  :init-value (not (or noninteractive
+		       emacs-quick-startup
+		       (eq system-type 'ms-dos)
+		       (not (memq initial-window-system '(x w32)))))
+  :global t
+  (if blink-cursor-idle-timer (cancel-timer blink-cursor-idle-timer))
+  (if blink-cursor-timer (cancel-timer blink-cursor-timer))
+  (setq blink-cursor-idle-timer nil
+	blink-cursor-timer nil)
+  (if blink-cursor-mode
+      (progn
+	;; Hide the cursor.
+	;;(internal-show-cursor nil nil)
+	(setq blink-cursor-idle-timer
+	      (run-with-idle-timer blink-cursor-delay
+				   blink-cursor-delay
+				   'blink-cursor-start)))
+    (internal-show-cursor nil t)))
+
+(defvaralias 'blink-cursor 'blink-cursor-mode)
+(make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1")
 
 (defun blink-cursor-start ()
   "Timer function called from the timer `blink-cursor-idle-timer'.
@@ -1452,5 +1428,5 @@
 
 (provide 'frame)
 
-;;; arch-tag: 82979c70-b8f2-4306-b2ad-ddbd6b328b56
+;; arch-tag: 82979c70-b8f2-4306-b2ad-ddbd6b328b56
 ;;; frame.el ends here
--- a/lisp/international/mule.el	Mon Feb 21 13:10:42 2005 +0000
+++ b/lisp/international/mule.el	Wed Feb 23 11:24:05 2005 +0000
@@ -1467,18 +1467,20 @@
 by encode-coding-string, generate a new temp buffer, insert the
 text, and convert it in the temporary buffer.  Otherwise, convert in-place."
   (save-match-data
-    ;; Setup a working buffer if necessary.
-    (cond ((stringp from)
-	   (let ((buf (current-buffer)))
-	     (set-buffer (generate-new-buffer " *temp"))
+    (let ((workbuf (get-buffer-create " *code-conversion-work*")))
+      ;; Setup a working buffer if necessary.
+      (cond ((stringp from)
+	     (set-buffer workbuf)
+	     (erase-buffer)
 	     (set-buffer-multibyte (multibyte-string-p from))
-	     (insert from)))
-	  ((not (string= (buffer-name) " *code-converting-work*"))
-	   (let ((buf (current-buffer))
-		 (multibyte enable-multibyte-characters))
-	     (set-buffer (generate-new-buffer " *temp"))
-	     (set-buffer-multibyte multibyte)
-	     (insert-buffer-substring buf from to))))
+	     (insert from))
+	    ((not (eq (current-buffer) workbuf))
+	     (let ((buf (current-buffer))
+		   (multibyte enable-multibyte-characters))
+	       (set-buffer workbuf)
+	       (erase-buffer)
+	       (set-buffer-multibyte multibyte)
+	       (insert-buffer-substring buf from to)))))
 
     ;; Now we can encode the whole buffer.
     (let ((encoding-table (ctext-non-standard-encodings-table))
--- a/lisp/pcvs.el	Mon Feb 21 13:10:42 2005 +0000
+++ b/lisp/pcvs.el	Wed Feb 23 11:24:05 2005 +0000
@@ -1,7 +1,7 @@
 ;;; pcvs.el --- a front-end to CVS
 
 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;;   2000, 2002, 2003, 2004  Free Software Foundation, Inc.
+;;   2000, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 ;; Author: (The PCL-CVS Trust) pcl-cvs@cyclic.com
 ;;	(Per Cederqvist) ceder@lysator.liu.se
@@ -1687,8 +1687,7 @@
 	  (message "Retrieving revision %s..." rev)
 	  ;; Discard stderr output to work around the CVS+SSH+libc
 	  ;; problem when stdout and stderr are the same.
-	  ;; FIXME: this doesn't seem to make any difference :-(
-	  (let ((res (apply 'call-process cvs-program nil '(t . nil) nil
+	  (let ((res (apply 'call-process cvs-program nil '(t nil) nil
 			    "-q" "update" "-p"
 			    ;; If `rev' is HEAD, don't pass it at all:
 			    ;; the default behavior is to get the head
--- a/lisp/term/mac-win.el	Mon Feb 21 13:10:42 2005 +0000
+++ b/lisp/term/mac-win.el	Wed Feb 23 11:24:05 2005 +0000
@@ -1,6 +1,7 @@
 ;;; mac-win.el --- parse switches controlling interface with Mac window system
 
-;; Copyright (C) 1999, 2000, 2002, 2003, 2004  Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005
+;;   Free Software Foundation, Inc.
 
 ;; Author: Andrew Choi <akochoi@mac.com>
 ;; Keywords: terminals
@@ -1013,16 +1014,16 @@
 (define-key function-key-map [M-return] [?\M-\C-m])
 (define-key function-key-map [tab] [?\t])
 (define-key function-key-map [M-tab] [?\M-\t])
-(define-key function-key-map [backspace] [127])
+(define-key function-key-map [backspace] [?\d])
 (define-key function-key-map [M-backspace] [?\M-\d])
 (define-key function-key-map [escape] [?\e])
 (define-key function-key-map [M-escape] [?\M-\e])
 
 ;; These tell read-char how to convert
 ;; these special chars to ASCII.
-(put 'return 'ascii-character 13)
+(put 'return 'ascii-character ?\C-m)
 (put 'tab 'ascii-character ?\t)
-(put 'backspace 'ascii-character 127)
+(put 'backspace 'ascii-character ?\d)
 (put 'escape 'ascii-character ?\e)
 
 
@@ -1667,7 +1668,7 @@
 
 (unless (eq system-type 'darwin)
   ;; This variable specifies the Unix program to call (as a process) to
-  ;; deteremine the amount of free space on a file system (defaults to
+  ;; determine the amount of free space on a file system (defaults to
   ;; df).  If it is not set to nil, ls-lisp will not work correctly
   ;; unless an external application df is implemented on the Mac.
   (setq directory-free-space-program nil)
@@ -1675,20 +1676,17 @@
   ;; Set this so that Emacs calls subprocesses with "sh" as shell to
   ;; expand filenames Note no subprocess for the shell is actually
   ;; started (see run_mac_command in sysdep.c).
-  (setq shell-file-name "sh"))
+  (setq shell-file-name "sh")
+
+  ;; To display filenames in Chinese or Japanese, replace mac-roman with
+  ;; big5 or sjis
+  (setq file-name-coding-system 'mac-roman))
 
 ;; X Window emulation in macterm.c is not complete enough to start a
 ;; frame without a minibuffer properly.  Call this to tell ediff
 ;; library to use a single frame.
 ; (ediff-toggle-multiframe)
 
-(if (eq system-type 'darwin)
-    ;; On Darwin filenames are encoded in UTF-8
-    (setq file-name-coding-system 'utf-8)
-  ;; To display filenames in Chinese or Japanese, replace mac-roman with
-  ;; big5 or sjis
-  (setq file-name-coding-system 'mac-roman))
-
 ;; If Emacs is started from the Finder, change the default directory
 ;; to the user's home directory.
 (if (string= default-directory "/")
@@ -1706,5 +1704,5 @@
 
 ;; (prefer-coding-system 'mac-roman)
 
-;;; arch-tag: 71dfcd14-cde8-4d66-b05c-85ec94fb23a6
+;; arch-tag: 71dfcd14-cde8-4d66-b05c-85ec94fb23a6
 ;;; mac-win.el ends here
--- a/src/ChangeLog	Mon Feb 21 13:10:42 2005 +0000
+++ b/src/ChangeLog	Wed Feb 23 11:24:05 2005 +0000
@@ -1,3 +1,17 @@
+2005-02-21  Stefan  <monnier@iro.umontreal.ca>
+
+	* keymap.h: Declare Fcurrent_active_maps, used in doc.c.
+
+2005-02-21  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (move_it_vertically_backward): Eliminate two xasserts.
+	I think those asserts are bogus if buffer contains invisible text
+	or images.
+
+2005-02-21  David Kastrup <dak@gnu.org>
+
+	* gtkutil.c (xg_create_frame_widgets): UNBLOCK_INPUT on error.
+
 2005-02-20  Kim F. Storm  <storm@cua.dk>
 
 	* xdisp.c (pos_visible_p): Be sure to move to the specified
@@ -848,13 +862,8 @@
 	(install_window_handler) [TARGET_API_MAC_CARBON]:
 	Register handlers for tracking/receiving drag-and-drop items.
 	(do_ae_open_documents): Generate unibyte strings for filenames.
-<<<<<<< ChangeLog
-	(mac_do_receive_drag) [TARGET_API_MAC_CARBON] : Likewise.
-	Reject only non-filename items.  Set event modifiers and return value.
-=======
 	(mac_do_receive_drag) [TARGET_API_MAC_CARBON] : Likewise.
 	Reject only non-filename items.  Set event modifiers, and return value.
->>>>>>> 1.4187
 
 2004-12-28  Dan Nicolaescu  <dann@ics.uci.edu>
 
@@ -964,12 +973,7 @@
 	(x_make_frame_visible) [TARGET_API_MAC_CARBON]: Reposition window
 	if the position is neither user-specified nor program-specified.
 	(x_free_frame_resources): Free size_hints.
-<<<<<<< ChangeLog
-	(x_wm_set_size_hint): Allocate size_hints if needed.
-	Set size_hints.
-=======
 	(x_wm_set_size_hint): Allocate size_hints if needed.  Set size_hints.
->>>>>>> 1.4187
 	(mac_clear_font_name_table): New function.
 	(mac_do_list_fonts): Initialize font_name_table if needed.
 	(x_list_fonts): Don't initialize font_name_table.  Add BLOCK_INPUT
@@ -1021,11 +1025,7 @@
 
 2004-12-27  Richard M. Stallman  <rms@gnu.org>
 
-<<<<<<< ChangeLog
-	* buffer.c (Fbuffer_disable_undo): Delete (moved to simple.el).
-=======
 	* buffer.c (Fbuffer_disable_undo): Delete (move to simple.el).
->>>>>>> 1.4187
 	(syms_of_buffer): Don't defsubr it.
 
 	* process.c (list_processes_1): Set undo_list instead
--- a/src/gtkutil.c	Mon Feb 21 13:10:42 2005 +0000
+++ b/src/gtkutil.c	Wed Feb 23 11:24:05 2005 +0000
@@ -584,14 +584,14 @@
 {
   int mbheight = FRAME_MENUBAR_HEIGHT (f);
   int tbheight = FRAME_TOOLBAR_HEIGHT (f);
-  int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, (pixelheight 
+  int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, (pixelheight
 						   - mbheight - tbheight));
   int columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth);
 
   if (FRAME_GTK_WIDGET (f)
-      && (columns != FRAME_COLS (f) 
+      && (columns != FRAME_COLS (f)
 	  || rows != FRAME_LINES (f)
-          || pixelwidth != FRAME_PIXEL_WIDTH (f) 
+          || pixelwidth != FRAME_PIXEL_WIDTH (f)
 	  || pixelheight != FRAME_PIXEL_HEIGHT (f)))
     {
       struct x_output *x = f->output_data.x;
@@ -719,6 +719,7 @@
       if (wvbox) gtk_widget_destroy (wvbox);
       if (wfixed) gtk_widget_destroy (wfixed);
 
+      UNBLOCK_INPUT;
       return 0;
     }
 
@@ -2881,7 +2882,7 @@
       if (xg_timer) xg_stop_timer ();
       bar->dragging = Qnil;
     }
-  
+
   return FALSE;
 }
 
@@ -2945,7 +2946,7 @@
      event box window.  */
   gtk_fixed_put (GTK_FIXED (f->output_data.x->edit_widget), webox, -1, -1);
   gtk_container_add (GTK_CONTAINER (webox), wscroll);
-  
+
 
   /* Set the cursor to an arrow.  */
   xg_set_cursor (webox, FRAME_X_DISPLAY_INFO (f)->xg_cursor);
@@ -3270,10 +3271,10 @@
 
   event->area.x = max (0, event->area.x);
   event->area.y = max (0, event->area.y);
-  
+
   event->area.width = max (width, event->area.width);
   event->area.height = max (height, event->area.height);
-  
+
   return FALSE;
 }
 
@@ -3394,7 +3395,7 @@
      DEFAULT_TOOL_BAR_BUTTON_MARGIN has no effect.  */
   hmargin = max (0, hmargin - DEFAULT_TOOL_BAR_BUTTON_MARGIN);
   vmargin = max (0, vmargin - DEFAULT_TOOL_BAR_BUTTON_MARGIN);
-  
+
   if (! x->toolbar_widget)
     xg_create_tool_bar (f);
 
--- a/src/keymap.h	Mon Feb 21 13:10:42 2005 +0000
+++ b/src/keymap.h	Wed Feb 23 11:24:05 2005 +0000
@@ -1,5 +1,5 @@
 /* Functions to manipulate keymaps.
-   Copyright (C) 2001  Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -33,6 +33,7 @@
 EXFUN (Fkey_description, 2);
 EXFUN (Fsingle_key_description, 2);
 EXFUN (Fwhere_is_internal, 5);
+EXFUN (Fcurrent_active_maps, 1);
 extern Lisp_Object access_keymap P_ ((Lisp_Object, Lisp_Object, int, int, int));
 extern Lisp_Object get_keyelt P_ ((Lisp_Object, int));
 extern Lisp_Object get_keymap P_ ((Lisp_Object, int, int));
--- a/src/xdisp.c	Mon Feb 21 13:10:42 2005 +0000
+++ b/src/xdisp.c	Wed Feb 23 11:24:05 2005 +0000
@@ -6314,7 +6314,11 @@
 	 value of nlines is > 0 if continuation lines were involved.  */
       if (nlines > 0)
 	move_it_by_lines (it, nlines, 1);
+#if 0
+      /* I think this assert is bogus if buffer contains
+	 invisible text or images.  KFS.  */
       xassert (IT_CHARPOS (*it) <= start_pos);
+#endif
     }
   else
     {
@@ -6363,7 +6367,11 @@
 	      while (target_y >= line_bottom_y (it) && IT_CHARPOS (*it) < ZV);
 	    }
 
+#if 0
+	  /* I think this assert is bogus if buffer contains
+	     invisible text or images.  KFS.  */
 	  xassert (IT_CHARPOS (*it) >= BEGV);
+#endif
 	}
     }
 }