From 655441b28ae5dd95c4a889a92a9be0f9cab2cf0d Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 25 Oct 2010 13:46:21 +0200 Subject: [PATCH 01/11] * dbusbind.c (Fdbus_call_method_asynchronously) (Fdbus_register_signal, Fdbus_register_method): Check, whether `dbus-registered-objects-table' is initialized. Must not be synchronized with the trunk. --- src/ChangeLog | 6 ++++++ src/dbusbind.c | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 98d6e0b1ca1..cf2ae75fc83 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-10-25 Michael Albinus + + * dbusbind.c (Fdbus_call_method_asynchronously) + (Fdbus_register_signal, Fdbus_register_method): Check, whether + `dbus-registered-objects-table' is initialized. + 2010-10-24 Chong Yidong * xterm.c (x_connection_closed): Kill Emacs unconditionally. diff --git a/src/dbusbind.c b/src/dbusbind.c index 60697c8a4e9..37bfbf4badf 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1175,6 +1175,10 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE SDATA (interface), SDATA (method)); + /* Check dbus-registered-objects-table. */ + if (!HASH_TABLE_P (Vdbus_registered_objects_table)) + XD_SIGNAL1 (build_string ("dbus.el is not loaded")); + /* Open a connection to the bus. */ connection = xd_initialize (bus); @@ -1863,6 +1867,10 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG wrong_type_argument (intern ("functionp"), handler); GCPRO6 (bus, service, path, interface, signal, handler); + /* Check dbus-registered-objects-table. */ + if (!HASH_TABLE_P (Vdbus_registered_objects_table)) + XD_SIGNAL1 (build_string ("dbus.el is not loaded")); + /* Retrieve unique name of service. If service is a known name, we will register for the corresponding unique name, if any. Signals are sent always with the unique name as sender. Note: the unique @@ -1976,6 +1984,10 @@ used for composing the returning D-Bus message. */) /* TODO: We must check for a valid service name, otherwise there is a segmentation fault. */ + /* Check dbus-registered-objects-table. */ + if (!HASH_TABLE_P (Vdbus_registered_objects_table)) + XD_SIGNAL1 (build_string ("dbus.el is not loaded")); + /* Open a connection to the bus. */ connection = xd_initialize (bus); From 931c1dfaae8e1fc4c77e563912ee4fb5953ae844 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 25 Oct 2010 12:08:27 -0400 Subject: [PATCH 02/11] Document GTK Emacs kill on display close in PROBLEMS. * src/xterm.c (x_connection_closed): Expand comment. --- etc/PROBLEMS | 19 +++++++++---------- src/xterm.c | 8 +++++++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index fb1b2b38d56..6fd959b00b7 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -241,19 +241,18 @@ necessary but missing, please report it via M-x report-emacs-bug. On platforms such as Solaris, you can also work around this problem by configuring your compiler to use the native linker instead of GNU ld. -** Emacs compiled with Gtk+ crashes when closing a display (x-close-connection). +** When Emacs is compiled with Gtk+, closing a display kills Emacs. -This happens because of bugs in Gtk+. Gtk+ 2.10 seems to be OK. See bug -http://bugzilla.gnome.org/show_bug.cgi?id=85715. +There is a long-standing bug in GTK that prevents it from recovering +from disconnects: http://bugzilla.gnome.org/show_bug.cgi?id=85715. -** Emacs compiled with Gtk+ may loop forever if a display crashes. +Thus, for instance, when Emacs is run as a server on a text terminal, +and an X frame is created, and the X server for that frame crashes or +exits unexpectedly, Emacs must exit to prevent a GTK error that would +result in an endless loop. -This is related to the bug above. A scenario for this is when emacs is run -as a server, and an X frame is created. If the X server for the frame -crashes or exits unexpectedly and an attempt is made to create a new -frame on another X display, then a Gtk+ error happens in the emacs -server that results in an endless loop. This is not fixed in any known -Gtk+ version (2.14.4 being current). +If you need Emacs to be able to recover from closing displays, compile +it with the Lucid toolkit instead of GTK. * General runtime problems diff --git a/src/xterm.c b/src/xterm.c index 1de49e2fde1..143500256a1 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7911,7 +7911,13 @@ x_connection_closed (dpy, error_message) #endif #ifdef USE_GTK - /* Due to bugs in some Gtk+ versions, just exit here. */ + /* There is a long-standing bug in GTK that prevents the GTK + main loop from recovering gracefully from disconnects + (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Among + other problems, this gives rise to a stream of Glib error + messages that, in one incident, filled up a user's hard disk + (http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00927.html). + So, kill Emacs unconditionally if the display is closed. */ { fprintf (stderr, "%s\n", error_msg); Fkill_emacs (make_number (70)); From aab705a2a898cae643b328d745410d844cf08e6e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 26 Oct 2010 21:06:52 -0700 Subject: [PATCH 03/11] Fix treatment of menu-bar-files-menu. * lisp/menu-bar.el (menu-bar-files-menu): Make it into an actual alias, rather than just an unused variable that inherits from the real one. * doc/lispref/maps.texi (Standard Keymaps): Update File menu description. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/maps.texi | 12 +++++------- lisp/ChangeLog | 5 +++++ lisp/menu-bar.el | 5 ++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index ccbbe1b9c81..5974893288a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2010-10-27 Glenn Morris + + * maps.texi (Standard Keymaps): Update File menu description. + 2010-10-22 Eli Zaretskii * display.texi (Window Systems): Deprecate use of window-system as diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi index a5b126afcb2..4b416a82d64 100644 --- a/doc/lispref/maps.texi +++ b/doc/lispref/maps.texi @@ -1,7 +1,8 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990, 1991, 1992, 1993, 1999, 2001, 2002, 2003, 2004, -@c 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +@c 2005, 2006, 2007, 2008, 2009, 2010 +@c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/maps @node Standard Keymaps, Standard Hooks, Standard Buffer-Local Variables, Top @@ -183,9 +184,9 @@ A sparse keymap used by Lisp mode. @vindex menu-bar-edit-menu The keymap which displays the Edit menu in the menu bar. -@item menu-bar-files-menu -@vindex menu-bar-files-menu -The keymap which displays the Files menu in the menu bar. +@item menu-bar-file-menu +@vindex menu-bar-file-menu +The keymap which displays the File menu in the menu bar. @item menu-bar-help-menu @vindex menu-bar-help-menu @@ -239,6 +240,3 @@ The keymap defining the contents of the tool bar. A full keymap used by View mode. @end table -@ignore - arch-tag: b741253c-7e23-4a02-b3fa-cffd9e4d72b9 -@end ignore diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fe7fc852218..1522e864a54 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-27 Glenn Morris + + * menu-bar.el (menu-bar-files-menu): Make it into an actual alias, + rather than just an unused variable that inherits from the real one. + 2010-10-23 Michael McNamara * verilog-mode.el (verilog-directive-re): Make this variable diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 941ede03996..d25de5b385c 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -55,8 +55,8 @@ (defvar menu-bar-file-menu (make-sparse-keymap "File")) (define-key global-map [menu-bar file] (cons (purecopy "File") menu-bar-file-menu)) -;; This alias is for compatibility with 19.28 and before. -(defvar menu-bar-files-menu menu-bar-file-menu) +;; Only declared obsolete (and only made a proper alias) in 23.3. +(define-obsolete-variable-alias 'menu-bar-files-menu 'menu-bar-file-menu "22.1") ;; This is referenced by some code below; it is defined in uniquify.el (defvar uniquify-buffer-name-style) @@ -1997,5 +1997,4 @@ If FRAME is nil or not given, use the selected frame." (provide 'menu-bar) -;; arch-tag: 6e6a3c22-4ec4-4d3d-8190-583f8ef94ced ;;; menu-bar.el ends here From ca39416c788ea47781f3ebb564d52df6fbf3af95 Mon Sep 17 00:00:00 2001 From: "Aaron S. Hawley" Date: Wed, 27 Oct 2010 17:37:15 -0400 Subject: [PATCH 04/11] * add-log.el (find-change-log): Use derived-mode-p rather than major-mode. Fixes: debbugs:7284 --- lisp/ChangeLog | 42 +++++++++++++++++++++++------------------- lisp/add-log.el | 4 ++-- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1522e864a54..f41bd45cfd4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-27 Aaron S. Hawley + + * add-log.el (find-change-log): Use derived-mode-p rather than + major-mode (bug#7284). + 2010-10-27 Glenn Morris * menu-bar.el (menu-bar-files-menu): Make it into an actual alias, @@ -9,13 +14,13 @@ auto-built for efficiency of execution and updating. (verilog-extended-complete-re): Support 'pure' fucntion & task declarations (these have no bodies). - (verilog-beg-of-statement): general cleanup to enable support of - 'pure' fucntion & task declarations (these have no bodies). These - efforts together fix Verilog bug210 from veripool; which was also + (verilog-beg-of-statement): General cleanup to enable support of + 'pure' fucntion & task declarations (these have no bodies). + These efforts together fix Verilog bug210 from veripool; which was also noticed by Steve Pearlmutter. (verilog-directive-re, verilog-directive-begin, verilog-indent-re) - (verilog-directive-nest-re, verilog-set-auto-endcomments): Support - `elsif. Reported by Shankar Giri. + (verilog-directive-nest-re, verilog-set-auto-endcomments): + Support `elsif. Reported by Shankar Giri. (verilog-forward-ws&directives, verilog-in-attribute-p): Fixes for attribute handling for lining up declarations and assignments. (verilog-beg-of-statement-1): Fix issue where continued declaration @@ -23,8 +28,7 @@ (verilog-in-attribute-p, verilog-skip-backward-comments) (verilog-skip-forward-comment-p): Support proper treatment of attributes by indent code. Reported by Jeff Steele. - (verilog-in-directive-p): Fix comment to correctly describe - function. + (verilog-in-directive-p): Fix comment to correctly describe function. (verilog-backward-up-list, verilog-in-struct-region-p) (verilog-backward-token, verilog-in-struct-p) (verilog-in-coverage-p, verilog-do-indent) @@ -51,7 +55,7 @@ parameter in AUTOINSTPARAM. (verilog-read-always-signals-recurse, verilog-read-decls): Fix not treating `elsif similar to `endif inside AUTOSENSE. - (verilog-do-indent): Implement correct automatic or static task or + (verilog-do-indent): Implement correct automatic or static task or function end comment highlight. Reported by Steve Pearlmutter. (verilog-font-lock-keywords-2): Fix highlighting of single character pins, bug264. Reported by Michael Laajanen. @@ -59,15 +63,15 @@ (verilog-read-sub-decls-in-interfaced, verilog-read-sub-decls-sig) (verilog-subdecls-get-interfaced, verilog-subdecls-new): Support interfaces with AUTOINST, bug270. Reported by Luis Gutierrez. - (verilog-pretty-expr): Fix interactive arguments, bug272. Reported - by Mark Johnson. - (verilog-auto-tieoff, verilog-auto-tieoff-ignore-regexp): Add - 'verilog-auto-tieoff-ignore-regexp' for AUTOTIEOFF, + (verilog-pretty-expr): Fix interactive arguments, bug272. + Reported by Mark Johnson. + (verilog-auto-tieoff, verilog-auto-tieoff-ignore-regexp): + Add 'verilog-auto-tieoff-ignore-regexp' for AUTOTIEOFF, bug269. Suggested by Gary Delp. (verilog-mode-map, verilog-preprocess, verilog-preprocess-history) - (verilog-preprocessor, verilog-set-compile-command): Create - verilog-preprocess and verilog-preprocessor to show preprocessed - output. + (verilog-preprocessor, verilog-set-compile-command): + Create verilog-preprocess and verilog-preprocessor to show + preprocessed output. (verilog-get-beg-of-line, verilog-get-end-of-line) (verilog-modi-file-or-buffer, verilog-modi-name) (verilog-modi-point, verilog-within-string): Move defmacro's @@ -115,16 +119,16 @@ (verilog-modi-lookup-last-current, verilog-modi-lookup-last-mod) (verilog-modi-lookup-last-modi, verilog-modi-lookup-last-tick): Fix slow verilog-auto expansion on very large files. - (verilog-read-sub-decls-expr, verilog-read-sub-decls-line): Fix - AUTOOUTPUT treating "1*2" as a signal name in submodule connection + (verilog-read-sub-decls-expr, verilog-read-sub-decls-line): + Fix AUTOOUTPUT treating "1*2" as a signal name in submodule connection "{1*2{...". Broke in last revision. (verilog-read-sub-decls-expr): Fix AUTOOUTPUT not detecting submodule connections with replications "{#{a},#{b}}". 2010-10-23 Glenn Morris - * comint.el (comint-password-prompt-regexp): Match - "enter the password". (Bug#7224) + * comint.el (comint-password-prompt-regexp): + Match "enter the password". (Bug#7224) 2010-10-22 Juanma Barranquero diff --git a/lisp/add-log.el b/lisp/add-log.el index ab99f6787c8..4fec68f4c02 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -701,7 +701,7 @@ current buffer to the complete file name. Optional arg BUFFER-FILE overrides `buffer-file-name'." ;; If we are called from a diff, first switch to the source buffer; ;; in order to respect buffer-local settings of change-log-default-name, etc. - (with-current-buffer (let ((buff (if (eq major-mode 'diff-mode) + (with-current-buffer (let ((buff (if (derived-mode-p 'diff-mode) (car (ignore-errors (diff-find-source-location)))))) (if (buffer-live-p buff) buff @@ -1173,7 +1173,7 @@ Has a preference of looking backwards." ((apply 'derived-mode-p add-log-c-like-modes) (or (c-cpp-define-name) (c-defun-name))) - ((memq major-mode add-log-tex-like-modes) + ((apply #'derived-mode-p add-log-tex-like-modes) (if (re-search-backward "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" nil t) From 82f7efc32013723c80f6c4159427aa21575697cc Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 27 Oct 2010 20:52:14 -0700 Subject: [PATCH 05/11] * lisp/select.el (x-selection): Mark it as an obsolete alias. --- lisp/ChangeLog | 4 ++++ lisp/select.el | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f41bd45cfd4..bb530c0192a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-10-28 Glenn Morris + + * select.el (x-selection): Mark it as an obsolete alias. + 2010-10-27 Aaron S. Hawley * add-log.el (find-change-log): Use derived-mode-p rather than diff --git a/lisp/select.el b/lisp/select.el index 842c250df60..bada2e70e75 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -67,8 +67,9 @@ variable is set to nil.") (declare-function x-get-selection-internal "xselect.c" (selection-symbol target-type &optional time-stamp)) -;; This is for temporary compatibility with pre-release Emacs 19. -(defalias 'x-selection 'x-get-selection) +;; Only declared obsolete in 23.3. +(define-obsolete-function-alias 'x-selection 'x-get-selection "at least 19.34") + (defun x-get-selection (&optional type data-type) "Return the value of an X Windows selection. The argument TYPE (default `PRIMARY') says which selection, @@ -410,5 +411,4 @@ This function returns the string \"emacs\"." (provide 'select) -;; arch-tag: bb634f97-8a3b-4b0a-b940-f6e09982328c ;;; select.el ends here From 97af9a72d0935af2907d83ba330c1040f4df98cf Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 28 Oct 2010 20:19:33 -0700 Subject: [PATCH 06/11] Correct some viewcvs links in docs and comments. * doc/misc/cc-mode.texi: Remove reference to defunct viewcvs URL. Instead, refer to the generic Savannah page, since it seems likely that Savannah will never provide the equivalent service for GNU bazaar. The other option would be to use the Git mirror URL, since it seems to be being updated now, and of course browsing Git repos works just fine. That would be a pretty poor advert for the GNU system though. * etc/MH-E-NEWS: Update URL (viewcvs -> viewvc). * lisp/net/tramp-fish.el: Update URL in comment (viewcvs -> viewvc). --- doc/misc/ChangeLog | 4 ++++ doc/misc/cc-mode.texi | 11 ++++------- etc/MH-E-NEWS | 2 +- lisp/net/tramp-fish.el | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index c3930486007..b690fb17dbb 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2010-10-29 Glenn Morris + + * cc-mode.texi: Remove reference to defunct viewcvs URL. + 2010-10-22 Juanma Barranquero * gnus.texi (Group Parameters, Buttons): Fix typos. diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index c1d8db80dae..0c42e0145a8 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -160,7 +160,8 @@ CC Mode This manual is for CC Mode in Emacs. Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -201,9 +202,8 @@ developing GNU and promoting software freedom.'' @vskip 0pt plus 1filll @insertcopying -This manual was generated from cc-mode.texi, which can be downloaded -from -@url{http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/doc/misc/cc-mode.texi}. +This manual was generated from cc-mode.texi, which is distributed with Emacs, +or can be downloaded from @url{http://savannah.gnu.org/projects/emacs/}. @end titlepage @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -6998,6 +6998,3 @@ Since most @ccmode{} variables are prepended with the string @bye -@ignore - arch-tag: c4cab162-5e57-4366-bdce-4a9db2fc97f0 -@end ignore diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index 1141b9dd3fa..14f182a6212 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -231,7 +231,7 @@ gatewayed at gmane.org (closes SF #979308). If you want to see the release notes for the alpha and beta releases leading up this release, please see: - http://cvs.savannah.gnu.org/viewcvs/emacs/etc/MH-E-NEWS?rev=1.25&root=emacs&view=markup + http://cvs.savannah.gnu.org/viewvc/emacs/emacs/etc/MH-E-NEWS?revision=1.25&view=markup diff --git a/lisp/net/tramp-fish.el b/lisp/net/tramp-fish.el index 632b400e2b3..44e2ab8b392 100644 --- a/lisp/net/tramp-fish.el +++ b/lisp/net/tramp-fish.el @@ -37,7 +37,7 @@ ;; "xxx" stands for 3 digits, representing a return code. Return ;; codes "# 000" and "# 001" are reserved for fallback implementation ;; with native shell commands; they are not used inside the server. See -;; +;; ;; for details of original specification. ;; The GNU Midnight Commander implements the original fish protocol From d2ce10d221f16a8e03a7c4363d9ad61984087ff0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 29 Oct 2010 00:48:10 -0700 Subject: [PATCH 07/11] Replace some inappropriate uses of toggle-read-only. (Bug#7292) * lisp/speedbar.el (speedbar-mode): * lisp/play/fortune.el (fortune-in-buffer, fortune): * lisp/play/gomoku.el (gomoku-mode): * lisp/play/landmark.el (lm-mode): * lisp/textmodes/bibtex.el (bibtex-validate, bibtex-validate-globally): * lisp/cedet/mode-local.el (mode-local-augment-function-help): * lisp/semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons): * lisp/semantic/symref/list.el (semantic-symref-results-dump) (semantic-symref-rb-toggle-expand-tag): Replace inappropriate uses of toggle-read-only. --- lisp/ChangeLog | 9 ++ lisp/cedet/ChangeLog | 8 ++ lisp/cedet/mode-local.el | 27 +++-- lisp/cedet/semantic/analyze/debug.el | 44 ++++---- lisp/cedet/semantic/symref/list.el | 148 ++++++++++++--------------- lisp/play/fortune.el | 43 ++++---- lisp/play/gomoku.el | 9 +- lisp/play/landmark.el | 5 +- lisp/speedbar.el | 10 +- lisp/textmodes/bibtex.el | 35 +++---- 10 files changed, 158 insertions(+), 180 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bb530c0192a..0a6999a81c1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2010-10-29 Glenn Morris + + * speedbar.el (speedbar-mode): + * play/fortune.el (fortune-in-buffer, fortune): + * play/gomoku.el (gomoku-mode): + * play/landmark.el (lm-mode): + * textmodes/bibtex.el (bibtex-validate, bibtex-validate-globally): + Replace inappropriate uses of toggle-read-only. (Bug#7292) + 2010-10-28 Glenn Morris * select.el (x-selection): Mark it as an obsolete alias. diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index a9eaf9ded1e..a483d3b70c8 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,11 @@ +2010-10-29 Glenn Morris + + * mode-local.el (mode-local-augment-function-help): + * semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons): + * semantic/symref/list.el (semantic-symref-results-dump) + (semantic-symref-rb-toggle-expand-tag): Replace inappropriate uses + of toggle-read-only. + 2010-10-12 Juanma Barranquero * semantic/symref/list.el (semantic-symref-list-rename-open-hits): diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index 8d5772f0840..7943f61fee3 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -1,6 +1,7 @@ ;;; mode-local.el --- Support for mode local facilities ;; -;; Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; ;; Author: David Ponce ;; Maintainer: David Ponce @@ -610,19 +611,16 @@ PROMPT, INITIAL, HIST, and DEFAULT are the same as for `completing-read'." SYMBOL is a function that can be overridden." (with-current-buffer "*Help*" (pop-to-buffer (current-buffer)) - (unwind-protect - (progn - (toggle-read-only -1) - (goto-char (point-min)) - (unless (re-search-forward "^$" nil t) - (goto-char (point-max)) - (beginning-of-line) - (forward-line -1)) - (insert (overload-docstring-extension symbol) "\n") - ;; NOTE TO SELF: - ;; LIST ALL LOADED OVERRIDES FOR SYMBOL HERE - ) - (toggle-read-only 1)))) + (goto-char (point-min)) + (unless (re-search-forward "^$" nil t) + (goto-char (point-max)) + (beginning-of-line) + (forward-line -1)) + (let ((inhibit-read-only t)) + (insert (overload-docstring-extension symbol) "\n") + ;; NOTE TO SELF: + ;; LIST ALL LOADED OVERRIDES FOR SYMBOL HERE + ))) ;; Help for mode-local bindings. (defun mode-local-print-binding (symbol) @@ -782,5 +780,4 @@ invoked interactively." (provide 'mode-local) -;; arch-tag: 14b77823-f93c-4b3d-9116-495f69a6ec07 ;;; mode-local.el ends here diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el index 490b57bf83a..cfc41e6faf1 100644 --- a/lisp/cedet/semantic/analyze/debug.el +++ b/lisp/cedet/semantic/analyze/debug.el @@ -586,34 +586,28 @@ Look for key expressions, and add push-buttons near them." (set-marker orig-buffer (point) (current-buffer)) ;; Get a buffer ready. (with-current-buffer "*Help*" - (toggle-read-only -1) - (goto-char (point-min)) - (set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer) - ;; First, add do-in buttons to recommendations. - (while (re-search-forward "^\\s-*M-x \\(\\(\\w\\|\\s_\\)+\\) " nil t) - (let ((fcn (match-string 1))) - (when (not (fboundp (intern-soft fcn))) - (error "Help Err: Can't find %s" fcn)) - (end-of-line) - (insert " ") - (insert-button "[ Do It ]" - 'mouse-face 'custom-button-pressed-face - 'do-fcn fcn - 'action `(lambda (arg) - (let ((M semantic-analyzer-debug-orig)) - (set-buffer (marker-buffer M)) - (goto-char M)) - (call-interactively (quote ,(intern-soft fcn)))) - ) - )) + (let ((inhibit-read-only t)) + (goto-char (point-min)) + (set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer) + ;; First, add do-in buttons to recommendations. + (while (re-search-forward "^\\s-*M-x \\(\\(\\w\\|\\s_\\)+\\) " nil t) + (let ((fcn (match-string 1))) + (when (not (fboundp (intern-soft fcn))) + (error "Help Err: Can't find %s" fcn)) + (end-of-line) + (insert " ") + (insert-button "[ Do It ]" + 'mouse-face 'custom-button-pressed-face + 'do-fcn fcn + 'action `(lambda (arg) + (let ((M semantic-analyzer-debug-orig)) + (set-buffer (marker-buffer M)) + (goto-char M)) + (call-interactively (quote ,(intern-soft fcn)))))))) ;; Do something else? - ;; Clean up the mess - (toggle-read-only 1) - (set-buffer-modified-p nil) - ))) + (set-buffer-modified-p nil)))) (provide 'semantic/analyze/debug) -;; arch-tag: 943db1e5-47e6-4bec-9989-78ebfadf0358 ;;; semantic/analyze/debug.el ends here diff --git a/lisp/cedet/semantic/symref/list.el b/lisp/cedet/semantic/symref/list.el index 53044e278ac..9be53d90b08 100644 --- a/lisp/cedet/semantic/symref/list.el +++ b/lisp/cedet/semantic/symref/list.el @@ -221,49 +221,38 @@ Some useful functions are found in `semantic-format-tag-functions'." (defun semantic-symref-results-dump (results) "Dump the RESULTS into the current buffer." ;; Get ready for the insert. - (toggle-read-only -1) - (erase-buffer) - - ;; Insert the contents. - (let ((lastfile nil) - ) - (dolist (T (oref results :hit-tags)) - - (when (not (equal lastfile (semantic-tag-file-name T))) - (setq lastfile (semantic-tag-file-name T)) - (insert-button lastfile - 'mouse-face 'custom-button-pressed-face - 'action 'semantic-symref-rb-goto-file + (let ((inhibit-read-only t)) + (erase-buffer) + ;; Insert the contents. + (let ((lastfile nil)) + (dolist (T (oref results :hit-tags)) + (unless (equal lastfile (semantic-tag-file-name T)) + (setq lastfile (semantic-tag-file-name T)) + (insert-button lastfile + 'mouse-face 'custom-button-pressed-face + 'action 'semantic-symref-rb-goto-file + 'tag T) + (insert "\n")) + (insert " ") + (insert-button "[+]" + 'mouse-face 'highlight + 'face nil + 'action 'semantic-symref-rb-toggle-expand-tag 'tag T - ) - (insert "\n")) - - (insert " ") - (insert-button "[+]" - 'mouse-face 'highlight - 'face nil - 'action 'semantic-symref-rb-toggle-expand-tag - 'tag T - 'state 'closed) - (insert " ") - (insert-button (funcall semantic-symref-results-summary-function - T nil t) - 'mouse-face 'custom-button-pressed-face - 'face nil - 'action 'semantic-symref-rb-goto-tag - 'tag T) - (insert "\n") - - )) - - ;; Auto expand - (when semantic-symref-auto-expand-results - (semantic-symref-list-expand-all)) - - ;; Clean up the mess - (toggle-read-only 1) - (set-buffer-modified-p nil) - ) + 'state 'closed) + (insert " ") + (insert-button (funcall semantic-symref-results-summary-function + T nil t) + 'mouse-face 'custom-button-pressed-face + 'face nil + 'action 'semantic-symref-rb-goto-tag + 'tag T) + (insert "\n"))) + ;; Auto expand + (when semantic-symref-auto-expand-results + (semantic-symref-list-expand-all))) + ;; Clean up the mess + (set-buffer-modified-p nil)) ;;; Commands for semantic-symref-results ;; @@ -283,11 +272,9 @@ BUTTON is the button that was clicked." (buff (semantic-tag-buffer tag)) (hits (semantic--tag-get-property tag :hit)) (state (button-get button 'state)) - (text nil) - ) + (text nil)) (cond ((eq state 'closed) - (toggle-read-only -1) (with-current-buffer buff (dolist (H hits) (goto-char (point-min)) @@ -295,48 +282,42 @@ BUTTON is the button that was clicked." (beginning-of-line) (back-to-indentation) (setq text (cons (buffer-substring (point) (point-at-eol)) text))) - (setq text (nreverse text)) - ) + (setq text (nreverse text))) (goto-char (button-start button)) (forward-char 1) - (delete-char 1) - (insert "-") - (button-put button 'state 'open) - (save-excursion - (end-of-line) - (while text - (insert "\n") - (insert " ") - (insert-button (car text) - 'mouse-face 'highlight - 'face nil - 'action 'semantic-symref-rb-goto-match - 'tag tag - 'line (car hits)) - (setq text (cdr text) - hits (cdr hits)))) - (toggle-read-only 1) - ) + (let ((inhibit-read-only t)) + (delete-char 1) + (insert "-") + (button-put button 'state 'open) + (save-excursion + (end-of-line) + (while text + (insert "\n") + (insert " ") + (insert-button (car text) + 'mouse-face 'highlight + 'face nil + 'action 'semantic-symref-rb-goto-match + 'tag tag + 'line (car hits)) + (setq text (cdr text) + hits (cdr hits)))))) ((eq state 'open) - (toggle-read-only -1) - (button-put button 'state 'closed) - ;; Delete the various bits. - (goto-char (button-start button)) - (forward-char 1) - (delete-char 1) - (insert "+") - (save-excursion - (end-of-line) + (let ((inhibit-read-only t)) + (button-put button 'state 'closed) + ;; Delete the various bits. + (goto-char (button-start button)) (forward-char 1) - (delete-region (point) - (save-excursion - (forward-char 1) - (forward-line (length hits)) - (point)))) - (toggle-read-only 1) - ) - )) - ) + (delete-char 1) + (insert "+") + (save-excursion + (end-of-line) + (forward-char 1) + (delete-region (point) + (save-excursion + (forward-char 1) + (forward-line (length hits)) + (point))))))))) (defun semantic-symref-rb-goto-file (&optional button) "Go to the file specified in the symref results buffer. @@ -554,5 +535,4 @@ Return the number of occurrences FUNCTION was operated upon." ;; generated-autoload-load-name: "semantic/symref/list" ;; End: -;; arch-tag: e355d9c6-26e0-42d1-9bf1-f4801a54fffa ;;; semantic/symref/list.el ends here diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index 10bf05b2201..e7bd013b2ab 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -1,7 +1,7 @@ ;;; fortune.el --- use fortune to create signatures -;; Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 Free Software Foundation, Inc. ;; Author: Holger Schauer ;; Keywords: games utils mail @@ -285,48 +285,41 @@ and choose the directory as the fortune-file." ;;; Display fortune (defun fortune-in-buffer (interactive &optional file) "Put a fortune cookie in the *fortune* buffer. - -INTERACTIVE is ignored. Optional argument FILE, -when supplied, specifies the file to choose the fortune from." +INTERACTIVE is ignored. Optional argument FILE, when supplied, +specifies the file to choose the fortune from." (let ((fortune-buffer (or (get-buffer fortune-buffer-name) (generate-new-buffer fortune-buffer-name))) (fort-file (expand-file-name (substitute-in-file-name (or file fortune-file))))) (with-current-buffer fortune-buffer - (toggle-read-only 0) - (erase-buffer) - - (if fortune-always-compile - (fortune-compile fort-file)) - - (apply 'call-process - fortune-program ; program to call - nil fortune-buffer nil ; INFILE BUFFER DISPLAY - (append (if (stringp fortune-program-options) - (split-string fortune-program-options) - fortune-program-options) (list fort-file)))))) + (let ((inhibit-read-only t)) + (erase-buffer) + (if fortune-always-compile + (fortune-compile fort-file)) + (apply 'call-process + fortune-program ; program to call + nil fortune-buffer nil ; INFILE BUFFER DISPLAY + (append (if (stringp fortune-program-options) + (split-string fortune-program-options) + fortune-program-options) (list fort-file))))))) ;;;###autoload (defun fortune (&optional file) "Display a fortune cookie. - If called with a prefix asks for the FILE to choose the fortune from, otherwise uses the value of `fortune-file'. If you want to have fortune choose from a set of files in a directory, call interactively with prefix and choose the directory as the fortune-file." - (interactive - (list - (if current-prefix-arg - (fortune-ask-file) - fortune-file))) + (interactive (list (if current-prefix-arg + (fortune-ask-file) + fortune-file))) (fortune-in-buffer t file) (switch-to-buffer (get-buffer fortune-buffer-name)) - (toggle-read-only 1)) + (setq buffer-read-only t)) ;;; Provide ourselves. (provide 'fortune) -;; arch-tag: a1e4cb8a-3792-40e7-86a7-fc75ce094bcc ;;; fortune.el ends here diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index e18d4bdc292..1b11388a0d7 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el @@ -1,7 +1,7 @@ ;;; gomoku.el --- Gomoku game between you and Emacs -;; Copyright (C) 1988, 1994, 1996, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 1996, 2001, 2002, 2003, 2004, 2005, 2006, +;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Philippe Schnoebelen ;; Maintainer: FSF @@ -201,8 +201,8 @@ is non-nil." (gomoku-display-statistics) (use-local-map gomoku-mode-map) (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(gomoku-font-lock-keywords t)) - (toggle-read-only t) + (setq font-lock-defaults '(gomoku-font-lock-keywords t) + buffer-read-only t) (run-mode-hooks 'gomoku-mode-hook)) ;;; @@ -1213,5 +1213,4 @@ If the game is finished, this command requests for another game." (provide 'gomoku) -;; arch-tag: b1b8205e-77fc-4597-b373-3ea2c04311eb ;;; gomoku.el ends here diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index 2c82e8cd420..0c8fa7c261e 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el @@ -255,8 +255,8 @@ is non-nil. One interesting value is `turn-on-font-lock'." (lm-display-statistics) (use-local-map lm-mode-map) (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(lm-font-lock-keywords t)) - (toggle-read-only t) + (setq font-lock-defaults '(lm-font-lock-keywords t) + buffer-read-only t) (run-mode-hooks 'lm-mode-hook)) @@ -1700,5 +1700,4 @@ Use \\[describe-mode] for more info." (provide 'landmark) -;; arch-tag: ae5031be-96e6-459e-a3df-1df53117d3f2 ;;; landmark.el ends here diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 60c1ff6b170..d0b417045b4 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1,7 +1,8 @@ ;;; speedbar --- quick access to files and tags in a frame ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam ;; Keywords: file, tags, tools @@ -1128,9 +1129,9 @@ in the selected file. (setq font-lock-keywords nil) ;; no font-locking please (setq truncate-lines t) (make-local-variable 'frame-title-format) - (setq frame-title-format (concat "Speedbar " speedbar-version)) - (setq case-fold-search nil) - (toggle-read-only 1) + (setq frame-title-format (concat "Speedbar " speedbar-version) + case-fold-search nil + buffer-read-only t) (speedbar-set-mode-line-format) ;; Add in our dframe hooks. (if speedbar-track-mouse-flag @@ -4142,5 +4143,4 @@ TEXT is the buffer's name, TOKEN and INDENT are unused." ;; run load-time hooks (run-hooks 'speedbar-load-hook) -;; arch-tag: 4477e6d1-f78c-48b9-a503-387d3c9767d5 ;;; speedbar ends here diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index c002426daca..682adbb5a25 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1,7 +1,8 @@ ;;; bibtex.el --- BibTeX mode for GNU Emacs ;; Copyright (C) 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Author: Stefan Schoef ;; Bengt Martensson @@ -3833,16 +3834,16 @@ Return t if test was successful, nil otherwise." (with-current-buffer (get-buffer-create err-buf) (setq default-directory dir) (unless (eq major-mode 'compilation-mode) (compilation-mode)) - (toggle-read-only -1) - (delete-region (point-min) (point-max)) - (insert "BibTeX mode command `bibtex-validate'\n" - (if syntax-error - "Maybe undetected errors due to syntax errors. Correct and validate again.\n" - "\n")) - (dolist (err error-list) - (insert (format "%s:%d: %s\n" file (car err) (cdr err)))) - (set-buffer-modified-p nil) - (toggle-read-only 1) + (let ((inhibit-read-only t)) + (delete-region (point-min) (point-max)) + (insert "BibTeX mode command `bibtex-validate'\n" + (if syntax-error + "Maybe undetected errors due to syntax errors. \ +Correct and validate again.\n" + "\n")) + (dolist (err error-list) + (insert (format "%s:%d: %s\n" file (car err) (cdr err)))) + (set-buffer-modified-p nil)) (goto-char (point-min)) (forward-line 2)) ; first error message (display-buffer err-buf) @@ -3894,12 +3895,11 @@ Return t if test was successful, nil otherwise." (let ((err-buf "*BibTeX validation errors*")) (with-current-buffer (get-buffer-create err-buf) (unless (eq major-mode 'compilation-mode) (compilation-mode)) - (toggle-read-only -1) - (delete-region (point-min) (point-max)) - (insert "BibTeX mode command `bibtex-validate-globally'\n\n") - (dolist (err (sort error-list 'string-lessp)) (insert err)) - (set-buffer-modified-p nil) - (toggle-read-only 1) + (let ((inhibit-read-only t)) + (delete-region (point-min) (point-max)) + (insert "BibTeX mode command `bibtex-validate-globally'\n\n") + (dolist (err (sort error-list 'string-lessp)) (insert err)) + (set-buffer-modified-p nil)) (goto-char (point-min)) (forward-line 2)) ; first error message (display-buffer err-buf) @@ -4776,5 +4776,4 @@ Return the URL or nil if none can be generated." (provide 'bibtex) -;; arch-tag: ee2be3af-caad-427f-b42a-d20fad630d04 ;;; bibtex.el ends here From a057950d77bbd03434f6a286c81a259824d7b7ad Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 30 Oct 2010 18:28:17 +0200 Subject: [PATCH 08/11] * net/tramp.el (tramp-handle-insert-file-contents): For root, preserve owner and group when editing files. (Bug#7289) Please contact me, if you have problems syncing with the trunk. --- lisp/ChangeLog | 5 +++++ lisp/net/tramp.el | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a6999a81c1..3944fdebc69 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-30 Michael Albinus + + * net/tramp.el (tramp-handle-insert-file-contents): For root, + preserve owner and group when editing files. (Bug#7289) + 2010-10-29 Glenn Morris * speedbar.el (speedbar-mode): diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 426785dd9a4..50fbaed01e0 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5008,7 +5008,11 @@ coding system might not be determined. This function repairs it." (setq buffer-file-name filename) (setq buffer-read-only (not (file-writable-p filename))) (set-visited-file-modtime) - (set-buffer-modified-p nil)) + (set-buffer-modified-p nil) + ;; For root, preserve owner and group when editing files. + (when (string-equal (file-remote-p filename 'user) "root") + (set (make-local-variable 'backup-by-copying-when-mismatch) t) + (put 'backup-by-copying-when-mismatch 'permanent-local t))) (when (and (stringp local-copy) (or remote-copy (null tramp-temp-buffer-file-name))) (delete-file local-copy)) From bbe1ba5eec81f56b9a2155a0abdabe6c7c81e3be Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 30 Oct 2010 14:17:59 -0700 Subject: [PATCH 09/11] Tiny MH-E doc fixes. * doc/misc/mh-e.texi (Preface, From Bill Wohler): Change 23 to past tense. * etc/MH-E-NEWS: Change 23 to past tense. --- doc/misc/ChangeLog | 4 ++++ doc/misc/mh-e.texi | 10 ++++------ etc/MH-E-NEWS | 6 +++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index b690fb17dbb..a37b8db475f 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2010-10-30 Glenn Morris + + * mh-e.texi (Preface, From Bill Wohler): Change 23 to past tense. + 2010-10-29 Glenn Morris * cc-mode.texi: Remove reference to defunct viewcvs URL. diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index ed64f91ac39..a06a7231112 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -213,7 +213,7 @@ more niceties about GNU Emacs and MH@. Now I'm fully hooked on both of them. The MH-E package is distributed with GNU Emacs@footnote{Version -@value{VERSION} of MH-E will appear in GNU Emacs 23.1. It is supported +@value{VERSION} of MH-E appeared in GNU Emacs 23.1. It is supported in GNU Emacs 21 and 22, as well as XEmacs 21 (except for versions 21.5.9-21.5.16). It is compatible with MH versions 6.8.4 and higher, all versions of nmh, and GNU mailutils 1.0 and higher.}, so you @@ -8951,8 +8951,8 @@ files that were already part of Emacs) and the software was completely reorganized to push back two decades of entropy. Version 8 appeared in Emacs 22.1 in 2006. -Development was then quiet for a couple of years. Emacs 23.1, which is -due out in 2009, will contain version 8.1. This version includes a few +Development was then quiet for a couple of years. Emacs 23.1, released +in June 2009, contains version 8.2. This version includes a few new features and several bug fixes. Bill Wohler, August 2008 @@ -9061,6 +9061,4 @@ Bill Wohler, August 2008 @c sentence-end-double-space: nil @c End: -@ignore - arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef -@end ignore + diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index 14f182a6212..f4bf030eb32 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -1,13 +1,13 @@ * COPYRIGHT -Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010 Free Software Foundation, Inc. See the end of the file for license conditions. * Changes in MH-E 8.2 -Version 8.2 of MH-E will appear in GNU Emacs 23.1. This is a small +Version 8.2 of MH-E appeared in GNU Emacs 23.1. This is a small release that includes internal changes from the Emacs team. A new hook, `mh-pack-folder-hook', has been added. From e084bc3d4106d616722c18a54df23382b1599dee Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 30 Oct 2010 19:16:20 -0700 Subject: [PATCH 10/11] * lisp/progmodes/sql.el: Remove comment link to defunct viewcvs url. --- lisp/progmodes/sql.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index e79b13f3fe2..6bd0d45bbd9 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -7,7 +7,7 @@ ;; Maintainer: Michael Mauger ;; Version: 2.0.2 ;; Keywords: comm languages processes -;; URL: http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/progmodes/sql.el +;; URL: http://savannah.gnu.org/projects/emacs/ ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?SqlMode ;; This file is part of GNU Emacs. @@ -2885,5 +2885,4 @@ parameters and command options." (provide 'sql) -;; arch-tag: 7e1fa1c4-9ca2-402e-87d2-83a5eccb7ac3 ;;; sql.el ends here From 46eadc7aeedf0fe3944291e2631d8604b38fe25f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 30 Oct 2010 23:33:56 -0400 Subject: [PATCH 11/11] Print informative error message when aborting on GTK disconnect. * xterm.c (x_connection_closed): Print informative error message when aborting on GTK. This requires using shut_down_emacs directly instead of Fkill_emacs. --- src/ChangeLog | 6 +++++ src/xterm.c | 70 ++++++++++++++++++++++++--------------------------- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cf2ae75fc83..391dc3eaa07 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-10-31 Chong Yidong + + * xterm.c (x_connection_closed): Print informative error message + when aborting on GTK. This requires using shut_down_emacs + directly instead of Fkill_emacs. + 2010-10-25 Michael Albinus * dbusbind.c (Fdbus_call_method_asynchronously) diff --git a/src/xterm.c b/src/xterm.c index 143500256a1..808eaad3f5f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7882,48 +7882,44 @@ x_connection_closed (dpy, error_message) delete_frame (frame, Qnoelisp); } - /* We have to close the display to inform Xt that it doesn't - exist anymore. If we don't, Xt will continue to wait for - events from the display. As a consequence, a sequence of - - M-x make-frame-on-display RET :1 RET - ...kill the new frame, so that we get an IO error... - M-x make-frame-on-display RET :1 RET - - will indefinitely wait in Xt for events for display `:1', opened - in the first call to make-frame-on-display. - - Closing the display is reported to lead to a bus error on - OpenWindows in certain situations. I suspect that is a bug - in OpenWindows. I don't know how to circumvent it here. */ - + /* If DPYINFO is null, this means we didn't open the display in the + first place, so don't try to close it. */ if (dpyinfo) { #ifdef USE_X_TOOLKIT - /* If DPYINFO is null, this means we didn't open the display - in the first place, so don't try to close it. */ - { - extern void (*fatal_error_signal_hook) P_ ((void)); - fatal_error_signal_hook = x_fatal_error_signal; - XtCloseDisplay (dpy); - fatal_error_signal_hook = NULL; - } -#endif + /* We have to close the display to inform Xt that it doesn't + exist anymore. If we don't, Xt will continue to wait for + events from the display. As a consequence, a sequence of + + M-x make-frame-on-display RET :1 RET + ...kill the new frame, so that we get an IO error... + M-x make-frame-on-display RET :1 RET + + will indefinitely wait in Xt for events for display `:1', + opened in the first call to make-frame-on-display. + + Closing the display is reported to lead to a bus error on + OpenWindows in certain situations. I suspect that is a bug + in OpenWindows. I don't know how to circumvent it here. */ + extern void (*fatal_error_signal_hook) P_ ((void)); + fatal_error_signal_hook = x_fatal_error_signal; + XtCloseDisplay (dpy); + fatal_error_signal_hook = NULL; +#endif /* USE_X_TOOLKIT */ #ifdef USE_GTK - /* There is a long-standing bug in GTK that prevents the GTK - main loop from recovering gracefully from disconnects - (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Among - other problems, this gives rise to a stream of Glib error - messages that, in one incident, filled up a user's hard disk - (http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00927.html). - So, kill Emacs unconditionally if the display is closed. */ - { - fprintf (stderr, "%s\n", error_msg); - Fkill_emacs (make_number (70)); - abort (); /* NOTREACHED */ - } -#endif + /* A long-standing GTK bug prevents proper disconnect handling + (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once, + the resulting Glib error message loop filled a user's disk. + To avoid this, kill Emacs unconditionally on disconnect. */ + shut_down_emacs (0, 0, Qnil); + fprintf (stderr, "%s\n\ +When compiled with GTK, Emacs cannot recover from X disconnects.\n\ +This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715\n\ +For details, see etc/PROBLEMS.\n", + error_msg); + abort (); +#endif /* USE_GTK */ /* Indicate that this display is dead. */ dpyinfo->display = 0;