changeset 80990:30ac55694a48

Merge from emacs--rel--22 Patches applied: * emacs--rel--22 (patch 20-21) - Update from CVS 2007-05-18 Richard Stallman <rms@gnu.org> * lisp/simple.el (push-mark): Doc fix. 2007-05-18 Rob Riepel <riepel@Stanford.EDU> * lisp/emulation/tpu-edt.el (CSI-map, SS3-map) Moved from global-map to tpu-global-map. (tpu-original-global-map) Variable deleted. (tpu-control-keys-map) New keymap variable. (tpu-set-control-keys) Use tpu-reset-control-keys rather than setting keymapping directly. (tpu-reset-control-keys) Use tpu-control-keys-map instead of tpu-global-map. (tpu-edt-on): Activate the tpu-global-map. (tpu-edt-off): Deactivate the tpu-global-map. 2007-05-18 Ryan Yeske <rcyeske@gmail.com> * lisp/textmodes/ispell.el (ispell-get-word): Return markers for start and end positions. (ispell-word): Assume END is a marker. 2007-05-19 Stefan Monnier <monnier@iro.umontreal.ca> * src/syntax.c (skip_chars): Update syntax-table only after we checked that the new location is valid. 2007-05-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * src/macterm.c (x_calc_absolute_position): Add BLOCK_INPUT around mac_get_window_bounds. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-759
author Miles Bader <miles@gnu.org>
date Sun, 20 May 2007 03:12:22 +0000
parents ce6c8b83a99a (current diff) 06e7a6c4759e (diff)
children dfd811e95adc
files admin/FOR-RELEASE configure lisp/ChangeLog lisp/t-mouse.el src/ChangeLog
diffstat 10 files changed, 107 insertions(+), 59 deletions(-) [+]
line wrap: on
line diff
--- a/admin/FOR-RELEASE	Sun May 20 02:52:46 2007 +0000
+++ b/admin/FOR-RELEASE	Sun May 20 03:12:22 2007 +0000
@@ -53,7 +53,7 @@
 ** michael.ewe@arcor.de, Apr 24: 22.0.98  not starting on Solaris 10/I386
 http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01113.html
 
-** cloos@jhcloos.com, May 11: A redisplay bug in 22.0.99
+** coldwell@redhat.com, May 18: 22.0.99 emacs dumper (?) problem
 
 * DOCUMENTATION
 
--- a/configure	Sun May 20 02:52:46 2007 +0000
+++ b/configure	Sun May 20 03:12:22 2007 +0000
@@ -412,10 +412,10 @@
 fi
 
 test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf@gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
+  echo Please tell bug-autoconf@gnu.org about your system,
+  echo including any error possibly output before this message.
+  echo This can help us improve future autoconf versions.
+  echo Configuration will now proceed without shell functions.
 }
 
 
--- a/lisp/ChangeLog	Sun May 20 02:52:46 2007 +0000
+++ b/lisp/ChangeLog	Sun May 20 03:12:22 2007 +0000
@@ -20,6 +20,29 @@
 
 	* textmodes/sgml-mode.el: Revert last change.
 
+2007-05-18  Richard Stallman  <rms@gnu.org>
+
+	* simple.el (push-mark): Doc fix.
+
+2007-05-18  Rob Riepel  <riepel@Stanford.EDU>
+
+	* emulation/tpu-edt.el (CSI-map, SS3-map) Moved from global-map to
+	tpu-global-map.
+	(tpu-original-global-map) Variable deleted.
+	(tpu-control-keys-map) New keymap variable.
+	(tpu-set-control-keys) Use tpu-reset-control-keys rather than
+	setting keymapping directly.
+	(tpu-reset-control-keys) Use tpu-control-keys-map instead of
+	tpu-global-map.
+	(tpu-edt-on): Activate the tpu-global-map.
+	(tpu-edt-off): Deactivate the tpu-global-map.
+	
+2007-05-18  Ryan Yeske  <rcyeske@gmail.com>
+
+	* textmodes/ispell.el (ispell-get-word): Return markers
+	for start and end positions.
+	(ispell-word): Assume END is a marker.
+
 2007-05-17  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
 	* printing.el: Group together all XEmacs/Emacs definitions.
--- a/lisp/emulation/tpu-edt.el	Sun May 20 02:52:46 2007 +0000
+++ b/lisp/emulation/tpu-edt.el	Sun May 20 03:12:22 2007 +0000
@@ -584,9 +584,12 @@
   "Maps the SS3 function keys on the VT100 keyboard.
 SS3 is DEC's name for the sequence <ESC>O.")
 
-(defvar tpu-global-map nil "TPU-edt global keymap.")
-(defvar tpu-original-global-map global-map
-  "Original non-TPU global keymap.")
+(defvar tpu-global-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\e[" CSI-map)
+    (define-key map "\eO" SS3-map)
+    map)
+  "TPU-edt global keymap.")
 
 (and (not (boundp 'minibuffer-local-ns-map))
      (defvar minibuffer-local-ns-map (make-sparse-keymap)
@@ -2267,46 +2270,43 @@
 ;;;
 ;;;  Functions to set, reset, and toggle the control key bindings
 ;;;
-(defun tpu-set-control-keys nil
+
+(defvar tpu-control-keys-map
+  (let ((map (make-sparse-keymap)))
+  (define-key map "\C-\\" 'quoted-insert)                ; ^\
+  (define-key map "\C-a" 'tpu-toggle-overwrite-mode)     ; ^A
+  (define-key map "\C-b" 'repeat-complex-command)        ; ^B
+  (define-key map "\C-e" 'tpu-current-end-of-line)       ; ^E
+  (define-key map "\C-h" 'tpu-next-beginning-of-line)    ; ^H (BS)
+  (define-key map "\C-j" 'tpu-delete-previous-word)      ; ^J (LF)
+  (define-key map "\C-k" 'tpu-define-macro-key)          ; ^K
+  (define-key map "\C-l" 'tpu-insert-formfeed)           ; ^L (FF)
+  (define-key map "\C-r" 'recenter)                      ; ^R
+  (define-key map "\C-u" 'tpu-delete-to-bol)             ; ^U
+  (define-key map "\C-v" 'tpu-quoted-insert)             ; ^V
+  (define-key map "\C-w" 'redraw-display)                ; ^W
+  (define-key map "\C-z" 'tpu-exit)                      ; ^Z
+  map))
+
+(defun tpu-set-control-keys ()
   "Set control keys to TPU style functions."
-  (define-key global-map "\C-\\" 'quoted-insert)                ; ^\
-  (define-key global-map "\C-a" 'tpu-toggle-overwrite-mode)     ; ^A
-  (define-key global-map "\C-b" 'repeat-complex-command)        ; ^B
-  (define-key global-map "\C-e" 'tpu-current-end-of-line)       ; ^E
-  (define-key global-map "\C-h" 'tpu-next-beginning-of-line)    ; ^H (BS)
-  (define-key global-map "\C-j" 'tpu-delete-previous-word)      ; ^J (LF)
-  (define-key global-map "\C-k" 'tpu-define-macro-key)          ; ^K
-  (define-key global-map "\C-l" 'tpu-insert-formfeed)           ; ^L (FF)
-  (define-key global-map "\C-r" 'recenter)                      ; ^R
-  (define-key global-map "\C-u" 'tpu-delete-to-bol)             ; ^U
-  (define-key global-map "\C-v" 'tpu-quoted-insert)             ; ^V
-  (define-key global-map "\C-w" 'redraw-display)                ; ^W
-  (define-key global-map "\C-z" 'tpu-exit)                      ; ^Z
-  (setq tpu-control-keys t))
+  (tpu-reset-control-keys 'tpu))
 
 (defun tpu-reset-control-keys (tpu-style)
   "Set control keys to TPU or Emacs style functions."
-  (let* ((tpu   (and tpu-style (not tpu-control-keys)))
-	 (emacs (and (not tpu-style) tpu-control-keys))
-	 (doit  (or tpu emacs)))
-    (cond (doit
-	   (if emacs (setq tpu-global-map (copy-keymap global-map)))
-	   (let ((map (if tpu tpu-global-map tpu-original-global-map)))
-
- 	     (define-key global-map "\C-\\" (lookup-key map "\C-\\"))   ; ^\
- 	     (define-key global-map "\C-a" (lookup-key map "\C-a"))     ; ^A
- 	     (define-key global-map "\C-b" (lookup-key map "\C-b"))     ; ^B
- 	     (define-key global-map "\C-e" (lookup-key map "\C-e"))     ; ^E
-	     (define-key global-map "\C-h" (lookup-key map "\C-h"))     ; ^H (BS)
-	     (define-key global-map "\C-j" (lookup-key map "\C-j"))     ; ^J (LF)
-	     (define-key global-map "\C-k" (lookup-key map "\C-k"))     ; ^K
-	     (define-key global-map "\C-l" (lookup-key map "\C-l"))     ; ^L (FF)
-	     (define-key global-map "\C-r" (lookup-key map "\C-r"))     ; ^R
-	     (define-key global-map "\C-u" (lookup-key map "\C-u"))     ; ^U
-	     (define-key global-map "\C-v" (lookup-key map "\C-v"))     ; ^V
-	     (define-key global-map "\C-w" (lookup-key map "\C-w"))     ; ^W
-	     (define-key global-map "\C-z" (lookup-key map "\C-z"))     ; ^Z
-	     (setq tpu-control-keys tpu-style))))))
+  (let ((parent (keymap-parent tpu-global-map)))
+    (if tpu-style
+        (if (eq parent tpu-control-keys-map)
+            nil                         ;All done already.
+          ;; Insert tpu-control-keys-map in the global map.
+          (set-keymap-parent tpu-control-keys-map parent)
+          (set-keymap-parent tpu-global-map tpu-control-keys-map))
+      (if (not (eq parent tpu-control-keys-map))
+          nil                         ;All done already.
+        ;; Remove tpu-control-keys-map from the global map.
+        (set-keymap-parent tpu-global-map (keymap-parent parent))
+        (set-keymap-parent tpu-control-keys-map nil)))
+    (setq tpu-control-keys tpu-style)))
 
 (defun tpu-toggle-control-keys nil
   "Toggles control key bindings between TPU-edt and Emacs."
@@ -2447,8 +2447,11 @@
 (defun tpu-edt-on ()
   "Turn on TPU/edt emulation."
   (interactive)
-  (and window-system (tpu-load-xkeys nil))
-  (tpu-arrow-history)
+  ;; First, activate tpu-global-map, while protecting the original keymap.
+  (set-keymap-parent tpu-global-map global-map)
+  (setq global-map tpu-global-map)
+  (use-global-map global-map)
+  ;; Then do the normal TPU setup.
   (transient-mark-mode t)
   (add-hook 'post-command-hook 'tpu-search-highlight)
   (tpu-set-mode-line t)
@@ -2457,10 +2460,14 @@
   (setq-default page-delimiter "\f")
   (setq-default truncate-lines t)
   (setq scroll-step 1)
-  (setq global-map (copy-keymap global-map))
   (tpu-set-control-keys)
-  (define-key global-map "\e[" CSI-map)
-  (define-key global-map "\eO" SS3-map)
+  (and window-system (tpu-load-xkeys nil))
+  (tpu-arrow-history)
+  ;; Then protect tpu-global-map from user modifications.
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map global-map)
+    (setq global-map map)
+    (use-global-map map))
   (setq tpu-edt-mode t))
 
 (defun tpu-edt-off ()
@@ -2472,8 +2479,13 @@
   (setq-default page-delimiter "^\f")
   (setq-default truncate-lines nil)
   (setq scroll-step 0)
-  (setq global-map tpu-original-global-map)
-  (use-global-map global-map)
+  ;; Remove tpu-global-map from the global map.
+  (let ((map global-map))
+    (while map
+      (let ((parent (keymap-parent map)))
+        (if (eq tpu-global-map parent)
+            (set-keymap-parent map (keymap-parent parent))
+          (setq map parent)))))
   (setq tpu-edt-mode nil))
 
 (provide 'tpu-edt)
--- a/lisp/simple.el	Sun May 20 02:52:46 2007 +0000
+++ b/lisp/simple.el	Sun May 20 03:12:22 2007 +0000
@@ -3271,12 +3271,11 @@
 If the last global mark pushed was not in the current buffer,
 also push LOCATION on the global mark ring.
 Display `Mark set' unless the optional second arg NOMSG is non-nil.
-In Transient Mark mode, activate mark if optional third arg ACTIVATE non-nil.
 
 Novice Emacs Lisp programmers often try to use the mark for the wrong
 purposes.  See the documentation of `set-mark' for more information.
 
-In Transient Mark mode, this does not activate the mark."
+In Transient Mark mode, activate mark if optional third arg ACTIVATE non-nil."
   (unless (null (mark t))
     (setq mark-ring (cons (copy-marker (mark-marker)) mark-ring))
     (when (> (length mark-ring) mark-ring-max)
--- a/lisp/t-mouse.el	Sun May 20 02:52:46 2007 +0000
+++ b/lisp/t-mouse.el	Sun May 20 03:12:22 2007 +0000
@@ -41,10 +41,12 @@
 
 ;;;###autoload
 (define-minor-mode t-mouse-mode
-  "Toggle t-mouse mode.
+  "Toggle t-mouse mode to use the mouse in Linux consoles.
 With prefix arg, turn t-mouse mode on iff arg is positive.
 
-Turn it on to use Emacs mouse commands, and off to use t-mouse commands."
+This allows the use of the mouse when operating on a Linux console, in the
+same way as you can use the mouse under X11.
+It requires the `mev' program, part of the `gpm' utilities."
   nil " Mouse" nil :global t
   (unless window-system
     (if t-mouse-mode
--- a/lisp/textmodes/ispell.el	Sun May 20 02:52:46 2007 +0000
+++ b/lisp/textmodes/ispell.el	Sun May 20 03:12:22 2007 +0000
@@ -1669,7 +1669,7 @@
 			  ;; to avoid collapsing markers before and after
 			  ;; into a single place.
 			  (ispell-insert-word new-word)
-			  (delete-region (point) (+ (point) (- end start)))
+			  (delete-region (point) end)
 			  ;; It is meaningless to preserve the cursor position
 			  ;; inside a word that has changed.
 			  (setq cursor-location (point))
@@ -1751,8 +1751,8 @@
 	    ;; return dummy word when just flagging misspellings
 	    (list "" (point) (point))
 	  (error "No word found to check!"))
-      (setq start (match-beginning 0)
-	    end (point)
+      (setq start (copy-marker (match-beginning 0))
+	    end (point-marker)
 	    word (buffer-substring-no-properties start end))
       (list word start end))))
 
--- a/src/ChangeLog	Sun May 20 02:52:46 2007 +0000
+++ b/src/ChangeLog	Sun May 20 03:12:22 2007 +0000
@@ -1,3 +1,13 @@
+2007-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* syntax.c (skip_chars): Update syntax-table only after we checked that
+	the new location is valid.
+
+2007-05-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* macterm.c (x_calc_absolute_position): Add BLOCK_INPUT around
+	mac_get_window_bounds.
+
 2007-05-20  Nick Roberts  <nickrob@snap.net.nz>
 
 	* Makefile.in (LIBGPM): Allow it to be set from configure.
--- a/src/macterm.c	Sun May 20 02:52:46 2007 +0000
+++ b/src/macterm.c	Sun May 20 03:12:22 2007 +0000
@@ -6084,7 +6084,9 @@
 
   /* Find the offsets of the outside upper-left corner of
      the inner window, with respect to the outer window.  */
+  BLOCK_INPUT;
   mac_get_window_bounds (f, &inner, &outer);
+  UNBLOCK_INPUT;
 
   width_diff = (outer.right - outer.left) - (inner.right - inner.left);
   height_diff = (outer.bottom - outer.top) - (inner.bottom - inner.top);
--- a/src/syntax.c	Sun May 20 02:52:46 2007 +0000
+++ b/src/syntax.c	Sun May 20 03:12:22 2007 +0000
@@ -1669,10 +1669,10 @@
 		      p = GPT_ADDR;
 		      stop = endp;
 		    }
+		  UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
 		  if (! fastmap[(int) SYNTAX (p[-1])])
 		    break;
 		  p--, pos--;
-		  UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
 		}
 	  }
       }