Mercurial > emacs
changeset 83248:86457de2420c
Merged from miles@gnu.org--gnu-2005 (patch 76-78)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-76
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-77
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-78
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-288
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Fri, 04 Feb 2005 15:36:07 +0000 |
parents | a257c9edb57b (current diff) 81a7887c8c82 (diff) |
children | 267c2ab562ab |
files | lisp/ChangeLog lisp/international/mule-cmds.el man/ChangeLog man/frames.texi src/dispnew.c src/macterm.c src/xfaces.c src/xfns.c src/xmenu.c |
diffstat | 17 files changed, 136 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Feb 04 14:06:45 2005 +0000 +++ b/lisp/ChangeLog Fri Feb 04 15:36:07 2005 +0000 @@ -1,3 +1,27 @@ +2005-02-04 Jay Belanger <belanger@truman.edu> + + * calc/calc-embed.el (calc-embedded-update): Don't put in + unnecessary newlines. Adjust the end of formula marker. + + * calc/calc-lang.el (math-latex-parse-frac): Don't use arguments. + (math-latex-parse-two-args): New function. + +2005-02-03 Lute Kamstra <lute@gnu.org> + + * help-fns.el (help-with-tutorial): Make sure that users cannot + remove the entire text of the tutorial by means of `undo'. + +2005-02-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/ispell.el (ispell-internal-change-dictionary): Fix problem + in recent changes, where the ispell process was repeatedly + killed & restarted. + + * international/mule-cmds.el (set-locale-environment): Set file-name + coding system to utf-8 on Darwin systems. + (set-default-coding-systems): Don't set default-file-name-coding-system + on Darwin systems. + 2005-02-03 Richard M. Stallman <rms@gnu.org> * hi-lock.el (hi-lock-mode): Turning on Hi-Lock turns on Font-Lock.
--- a/lisp/calc/calc-embed.el Fri Feb 04 14:06:45 2005 +0000 +++ b/lisp/calc/calc-embed.el Fri Feb 04 15:36:07 2005 +0000 @@ -967,19 +967,24 @@ (calc-embedded-original-buffer t info) (or (equal str (aref info 6)) (let ((delta (- (aref info 5) (aref info 3))) + (adjbot 0) (buffer-read-only nil)) (goto-char (aref info 2)) (delete-region (point) (aref info 3)) (and (> (nth 1 entry) (1+ extra)) (aref info 7) (progn - (aset info 7 nil) (delete-horizontal-space) - (insert "\n\n") - (delete-horizontal-space) - (backward-char 1))) + (if (looking-at "\n") + ;; If there's a newline there, don't add one + (insert "\n") + (insert "\n\n") + (delete-horizontal-space) + (setq adjbot 1) +; (setq delta (1+ delta)) + (backward-char 1)))) (insert str) - (set-marker (aref info 3) (point)) + (set-marker (aref info 3) (+ (point) adjbot)) (set-marker (aref info 5) (+ (point) delta)) (aset info 6 str)))))) (if (eq (car-safe val) 'calcFunc-evalto)
--- a/lisp/calc/calc-lang.el Fri Feb 04 14:06:45 2005 +0000 +++ b/lisp/calc/calc-lang.el Fri Feb 04 15:36:07 2005 +0000 @@ -469,12 +469,12 @@ (put 'latex 'math-function-table (append (get 'tex 'math-function-table) - '(( \\frac . (math-latex-parse-frac /)) - ( \\tfrac . (math-latex-parse-frac /)) - ( \\dfrac . (math-latex-parse-frac /)) - ( \\binom . (math-latex-parse-frac calcFunc-choose)) - ( \\tbinom . (math-latex-parse-frac calcFunc-choose)) - ( \\dbinom . (math-latex-parse-frac calcFunc-choose)) + '(( \\frac . (math-latex-parse-frac)) + ( \\tfrac . (math-latex-parse-frac)) + ( \\dfrac . (math-latex-parse-frac)) + ( \\binom . (math-latex-parse-two-args calcFunc-choose)) + ( \\tbinom . (math-latex-parse-two-args calcFunc-choose)) + ( \\dbinom . (math-latex-parse-two-args calcFunc-choose)) ( \\phi . calcFunc-totient ) ( \\mu . calcFunc-moebius )))) @@ -487,12 +487,23 @@ (put 'latex 'math-complex-format 'i) + (defun math-latex-parse-frac (f val) (let (numer denom) - (setq args (math-read-expr-list)) + (setq numer (car (math-read-expr-list))) (math-read-token) - (setq margs (math-read-factor)) - (list (nth 2 f) (car args) margs))) + (setq denom (math-read-factor)) + (if (and (Math-num-integerp numer) + (Math-num-integerp denom)) + (list 'frac numer denom) + (list '/ numer denom)))) + +(defun math-latex-parse-two-args (f val) + (let (first second) + (setq first (car (math-read-expr-list))) + (math-read-token) + (setq second (math-read-factor)) + (list (nth 2 f) first second))) (defun math-latex-print-frac (a fn) (list 'horiz (nth 1 fn) "{" (math-compose-expr (nth 1 a) -1)
--- a/lisp/help-fns.el Fri Feb 04 14:06:45 2005 +0000 +++ b/lisp/help-fns.el Fri Feb 04 15:36:07 2005 +0000 @@ -97,6 +97,7 @@ (forward-line 1) (newline (- n (/ n 2))))) (goto-char (point-min)) + (setq buffer-undo-list nil) (set-buffer-modified-p nil)))) ;;;###autoload
--- a/lisp/international/mule-cmds.el Fri Feb 04 14:06:45 2005 +0000 +++ b/lisp/international/mule-cmds.el Fri Feb 04 15:36:07 2005 +0000 @@ -327,7 +327,8 @@ (or (local-variable-p 'buffer-file-coding-system buffer) (ucs-set-table-for-input buffer)))) - (if default-enable-multibyte-characters + (if (and default-enable-multibyte-characters (not (eq system-type 'darwin))) + ;; The file-name coding system on Darwin systems is always utf-8. (setq default-file-name-coding-system coding-system)) ;; If coding-system is nil, honor that on MS-DOS as well, so ;; that they could reset the terminal coding system. @@ -1694,6 +1695,8 @@ (set-default-coding-systems nil) (setq default-sendmail-coding-system 'iso-latin-1) + ;; On Darwin systems, this should be utf-8, but when this file is loaded + ;; utf-8 is not yet defined, so we set it in set-locale-environment instead. (setq default-file-name-coding-system 'iso-latin-1) ;; Preserve eol-type from existing default-process-coding-systems. ;; On non-unix-like systems in particular, these may have been set @@ -2489,6 +2492,10 @@ (set-keyboard-coding-system code-page-coding) (set-terminal-coding-system code-page-coding)))) + ;; On Darwin, file names are always encoded in utf-8, no matter the locale. + (when (eq system-type 'darwin) + (setq default-file-name-coding-system 'utf-8)) + ;; Default to A4 paper if we're not in a C, POSIX or US locale. ;; (See comments in Flocale_info.) (let ((locale locale)
--- a/lisp/textmodes/ispell.el Fri Feb 04 14:06:45 2005 +0000 +++ b/lisp/textmodes/ispell.el Fri Feb 04 15:36:07 2005 +0000 @@ -1,6 +1,7 @@ ;;; ispell.el --- interface to International Ispell Versions 3.1 and 3.2 -;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 +;; Free Software Foundation, Inc. ;; Author: Ken Stevens <k.stevens@ieee.org> ;; Maintainer: Ken Stevens <k.stevens@ieee.org> @@ -2449,7 +2450,7 @@ "Update the dictionary actually used by Ispell. This may kill the Ispell process; if so, a new one will be started when needed." - (let ((dict (or ispell-local-dictionary ispell-dictionary "default"))) + (let ((dict (or ispell-local-dictionary ispell-dictionary))) (unless (equal ispell-current-dictionary dict) (setq ispell-current-dictionary dict) (ispell-kill-ispell t))))
--- a/man/ChangeLog Fri Feb 04 14:06:45 2005 +0000 +++ b/man/ChangeLog Fri Feb 04 15:36:07 2005 +0000 @@ -1,3 +1,7 @@ +2005-02-03 Lute Kamstra <lute@gnu.org> + + * frames.texi (Frames, Drag and Drop): Fix typos. + 2005-02-03 Richard M. Stallman <rms@gnu.org> * windows.texi (Basic Window): Mention color-change in mode line.
--- a/man/frames.texi Fri Feb 04 14:06:45 2005 +0000 +++ b/man/frames.texi Fri Feb 04 15:36:07 2005 +0000 @@ -813,12 +813,12 @@ @section Drag and Drop @cindex drag and drop - Emacs supports drag and drop using the mouse. For instance, dropping -text onto an Emacs frame inserts the text where it is dropped. Dropping -a file onto an Emacs frame visits that file. As a special case, -dropping the file on a Dired buffer moves or copies the file (according -to the conventions of the application it came from) into the directory -displayed in that buffer. + Emacs supports @dfn{drag and drop} using the mouse. For instance, +dropping text onto an Emacs frame inserts the text where it is dropped. +Dropping a file onto an Emacs frame visits that file. As a special +case, dropping the file on a Dired buffer moves or copies the file +(according to the conventions of the application it came from) into the +directory displayed in that buffer. @vindex x-dnd-open-file-other-window Dropping a file normally visits it in the window you drop it on. If
--- a/src/ChangeLog Fri Feb 04 14:06:45 2005 +0000 +++ b/src/ChangeLog Fri Feb 04 15:36:07 2005 +0000 @@ -1,3 +1,34 @@ +2005-02-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xmenu.c (menubar_selection_callback): Force out GTK buffered + events so the menu event comes after them. This is to prevent sit-for + from exiting on buffered events directly after a menu selection, + lisp code for Help => About Emacs uses sit-for. + + * gtkutil.c (create_menus): Connect selection-done event instead of + the deactivate event to deactivate_cb. This will make the last + leave event come before the call to deactivate_cb, so the leave + event does not make sit-for exit after a menu selection. + +2005-02-03 Kim F. Storm <storm@cua.dk> + + * dispnew.c (build_frame_matrix_from_leaf_window) + [!GLYPH_DEBUG]: Fix xassert. + + * xfaces.c (x_free_gc) [!GLYPH_DEBUG]: Fix xassert. + + * xfns.c (unwind_create_frame) [!GLYPH_DEBUG]: Fix xassert. + +2005-02-03 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * mac.c: Use MAC_OS_X_VERSION_MAX_ALLOWED to conditionalize by + the compiling OS version. + + * macfns.c (x_create_tip_frame): Likewise. + + * macterm.c (mac_draw_string_common, x_make_frame_visible): + Likewise. + 2005-02-03 Richard M. Stallman <rms@gnu.org> * xterm.c (x_error_quitter): On GCC 3 and up, specify noinline.
--- a/src/dispnew.c Fri Feb 04 14:06:45 2005 +0000 +++ b/src/dispnew.c Fri Feb 04 15:36:07 2005 +0000 @@ -1,6 +1,6 @@ /* Updating of data structures for redisplay. - Copyright (C) 1985,86,87,88,93,94,95,97,98,1999,2000,01,02,03,04 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, 1998, 1999, + 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -2775,7 +2775,6 @@ /* If rows are in sync, we don't have to copy glyphs because frame and window share glyphs. */ -#if GLYPH_DEBUG strcpy (w->current_matrix->method, w->desired_matrix->method); add_window_display_history (w, w->current_matrix->method, 0); #endif
--- a/src/gtkutil.c Fri Feb 04 14:06:45 2005 +0000 +++ b/src/gtkutil.c Fri Feb 04 15:36:07 2005 +0000 @@ -1905,7 +1905,7 @@ if (deactivate_cb) g_signal_connect (G_OBJECT (wmenu), - "deactivate", deactivate_cb, 0); + "selection-done", deactivate_cb, 0); g_signal_connect (G_OBJECT (wmenu), "grab-notify", G_CALLBACK (menu_grab_callback), 0);
--- a/src/mac.c Fri Feb 04 14:06:45 2005 +0000 +++ b/src/mac.c Fri Feb 04 15:36:07 2005 +0000 @@ -2858,7 +2858,7 @@ return r; } -#ifndef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1020 #undef SELECT_INVALIDATE_CFSOCKET #endif
--- a/src/macfns.c Fri Feb 04 14:06:45 2005 +0000 +++ b/src/macfns.c Fri Feb 04 15:36:07 2005 +0000 @@ -3882,7 +3882,7 @@ SetRect (&r, 0, 0, 1, 1); #if TARGET_API_MAC_CARBON if (CreateNewWindow (kHelpWindowClass, -#ifdef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 kWindowIgnoreClicksAttribute | #endif kWindowNoUpdatesAttribute |
--- a/src/macterm.c Fri Feb 04 14:06:45 2005 +0000 +++ b/src/macterm.c Fri Feb 04 15:36:07 2005 +0000 @@ -729,7 +729,7 @@ int nchars, mode, bytes_per_char; { SetPortWindowPort (w); -#ifdef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 UInt32 textFlags, savedFlags; if (!NILP(Vmac_use_core_graphics)) { textFlags = kQDUseCGTextRendering; @@ -746,7 +746,7 @@ MoveTo (x, y); DrawText (buf, 0, nchars * bytes_per_char); -#ifdef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 if (!NILP(Vmac_use_core_graphics)) SwapQDTextFlags(savedFlags); #endif @@ -5451,7 +5451,7 @@ else RepositionWindow (FRAME_MAC_WINDOW (f), FRAME_MAC_WINDOW (sf), -#ifdef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 kWindowCascadeStartAtParentWindowScreen #else kWindowCascadeOnParentWindowScreen
--- a/src/xfaces.c Fri Feb 04 14:06:45 2005 +0000 +++ b/src/xfaces.c Fri Feb 04 15:36:07 2005 +0000 @@ -1,5 +1,5 @@ /* xfaces.c -- "Face" primitives. - Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation. This file is part of GNU Emacs. @@ -741,9 +741,7 @@ GC gc; { BLOCK_INPUT; -#if GLYPH_DEBUG - xassert (--ngcs >= 0); -#endif + IF_DEBUG (xassert (--ngcs >= 0)); XFreeGC (FRAME_X_DISPLAY (f), gc); UNBLOCK_INPUT; } @@ -776,7 +774,7 @@ GC gc; { BLOCK_INPUT; - xassert (--ngcs >= 0); + IF_DEBUG (xassert (--ngcs >= 0)); xfree (gc); UNBLOCK_INPUT; }
--- a/src/xfns.c Fri Feb 04 14:06:45 2005 +0000 +++ b/src/xfns.c Fri Feb 04 15:36:07 2005 +0000 @@ -1,6 +1,6 @@ /* Functions for the X window system. - Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000,01,02,03,04 - Free Software Foundation. + Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001, 2002, 2003, 2004, 2005 Free Software Foundation. This file is part of GNU Emacs. @@ -4108,7 +4108,7 @@ if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f); else w = FRAME_X_WINDOW (f); - + XChangeProperty (FRAME_X_DISPLAY (f), w, prop_atom, target_type, element_format, PropModeReplace, data, nelements); @@ -5293,7 +5293,7 @@ if (keysym == XK_g && (event.xkey.state & ControlMask) != 0) XtUnmanageChild (dialog); } - + (void) x_dispatch_event (&event, FRAME_X_DISPLAY (f)); }
--- a/src/xmenu.c Fri Feb 04 14:06:45 2005 +0000 +++ b/src/xmenu.c Fri Feb 04 15:36:07 2005 +0000 @@ -1445,9 +1445,9 @@ /* Find the menu selection and store it in the keyboard buffer. F is the frame the menu is on. MENU_BAR_ITEMS_USED is the length of VECTOR. - VECTOR is an array of menu events for the whole menu. - */ -void + VECTOR is an array of menu events for the whole menu. */ + +static void find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data) FRAME_PTR f; int menu_bar_items_used; @@ -1554,6 +1554,17 @@ if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f) return; + /* When a menu is popped down, X generates a focus event (i.e. focus + goes back to the frame below the menu). Since GTK buffers events, + we force it out here before the menu selection event. Otherwise + sit-for will exit at once if the focus event follows the menu selection + event. */ + + BLOCK_INPUT; + while (gtk_events_pending ()) + gtk_main_iteration (); + UNBLOCK_INPUT; + find_and_call_menu_selection (cb_data->cl_data->f, cb_data->cl_data->menu_bar_items_used, cb_data->cl_data->menu_bar_vector,