From 8ee04f3a4f72eb41f2c0ead6287185c829654b43 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 19 Jan 2010 22:10:19 +0000 Subject: [PATCH 01/36] Fix bug#5395: typing '#' in an empty C buffer throws "args out of range". * progmodes/cc-defs.el: (c-set-cpp-delimiters, c-clear-cpp-delimiters): Check for EOB playing the role of delimiter. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/cc-defs.el | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f9e55700c10..4b34373f2d3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-01-19 Alan Mackenzie + + * progmodes/cc-defs.el: Fix bug#5395: typing '#' in an empty + buffer throws "args out of range". + (c-set-cpp-delimiters, c-clear-cpp-delimiters): Check for EOB + playing the role of delimiter. + 2010-01-18 Stephen Leake * lisp/progmodes/ada-mode.el: Fix bug#5400. diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index de0cd896b8e..bb91dee6ce8 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -1217,12 +1217,14 @@ been put there by c-put-char-property. POINT remains unchanged." ;; This macro does a hidden buffer change. `(progn (c-put-char-property ,beg 'category 'c-cpp-delimiter) - (c-put-char-property ,end 'category 'c-cpp-delimiter))) + (if (< ,end (point-max)) + (c-put-char-property ,end 'category 'c-cpp-delimiter)))) (defmacro c-clear-cpp-delimiters (beg end) ;; This macro does a hidden buffer change. `(progn (c-clear-char-property ,beg 'category) - (c-clear-char-property ,end 'category))) + (if (< ,end (point-max)) + (c-clear-char-property ,end 'category)))) (defsubst c-comment-out-cpps () ;; Render all preprocessor constructs syntactically commented out. From 1fdede8fa561814c5535de26f1f505e29cb38b33 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 19 Jan 2010 22:27:24 +0000 Subject: [PATCH 02/36] Redate and reposition log entry. --- src/ChangeLog | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3832808dc09..57a05ee26a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2010-01-19 Alan Mackenzie + + Fix spurious before-change-functions invocation from (insert ?\n). + * textprop.c (set_text_properties): rename parameter + `signal_after_change_p' to `coherent_change_p', and make the + invocation of `modify_region' conditional on it. + 2010-01-19 Jan Djärv * xsettings.c (apply_xft_settings): Save settings in Vxft_settings @@ -182,13 +189,6 @@ * dispnew.c (change_frame_size_1): newwidth == FRAME_COLS (f) must also be true before we can return early (bug #5339). -2010-01-08 Alan Mackenzie - - Fix spurious before-change-functions invocation from (insert ?\n). - * textprop.c (set_text_properties): rename parameter - `signal_after_change_p' to `coherent_change_p', and make the - invocation of `modify_region' conditional on it. - 2010-01-06 David Reitter * nsfns.m (ns_get_screen): Rewrite, returning NULL for non-NS. From e073d74aaad5b5b5b1300dc62e932b68a5478bcc Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 19 Jan 2010 19:46:23 -0800 Subject: [PATCH 03/36] (tab-always-indent): Fix custom-type. --- lisp/ChangeLog | 4 ++++ lisp/indent.el | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b34373f2d3..800b2ad24c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-01-20 Glenn Morris + + * indent.el (tab-always-indent): Fix custom-type. + 2010-01-19 Alan Mackenzie * progmodes/cc-defs.el: Fix bug#5395: typing '#' in an empty diff --git a/lisp/indent.el b/lisp/indent.el index 12cf9c9bb5d..3f8353bd90c 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -1,7 +1,7 @@ ;;; indent.el --- indentation commands for Emacs -;; Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Maintainer: FSF @@ -55,7 +55,11 @@ was already indented, then try to complete the thing at point. Some programming language modes have their own variable to control this, e.g., `c-tab-always-indent', and do not respect this variable." :group 'indent - :type '(choice (const nil) (const t) (const always))) + :type '(choice + (const :tag "Always indent" t) + (const :tag "Indent if inside indentation, else TAB" nil) + (const :tag "Indent, or if already indented complete" complete))) + (defun indent-according-to-mode () "Indent line in proper way for current major mode. From 79c08ece637930027beeb919da99865bcc7920bd Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 19 Jan 2010 19:49:35 -0800 Subject: [PATCH 04/36] Remove file that only works with CVS, and isn't really needed with Bazaar (given the in-built revision options of bzr diff). --- admin/ChangeLog | 5 ++ admin/revdiff | 137 ------------------------------------------------ 2 files changed, 5 insertions(+), 137 deletions(-) delete mode 100755 admin/revdiff diff --git a/admin/ChangeLog b/admin/ChangeLog index 8fd3b828a71..a43dbe931f0 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2010-01-20 Glenn Morris + + * revdiff: Remove file that only works with CVS, and isn't really + needed with Bazaar (given the in-built revision options of bzr diff). + 2010-01-12 Glenn Morris * emacs-pretesters, make-announcement: Use bug-gnu-emacs rather diff --git a/admin/revdiff b/admin/revdiff deleted file mode 100755 index 7a1e93a64fe..00000000000 --- a/admin/revdiff +++ /dev/null @@ -1,137 +0,0 @@ -#! /usr/bin/perl - -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -# 2010 Free Software Foundation, Inc. -# -# This file is part of GNU Emacs. - -# GNU Emacs is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# GNU Emacs is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with GNU Emacs. If not, see . - - -use File::Basename; - -if (@ARGV < 3) -{ - print <', use the Nth revision before the current one for OLD. - -If NEW is + or -, build diffs between revisions OLD -and OLD +/- . - -Examples: - -revdiff FILE - -1 get the latest change of FILE -revdiff FILE -1 +1 also gets the latest change of FILE -revdiff FILE 1.500 +2 get diffs 1.500-1.501 and 1.501-1.502. - -USAGE - exit 1; -} - -$file = shift @ARGV; -$old = shift @ARGV; - -sub diffit -{ - my ($old, $new) = @_; - print "cvs diff -r$old -r$new $file >$file-$old-$new.diff\n"; - system "cvs diff -r$old -r$new $file >$file-$old-$new.diff"; -} - -sub current_revision ($) -{ - my ($file) = @_; - my $dir = dirname ($file); - my $base = basename ($file); - my $entries = "$dir/CVS/Entries"; - die "Can't find $entries" unless -f $entries; - open (IN, "<$entries") or die "Cannot open $entries"; - my $rev; - while ($line = ) - { - if ($line =~ m,/$base/([^/]+),) - { - $rev = $1; - break; - } - } - die "Cannot determine current revision of $file" unless $rev; - close (IN); - return $rev; -} - -if ($old eq "-") - { - $old = current_revision ($file); - } -elsif ($old =~ /^-(\d+)$/) - { - my $offset = $1; - $old = current_revision ($file); - die "Internal error" unless $old =~ /(.*)\.(\d+)$/; - my $minor = $2 - $offset; - $old = sprintf ("%d.%d", $1, $minor); - } - -while (@ARGV) - { - my $new = shift @ARGV; - if ($new =~ /^[+]\d+$/) - { - my $n = $new; - for ($i = 0; $i < $n; ++$i) - { - unless ($old =~ /(.*)\.(\d+)$/) - { - die "Internal error"; - } - my $j = $2 + 1; - $new = "$1.$j"; - diffit ($old, $new); - $old = $new; - } - } - elsif ($new =~ /^[-]\d+$/) - { - my $n = - $new; - for ($i = 0; $i < $n; ++$i) - { - unless ($old =~ /(.*)\.(\d+)$/) - { - die "Internal error"; - } - my $j = $2 - 1; - $new = "$1.$j"; - diffit ($new, $old); - $old = $new; - } - } - else - { - diffit ($old, $new); - $old = $new; - } - } - -# Local Variables: -# mode: cperl -# End: - -# arch-tag: 2798b20d-c7f2-4c78-8378-7bb529c36a09 From d3d8944e13bdb24f3e828467159bf0742ca66931 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 20 Jan 2010 11:40:47 -0500 Subject: [PATCH 05/36] * lisp/dired-aux.el (dired-hide-all): Mark arg as ignored. --- lisp/dired-aux.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 7c53c3d9461..e5c2c5f3cb1 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2308,7 +2308,7 @@ Use \\[dired-hide-all] to (un)hide all directories." (restore-buffer-modified-p modflag))) ;;;###autoload -(defun dired-hide-all (arg) +(defun dired-hide-all (ignored) "Hide all subdirectories, leaving only their header lines. If there is already something hidden, make everything visible again. Use \\[dired-hide-subdir] to (un)hide a particular subdirectory." From 8ae41cbce21d70919aa36f0cecdb7bc8cef02ce2 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 20 Jan 2010 11:42:50 -0500 Subject: [PATCH 06/36] * lisp/dired-aux.el (dired-hide-all): Make unused arg optional. Update md5sum. --- lisp/dired-aux.el | 2 +- lisp/dired.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index e5c2c5f3cb1..62d6928c024 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2308,7 +2308,7 @@ Use \\[dired-hide-all] to (un)hide all directories." (restore-buffer-modified-p modflag))) ;;;###autoload -(defun dired-hide-all (ignored) +(defun dired-hide-all (&optional ignored) "Hide all subdirectories, leaving only their header lines. If there is already something hidden, make everything visible again. Use \\[dired-hide-subdir] to (un)hide a particular subdirectory." diff --git a/lisp/dired.el b/lisp/dired.el index d4bf1d019a0..1fc90c308b1 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3517,7 +3517,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "557aca1f6e86b39f1c7612ee123d5354") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "07676ea25af17f5d50cc5db4f53bddc0") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ @@ -3917,7 +3917,7 @@ Hide all subdirectories, leaving only their header lines. If there is already something hidden, make everything visible again. Use \\[dired-hide-subdir] to (un)hide a particular subdirectory. -\(fn ARG)" t nil) +\(fn &optional IGNORED)" t nil) (autoload 'dired-isearch-filenames-setup "dired-aux" "\ Set up isearch to search in Dired file names. From 5189d95ba6d95c10118fcf70ec382d11cf3062b4 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 20 Jan 2010 12:14:37 -0500 Subject: [PATCH 07/36] * lisp/term.el (term-send-raw-meta): Revert 2009-12-04 change (Bug#5330). --- lisp/ChangeLog | 4 ++++ lisp/term.el | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 800b2ad24c9..3d99f723a31 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-01-20 Chong Yidong + + * term.el (term-send-raw-meta): Revert 2009-12-04 change (Bug#5330). + 2010-01-20 Glenn Morris * indent.el (tab-always-indent): Fix custom-type. diff --git a/lisp/term.el b/lisp/term.el index a619ed6ad66..7cb364af622 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1208,8 +1208,17 @@ without any interpretation." (defun term-send-raw-meta () (interactive) - (let* ((keys (this-command-keys)) - (char (aref keys (1- (length keys))))) + (let ((char last-input-event)) + (when (symbolp last-input-event) + ;; Convert `return' to C-m, etc. + (let ((tmp (get char 'event-symbol-elements))) + (when tmp + (setq char (car tmp))) + (when (symbolp char) + (setq tmp (get char 'ascii-character)) + (when tmp + (setq char tmp))))) + (setq char (event-basic-type char)) (term-send-raw-string (if (and (numberp char) (> char 127) (< char 256)) From 99d0985b2b450e7dc13e250c12277106176a5b7b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 20 Jan 2010 20:37:44 -0800 Subject: [PATCH 08/36] (Bugs): Fix PROBLEMS keybinding. --- doc/emacs/ChangeLog | 4 ++++ doc/emacs/trouble.texi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 8ca2b187d94..7d7002a6469 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2010-01-21 Glenn Morris + + * trouble.texi (Bugs): Fix PROBLEMS keybinding. + 2010-01-12 Glenn Morris * trouble.texi (Checklist): Use bug-gnu-emacs rather than diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 218aa3a64d4..b0b54d572f6 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -419,7 +419,7 @@ to do so effectively, you must know when and how to do it. Before reporting a bug, it is a good idea to see if it is already known. You can find the list of known problems in the file -@file{etc/PROBLEMS} in the Emacs distribution; type @kbd{C-h C-e} to read +@file{etc/PROBLEMS} in the Emacs distribution; type @kbd{C-h C-p} to read it. Some additional user-level problems can be found in @ref{Bugs and problems, , Bugs and problems, efaq, GNU Emacs FAQ}. Looking up your problem in these two documents might provide you with a solution or a From 994ff697713e64393cb483a336d9e6c7428bb33b Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Thu, 21 Jan 2010 09:05:08 +0000 Subject: [PATCH 09/36] (Score File Format): Fix typo. --- doc/misc/ChangeLog | 4 ++++ doc/misc/gnus.texi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 4a099bdb2c1..3d39b108049 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2010-01-21 Katsumi Yamaoka + + * gnus.texi (Score File Format): Fix typo. + 2010-01-18 Juanma Barranquero * ada-mode.texi (Project File Overview): Fix typo. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index a33a91ba6f1..75720a94da1 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -21803,7 +21803,7 @@ not be loaded, even though they would normally be so, for some reason or other. @item eval -The value of this entry will be @code{eval}el. This element will be +The value of this entry will be @code{eval}ed. This element will be ignored when handling global score files. @item read-only From afb5d709049eb40291fa0126d48efca2f7061a10 Mon Sep 17 00:00:00 2001 From: Stephen Leake Date: Thu, 21 Jan 2010 13:25:54 +0100 Subject: [PATCH 10/36] Fix bug#5435. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/ada-mode.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d99f723a31..4a453c58759 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-01-21 Stephen Leake + + * progmodes/ada-mode.el (ada-in-paramlist-p): Pragma syntax + is the same as subprogram call, not declaration. (Bug#5435). + 2010-01-20 Chong Yidong * term.el (term-send-raw-meta): Revert 2009-12-04 change (Bug#5330). diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 3694de23f88..6e7af70a683 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -4163,7 +4163,8 @@ Return nil if the private is part of the package name, as in (defun ada-in-paramlist-p () - "Return t if point is inside a parameter-list." + "Return t if point is inside the parameter-list of a declaration, +but not a subprogram call or aggregate." (save-excursion (and (ada-search-ignore-string-comment "(\\|)" t nil t) @@ -4194,13 +4195,13 @@ Return nil if the private is part of the package name, as in ;; right keyword two words before parenthesis ? ;; Type is in this list because of discriminants + ;; pragma is not, because the syntax is that of a subprogram call. (looking-at (eval-when-compile (concat "\\<\\(" "procedure\\|function\\|body\\|" "task\\|entry\\|accept\\|" "access[ \t]+procedure\\|" "access[ \t]+function\\|" - "pragma\\|" "type\\)\\>")))))) (defun ada-search-ignore-complex-boolean (regexp backwardp) From f0bd0ad525b8867540351715dda5743f8b4c4bd1 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 21 Jan 2010 09:03:10 -0500 Subject: [PATCH 11/36] Fix sgml-maybe-name-self (Bug#5380). * textmodes/sgml-mode.el (sgml-maybe-name-self): No need to process last-command-event, as it is now decoded first (Bug#5380). --- lisp/ChangeLog | 5 +++++ lisp/textmodes/sgml-mode.el | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d99f723a31..c3c95a95aa7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-01-21 Kenichi Handa + + * textmodes/sgml-mode.el (sgml-maybe-name-self): No need to + process last-command-event, as it is now decoded first (Bug#5380). + 2010-01-20 Chong Yidong * term.el (term-send-raw-meta): Revert 2009-12-04 change (Bug#5330). diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 996734637bc..b9d52acdeba 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -608,11 +608,7 @@ Uses `sgml-char-names'." "Insert a symbolic character name according to `sgml-char-names'." (interactive "*") (if sgml-name-8bit-mode - (let ((mc last-command-event)) - (if (< mc 256) - (setq mc (unibyte-char-to-multibyte mc))) - (or mc (setq mc last-command-event)) - (sgml-name-char mc)) + (sgml-name-char last-command-event) (self-insert-command 1))) (defun sgml-name-8bit-mode () From 3e8f7d9196c6c5ccac68bfe4c083e541fc9922e0 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Thu, 21 Jan 2010 21:45:01 +0000 Subject: [PATCH 12/36] Fix a situation where deletion of a cpp construct throws an error. --- lisp/ChangeLog | 8 ++++++++ lisp/progmodes/cc-engine.el | 11 +++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3c95a95aa7..a308a571874 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-01-21 Alan Mackenzie + + Fix a situation where deletion of a cpp construct throws an error. + * progmodes/cc-engine.el (c-invalidate-state-cache): Before + invoking c-with-all-but-one-cpps-commented-out, check that the + special cpp construct is still in the buffer. + (c-parse-state): Record the special cpp with markers, not numbers. + 2010-01-21 Kenichi Handa * textmodes/sgml-mode.el (sgml-maybe-name-self): No need to diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 0e6358aeee1..9d0af1d53ce 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -2996,9 +2996,11 @@ comment at the start of cc-engine.el for more info." ;; containing point. We can then call `c-invalidate-state-cache-1' without ;; worrying further about macros and template delimiters. (c-with-<->-as-parens-suppressed - (if c-state-old-cpp-beg + (if (and c-state-old-cpp-beg + (< c-state-old-cpp-beg here)) (c-with-all-but-one-cpps-commented-out - c-state-old-cpp-beg c-state-old-cpp-end + c-state-old-cpp-beg + (min c-state-old-cpp-end here) (c-invalidate-state-cache-1 here)) (c-with-cpps-commented-out (c-invalidate-state-cache-1 here))))) @@ -3029,8 +3031,9 @@ comment at the start of cc-engine.el for more info." (c-parse-state-1)) (c-with-cpps-commented-out (c-parse-state-1)))) - (setq c-state-old-cpp-beg here-cpp-beg - c-state-old-cpp-end here-cpp-end)))) + (setq c-state-old-cpp-beg (and here-cpp-beg (copy-marker here-cpp-beg t)) + c-state-old-cpp-end (and here-cpp-end (copy-marker here-cpp-end t))) + ))) ;; Debug tool to catch cache inconsistencies. This is called from ;; 000tests.el. From 74327f7a7c4f8fb1ea4bacd8147ac5b1169231c3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 22 Jan 2010 10:44:50 +0200 Subject: [PATCH 13/36] Fix bug #5303 in `load' on MS-Windows, whereby load-file would fail for files like C:/the-file.el in root directory of any drive. lread.c (Fload): Don't treat files without .elc extension as byte-compiled if they are ``magic'', i.e. `openp' returned -2 for them. --- src/ChangeLog | 6 ++++++ src/lread.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index bdbdd0b0da9..2a3263588c4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-01-22 Eli Zaretskii + + * lread.c (Fload): Don't treat files without .elc extension as + byte-compiled if they are ``magic'', i.e. `openp' returned -2 for + them. (bug#5303) + 2010-01-20 Kenichi Handa * coding.c (consume_chars): If ! multibyte and the encoder is ccl, diff --git a/src/lread.c b/src/lread.c index db425b82299..ba9d5378104 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1155,7 +1155,7 @@ Return t if the file exists and loads successfully. */) if (!bcmp (SDATA (found) + SBYTES (found) - 4, ".elc", 4) - || (version = safe_to_load_p (fd)) > 0) + || (fd >= 0 && (version = safe_to_load_p (fd)) > 0)) /* Load .elc files directly, but not when they are remote and have no handler! */ { From 2aff7c53068db3b7afcb9e66d8b5329f7d704dbb Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Fri, 22 Jan 2010 18:10:04 +0900 Subject: [PATCH 14/36] Make string pointer args point to const as in other string allocation functions. * lisp.h (make_pure_string): String pointer arg now points to const. * alloc.c (find_string_data_in_pure, make_pure_string): String pointer args now point to const. --- src/ChangeLog | 7 +++++++ src/alloc.c | 10 +++++----- src/lisp.h | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2a3263588c4..5589b7f34a2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2010-01-22 YAMAMOTO Mitsuharu + + * lisp.h (make_pure_string): String pointer arg now points to const. + + * alloc.c (find_string_data_in_pure, make_pure_string): String pointer + args now point to const. + 2010-01-22 Eli Zaretskii * lread.c (Fload): Don't treat files without .elc extension as diff --git a/src/alloc.c b/src/alloc.c index 3c48f8762f8..9a935cc8952 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4725,11 +4725,11 @@ check_pure_size () static char * find_string_data_in_pure (data, nbytes) - char *data; + const char *data; int nbytes; { int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max; - unsigned char *p; + const unsigned char *p; char *non_lisp_beg; if (pure_bytes_used_non_lisp < nbytes + 1) @@ -4740,7 +4740,7 @@ find_string_data_in_pure (data, nbytes) for (i = 0; i < 256; i++) bm_skip[i] = skip; - p = (unsigned char *) data; + p = (const unsigned char *) data; while (--skip > 0) bm_skip[*p++] = skip; @@ -4754,7 +4754,7 @@ find_string_data_in_pure (data, nbytes) infinity = pure_bytes_used_non_lisp + 1; bm_skip['\0'] = infinity; - p = (unsigned char *) non_lisp_beg + nbytes; + p = (const unsigned char *) non_lisp_beg + nbytes; start = 0; do { @@ -4796,7 +4796,7 @@ find_string_data_in_pure (data, nbytes) Lisp_Object make_pure_string (data, nchars, nbytes, multibyte) - char *data; + const char *data; int nchars, nbytes; int multibyte; { diff --git a/src/lisp.h b/src/lisp.h index 5ea0303976d..7032a3f48f4 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2686,7 +2686,7 @@ extern Lisp_Object make_uninit_multibyte_string P_ ((int, int)); extern Lisp_Object make_string_from_bytes P_ ((const char *, int, int)); extern Lisp_Object make_specified_string P_ ((const char *, int, int, int)); EXFUN (Fpurecopy, 1); -extern Lisp_Object make_pure_string P_ ((char *, int, int, int)); +extern Lisp_Object make_pure_string P_ ((const char *, int, int, int)); extern Lisp_Object make_pure_c_string (const char *data); extern Lisp_Object pure_cons P_ ((Lisp_Object, Lisp_Object)); extern Lisp_Object make_pure_vector P_ ((EMACS_INT)); From 6a801864b18fb130aff93bab09c54a6d454bfc34 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 22 Jan 2010 12:23:25 +0200 Subject: [PATCH 15/36] Fix bug #5447, whereby loading C:/foo.el.gz on MS-Windows would fail. jka-compr.el (jka-compr-load): If load-file is not in load-history, try its file-truename version. --- lisp/ChangeLog | 5 +++++ lisp/jka-compr.el | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a308a571874..1dc503e2bd6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-01-22 Eli Zaretskii + + * jka-compr.el (jka-compr-load): If load-file is not in + load-history, try its file-truename version. (bug#5447) + 2010-01-21 Alan Mackenzie Fix a situation where deletion of a cpp construct throws an error. diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 12f48bd96b1..34ffcc90a76 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -590,7 +590,14 @@ There should be no more than seven characters after the final `/'." (or nomessage (message "Loading %s...done." file)) ;; Fix up the load history to point at the right library. - (let ((l (assoc load-file load-history))) + (let ((l (or (assoc load-file load-history) + ;; On MS-Windows, if load-file is in + ;; temporary-file-directory, it will look like + ;; "c:/DOCUME~1/USER/LOCALS~1/foo", whereas + ;; readevalloop will record its truename in + ;; load-history. Therefore try truename if the + ;; original name is not in load-history. + (assoc (file-truename load-file) load-history)))) ;; Remove .gz and .elc?. (while (file-name-extension file) (setq file (file-name-sans-extension file))) From 9425f8e1b3b40adc297376007992cb680ef5e0ec Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 22 Jan 2010 11:32:31 -0500 Subject: [PATCH 16/36] * isearch.el (isearch-allow-scroll): Doc fix (Bug#5446). --- lisp/ChangeLog | 4 ++++ lisp/isearch.el | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1dc503e2bd6..ab76ac74d5e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-01-22 Chong Yidong + + * isearch.el (isearch-allow-scroll): Doc fix (Bug#5446). + 2010-01-22 Eli Zaretskii * jka-compr.el (jka-compr-load): If load-file is not in diff --git a/lisp/isearch.el b/lisp/isearch.el index ab40678e69c..d0ad330c5c0 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1754,7 +1754,10 @@ Scroll-bar or mode-line events are processed appropriately." (put 'digit-argument 'isearch-scroll t) (defcustom isearch-allow-scroll nil - "If non-nil, scrolling commands are allowed during incremental search." + "Whether scrolling is allowed during incremental search. +If non-nil, scrolling commands can be used in Isearch mode. +However, the current match will never scroll offscreen. +If nil, scolling commands will first cancel Isearch mode." :type 'boolean :group 'isearch) From c893016b07f33eb8d56e1011245fe59a67cb4ee0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 22 Jan 2010 11:43:54 -0500 Subject: [PATCH 17/36] * mail/rmailmm.el (rmail-mime-handle): Don't set the buffer to unibyte just because we see "encoding: 8bit". * mail/rmail.el (rmail-show-message-1): Decode the body's QP into bytes. --- lisp/ChangeLog | 6 ++++++ lisp/mail/mail-utils.el | 2 ++ lisp/mail/rmail.el | 3 ++- lisp/mail/rmailmm.el | 5 ++++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ab76ac74d5e..c59ecbae67b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-01-22 Stefan Monnier + + * mail/rmailmm.el (rmail-mime-handle): Don't set the buffer to unibyte + just because we see "encoding: 8bit". + * mail/rmail.el (rmail-show-message-1): Decode the body's QP into bytes. + 2010-01-22 Chong Yidong * isearch.el (isearch-allow-scroll): Doc fix (Bug#5446). diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 3bca0b23a8c..5fad3554ae5 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -133,6 +133,8 @@ If NOERROR is non-nil, return t if successful. If UNIBYTE is non-nil, insert converted characters as unibyte. That is useful if you are going to character code decoding afterward, as Rmail does." + ;; FIXME: `unibyte' should always be non-nil, and the iso-latin-1 + ;; specific handling should be removed (or moved elsewhere and generalized). (interactive "r\nP") (let (failed) (save-match-data diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 67ea3fdc158..20a03ede965 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2727,7 +2727,8 @@ The current mail message becomes the message displayed." (insert-buffer-substring mbox-buf body-start end) (cond ((string= character-coding "quoted-printable") - (mail-unquote-printable-region (point-min) (point-max))) + (mail-unquote-printable-region (point-min) (point-max) + nil nil 'unibyte)) ((and (string= character-coding "base64") is-text-message) (base64-decode-region (point-min) (point-max))) ((eq character-coding 'uuencode) diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index e87f72a2e47..415bc20cf50 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -361,7 +361,10 @@ The parsed header value: (setq content-transfer-encoding nil)) ((string= content-transfer-encoding "8bit") ;; FIXME: Is this the correct way? - (set-buffer-multibyte nil))) + ;; No, of course not, it just means there's no decoding to do. + ;; (set-buffer-multibyte nil) + (setq content-transfer-encoding nil) + )) ;; Inline stuff requires work. Attachments are handled by the bulk ;; handler. (if (string= "inline" (car content-disposition)) From 411d06c27c0e7f3e9d94fef1d11822b2035b907d Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 22 Jan 2010 22:19:50 +0100 Subject: [PATCH 18/36] * net/tramp-imap.el (top): Autoload needed packages. --- lisp/ChangeLog | 4 ++++ lisp/net/tramp-imap.el | 21 ++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c59ecbae67b..65e171c1381 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-01-22 Michael Albinus + + * net/tramp-imap.el (top): Autoload needed packages. + 2010-01-22 Stefan Monnier * mail/rmailmm.el (rmail-mime-handle): Don't set the buffer to unibyte diff --git a/lisp/net/tramp-imap.el b/lisp/net/tramp-imap.el index da75e2307ca..6f20d527713 100644 --- a/lisp/net/tramp-imap.el +++ b/lisp/net/tramp-imap.el @@ -55,13 +55,23 @@ (require 'assoc) (require 'tramp) (require 'tramp-compat) -(require 'message) -(require 'imap-hash) -(require 'epa) + (autoload 'auth-source-user-or-password "auth-source") +(autoload 'epg-context-operation "epg") +(autoload 'epg-context-set-armor "epg") +(autoload 'epg-context-set-passphrase-callback "epg") +(autoload 'epg-context-set-progress-callback "epg") +(autoload 'epg-decrypt-string "epg") +(autoload 'epg-encrypt-string "epg") +(autoload 'imap-hash-get "imap-hash") +(autoload 'imap-hash-make "imap-hash") +(autoload 'imap-hash-map "imap-hash") +(autoload 'imap-hash-put "imap-hash") +(autoload 'imap-hash-rem "imap-hash") ;; We use the additional header "X-Size" for encoding the size of a file. -(add-to-list 'imap-hash-headers 'X-Size 'append) +(eval-after-load "imap-hash" + '(add-to-list 'imap-hash-headers 'X-Size 'append)) ;; Define Tramp IMAP method ... (defconst tramp-imap-method "imap" @@ -662,7 +672,8 @@ KEY-ID can be 'SYM or 'PIN among others." (read-passwd (if (eq key-id 'PIN) "Tramp-IMAP passphrase for PIN: " - (let ((entry (assoc key-id epg-user-id-alist))) + (let ((entry (assoc key-id + (symbol-value 'epg-user-id-alist)))) (if entry (format "Tramp-IMAP passphrase for %s %s: " key-id (cdr entry)) From 3d782998caa47e69de96807eb9deee2b9aa1d9d1 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 23 Jan 2010 14:20:38 +0900 Subject: [PATCH 19/36] * xdisp.c (draw_glyphs): Update `start' for left_overwritten case as in Emacs 22. --- src/ChangeLog | 5 +++++ src/xdisp.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 5589b7f34a2..62337d8db63 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-01-23 YAMAMOTO Mitsuharu + + * xdisp.c (draw_glyphs): Update `start' for left_overwritten case + as in Emacs 22. + 2010-01-22 YAMAMOTO Mitsuharu * lisp.h (make_pure_string): String pointer arg now points to const. diff --git a/src/xdisp.c b/src/xdisp.c index 7d43f2d8bef..8e356224c8a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -20401,6 +20401,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps) j = i; BUILD_GLYPH_STRINGS (j, start, h, t, overlap_hl, dummy_x, last_x); + start = i; compute_overhangs_and_x (t, head->x, 1); prepend_glyph_string_lists (&head, &tail, h, t); clip_head = head; @@ -20450,6 +20451,8 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps) BUILD_GLYPH_STRINGS (end, i, h, t, overlap_hl, x, last_x); + /* Because BUILD_GLYPH_STRINGS updates the first argument, + we don't have `end = i;' here. */ compute_overhangs_and_x (h, tail->x + tail->width, 0); append_glyph_string_lists (&head, &tail, h, t); clip_tail = tail; From 0536254eb9edf334afd8dd11c1a9ac37b9ee66d2 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 23 Jan 2010 12:02:28 +0100 Subject: [PATCH 20/36] * net/tramp-smb.el (tramp-smb-conf): New defcustom. (tramp-smb-maybe-open-connection): Use it. --- lisp/ChangeLog | 7 ++++++- lisp/net/tramp-smb.el | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65e171c1381..a1871e59677 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,11 @@ +2010-01-23 Michael Albinus + + * net/tramp-smb.el (tramp-smb-conf): New defcustom. + (tramp-smb-maybe-open-connection): Use it. + 2010-01-22 Michael Albinus - * net/tramp-imap.el (top): Autoload needed packages. + * net/tramp-imap.el (top): Autoload needed packages. (Bug#5448) 2010-01-22 Stefan Monnier diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 9d176a1fd3c..e9051f0a435 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -61,6 +61,13 @@ :group 'tramp :type 'string) +(defcustom tramp-smb-conf "/dev/null" + "*Path of the smb.conf file. +If it is nil, no smb.conf will be added to the `tramp-smb-program' +call, letting the SMB client use the default one." + :group 'tramp + :type '(choice (const nil) (file :must-match t))) + (defvar tramp-smb-version nil "*Version string of the SMB client.") @@ -1281,7 +1288,8 @@ connection if a previous connection has died for some reason." (when domain (setq args (append args (list "-W" domain)))) (when port (setq args (append args (list "-p" port)))) - (setq args (append args (list "-s" "/dev/null"))) + (when tramp-smb-conf + (setq args (append args (list "-s" tramp-smb-conf)))) ;; OK, let's go. (tramp-message From b06a3bb5cf7893bb2f6c910334926d7cd551a18e Mon Sep 17 00:00:00 2001 From: Stephen Leake Date: Sat, 23 Jan 2010 13:34:52 +0100 Subject: [PATCH 21/36] Tweak docstring and comment. --- lisp/progmodes/ada-mode.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 6e7af70a683..a08e31e2016 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -257,7 +257,7 @@ Note that indentation is calculated only if `ada-indent-comment-as-code' is t. For instance: A := 1; -- A multi-line comment - -- aligned if ada-indent-align-comments is t" + -- aligned if `ada-indent-align-comments' is t" :type 'boolean :group 'ada) (defcustom ada-indent-comment-as-code t @@ -4163,8 +4163,7 @@ Return nil if the private is part of the package name, as in (defun ada-in-paramlist-p () - "Return t if point is inside the parameter-list of a declaration, -but not a subprogram call or aggregate." + "Return t if point is inside the parameter-list of a declaration, but not a subprogram call or aggregate." (save-excursion (and (ada-search-ignore-string-comment "(\\|)" t nil t) From 7709e61e9aa622663dfd13643580929307416c94 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 23 Jan 2010 13:38:02 +0100 Subject: [PATCH 22/36] * mail/rmail.el: Update autoload checksum. --- lisp/mail/rmail.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 20a03ede965..1dbfceb315b 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4270,7 +4270,7 @@ With prefix argument N moves forward N messages with these labels. ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "d196de6dfb74fe87a3d02189096b795f") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "93033f2136fcd111e2b52a116ff4cf29") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ From c6d09b8da9277374a080f8574251b98f8f7879cb Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 23 Jan 2010 17:15:22 -0500 Subject: [PATCH 23/36] Account for utmp.h availability. * configure.in: Check for utmp.h availability (FreeBSD 9.x lacks this header file). * filelock.c: Include utmp.h only when HAVE_UTMP_H (FreeBSD 9.x lacks this header file). --- ChangeLog | 5 +++++ configure | 3 ++- configure.in | 2 +- src/ChangeLog | 5 +++++ src/filelock.c | 2 ++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index db1d28dd620..6792ba4f3e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-01-23 Giorgos Keramidas (tiny change) + + * configure.in: Check for utmp.h availability (FreeBSD 9.x lacks + this header file). + 2010-01-12 Juanma Barranquero * .bzrignore: Ignore all .exe, instead of individual files. diff --git a/configure b/configure index 947b8ae9c3e..1ba9d361e6a 100755 --- a/configure +++ b/configure @@ -6663,13 +6663,14 @@ fi + for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ - sys/utsname.h pwd.h + sys/utsname.h pwd.h utmp.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then diff --git a/configure.in b/configure.in index 33671e530ee..82d3dfe4ede 100644 --- a/configure.in +++ b/configure.in @@ -1106,7 +1106,7 @@ AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ - sys/utsname.h pwd.h) + sys/utsname.h pwd.h utmp.h) AC_MSG_CHECKING(if personality LINUX32 can be set) AC_TRY_COMPILE([#include ], [personality (PER_LINUX32)], diff --git a/src/ChangeLog b/src/ChangeLog index 62337d8db63..d20b3113ba7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-01-23 Giorgos Keramidas (tiny change) + + * filelock.c: Include utmp.h only when HAVE_UTMP_H (FreeBSD 9.x + lacks this header file). + 2010-01-23 YAMAMOTO Mitsuharu * xdisp.c (draw_glyphs): Update `start' for left_overwritten case diff --git a/src/filelock.c b/src/filelock.c index 3c92d495060..7c69ea954fc 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -63,7 +63,9 @@ Lisp_Object Vtemporary_file_directory; #ifdef CLASH_DETECTION +#ifdef HAVE_UTMP_H #include +#endif #if !defined (S_ISLNK) && defined (S_IFLNK) #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) From 064eee0324df9b7d0d320e523ced87478dc3a849 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 23 Jan 2010 17:44:03 -0500 Subject: [PATCH 24/36] * emacs-lisp/assoc.el (aput, adelete, amake): Use lexical-let (Bug#5450). --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/assoc.el | 15 ++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 83903e1e9e5..afa01ebac9f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-01-23 Chong Yidong + + * emacs-lisp/assoc.el (aput, adelete, amake): Use lexical-let (Bug#5450). + 2010-01-23 Stephen Leake * progmodes/ada-mode.el (ada-in-paramlist-p): Pragma syntax diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el index 8082069a34b..dd437d7cb1d 100644 --- a/lisp/emacs-lisp/assoc.el +++ b/lisp/emacs-lisp/assoc.el @@ -27,6 +27,7 @@ ;; fetching off key-value pairs in association lists. ;;; Code: +(eval-when-compile (require 'cl)) (defun asort (alist-symbol key) "Move a specified key-value pair to the head of an alist. @@ -71,8 +72,8 @@ If VALUE is not supplied, or is nil, the key-value pair will not be modified, but will be moved to the head of the alist. If the key-value pair cannot be found in the alist, it will be inserted into the head of the alist (with value nil if VALUE is nil or not supplied)." - (let ((elem (aelement key value)) - alist) + (lexical-let ((elem (aelement key value)) + alist) (asort alist-symbol key) (setq alist (eval alist-symbol)) (cond ((null alist) (set alist-symbol elem)) @@ -86,7 +87,7 @@ of the alist (with value nil if VALUE is nil or not supplied)." Alist is referenced by ALIST-SYMBOL and the key-value pair to remove is pair matching KEY. Returns the altered alist." (asort alist-symbol key) - (let ((alist (eval alist-symbol))) + (lexical-let ((alist (eval alist-symbol))) (cond ((null alist) nil) ((anot-head-p alist key) alist) (t (set alist-symbol (cdr alist)))))) @@ -123,10 +124,10 @@ KEYLIST and VALUELIST should have the same number of elements, but this isn't enforced. If VALUELIST is smaller than KEYLIST, remaining keys are associated with nil. If VALUELIST is larger than KEYLIST, extra values are ignored. Returns the created alist." - (let ((keycar (car keylist)) - (keycdr (cdr keylist)) - (valcar (car valuelist)) - (valcdr (cdr valuelist))) + (lexical-let ((keycar (car keylist)) + (keycdr (cdr keylist)) + (valcar (car valuelist)) + (valcdr (cdr valuelist))) (cond ((null keycdr) (aput alist-symbol keycar valcar)) (t From 245e0fafb7c1cde6fb9ea580008249b7c09f8f12 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 23 Jan 2010 17:46:32 -0500 Subject: [PATCH 25/36] * emacs-lisp/assoc.el (aelement): Doc fix. --- lisp/ChangeLog | 1 + lisp/emacs-lisp/assoc.el | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index afa01ebac9f..c87a0495b91 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2010-01-23 Chong Yidong * emacs-lisp/assoc.el (aput, adelete, amake): Use lexical-let (Bug#5450). + (aelement): Doc fix. 2010-01-23 Stephen Leake diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el index dd437d7cb1d..60692495776 100644 --- a/lisp/emacs-lisp/assoc.el +++ b/lisp/emacs-lisp/assoc.el @@ -42,7 +42,8 @@ sorted list." (defun aelement (key value) "Make a list of a cons cell containing car of KEY and cdr of VALUE. -The returned list is suitable as an element of an alist." +The returned list is suitable for concatanating with an existing +alist, via `nconc'." (list (cons key value))) From e17d428f7a77b5428894e48dbc2927b04e75931b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 23 Jan 2010 17:50:13 -0500 Subject: [PATCH 26/36] * url-util.el: Require url-vars (Bug#5459). --- lisp/url/ChangeLog | 4 ++++ lisp/url/url-util.el | 1 + 2 files changed, 5 insertions(+) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 8d32f7242b7..2a8c6ebe25b 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,7 @@ +2010-01-23 Chong Yidong + + * url-util.el: Require url-vars (Bug#5459). + 2009-11-27 Stefan Monnier * url-parse.el (url-generic-parse-url): Bind deactivate-mark. diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index 8a9cc01e1f3..c0b2595a6e0 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -26,6 +26,7 @@ ;;; Code: (require 'url-parse) +(require 'url-vars) (eval-when-compile (require 'cl)) (autoload 'timezone-parse-date "timezone") (autoload 'timezone-make-date-arpa-standard "timezone") From 02c6d0d0f29e6628d62910463e5800325f21aebf Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 23 Jan 2010 18:05:16 -0500 Subject: [PATCH 27/36] * emacs-lisp/advice.el (ad-set-orig-definition): Fix typo (Bug#3541). --- lisp/ChangeLog | 9 +++++++-- lisp/emacs-lisp/advice.el | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c87a0495b91..cee15424814 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,12 @@ +2010-01-23 Dmitri Paduchikh (tiny change) + + * emacs-lisp/advice.el (ad-set-orig-definition): Fix typo + (Bug#3541). + 2010-01-23 Chong Yidong - * emacs-lisp/assoc.el (aput, adelete, amake): Use lexical-let (Bug#5450). - (aelement): Doc fix. + * emacs-lisp/assoc.el (aelement): Doc fix. + (aput, adelete, amake): Use lexical-let (Bug#5450). 2010-01-23 Stephen Leake diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index bac24b63021..003f70ea4a5 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -2191,7 +2191,7 @@ Redefining advices affect the construction of an advised definition." (defmacro ad-set-orig-definition (function definition) `(ad-safe-fset - (ad-get-advice-info-field function 'origname) ,definition)) + (ad-get-advice-info-field ,function 'origname) ,definition)) (defmacro ad-clear-orig-definition (function) `(fmakunbound (ad-get-advice-info-field ,function 'origname))) From 9630d49eaef26402854482062d43ecb93f542d2b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 23 Jan 2010 15:11:24 -0800 Subject: [PATCH 28/36] Update X-Debbugs-CC details. Remove Mail-Followup-To, since it is no longer set. Mention replacement of addresses in new reports. Mention bazaar --fixes. Mention debbugs-submit administrivia setting. Mention how to test Debbugs changes. --- admin/notes/bugtracker | 58 +++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker index e253cb6d1b4..36e8604f34b 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -35,6 +35,7 @@ So you need to explicitly CC him/her (and anyone else you like). (Many people think the submitter SHOULD be automatically subscribed to subsequent discussion, but this does not seem to be implemented. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=37078) +See also http://debbugs.gnu.org/5439 Do NOT send a separate copy to the bug list, since this may generate a new report. The only time to send mail to the bug list is to create a @@ -61,18 +62,9 @@ mail with the bug report number in. If you do not do this, each reply in the subsequent discussion will end up creating a new bug. This is annoying. -Note that the way this feature works is perhaps not ideal (Bug#1720). -If X-Debbugs-CC: was specifed by a real header, that header is removed -in the mail sent out to the bug list, and the addresses merged into -the Resent-CC header (see below). They don't appear as an explicit CC: -header, nor do they appear in the Reply-To: header. So people you -X-Debbugs-CC are not included in any following discussion unless they are -manually cc'd. So this feature really only serves to notify them that -a bug has been filed. It's then up to them to follow any subsequent -discussion. - -If X-Debbugs-CC were merged into the Reply-To header, this might work -more the way people expect. +If a new report contains X-Debbugs-CC in the input, this is +converted to a real Cc header in the output. (See Bug#1720). +It is also merged into the Resent-CC header (see below). ** How does Debbugs send out mails? @@ -88,9 +80,9 @@ Resent-CC: maintainer email address, plus any X-Debbugs-CC: entries The "maintainer email address" is "bug-gnu-emacs@gnu.org" in most cases. -A new report also has: - -Mail-Followup-To: bug submitter, 123@debbugs.gnu.org +In a new report, any "bug-gnu-emacs", "emacs-pretest-bug", or +"submit@debbugs" address in the original To or Cc is replaced by +123@debbugs in the mail that gets sent out to the bug list. ** To not get acknowledgement mail from the tracker, add an "X-Debbugs-No-Ack:" header (with any value). If you use Gnus, @@ -124,10 +116,10 @@ When you close a bug, you get a message matching: ^X-Emacs-PR-Message: closed ** How to avoid multiple copies of mails. -When you reply to a bug, respect the Reply-To address, ie send mail -only to the submitter address and the numbered bug address. Do not -send mail direct to bug-gnu-emacs or emacs-pretest-bug unless you are -reporting a new bug. +If you reply to reports in the normal way, this should work fine. +Basically, reply only to the numbered bug address (and any individual +people's addresses). Do not send mail direct to bug-gnu-emacs or +emacs-pretest-bug unless you are reporting a new bug. ** To close bug #123 (for example), send mail @@ -362,7 +354,7 @@ bug number. Similarly, when you close a bug, it can be helpful to include the relevant ChangeLog entry in the message to the bug tracker, so people -can see eaxctly what the fix was. +can see exactly what the fix was. *** bug-reference-mode @@ -373,6 +365,17 @@ the bug web-pages. http://lists.gnu.org/archive/html/emacs-devel/2009-11/msg00440.html +** Bazaar stuff + +*** You can use the commit --fixes emacs:123 to mark that a commit fixes +Emacs bug 123. You will first need to add a line to your bazaar.conf +(untested): + +bugtracker_emacs_url = http://debbugs.gnu.org/{id} + +Note that all this does is add some metadata to the commit, it doesn't +actually mark the bug as closed in the tracker. + ** Gnus-specific voodoo *** Put point on a bug-number and try: M-x gnus-read-ephemeral-emacs-bug-group @@ -456,3 +459,18 @@ recipient: emacs-bug-tracker AT debbugs\.gnu\.org The latter is because that is the address that debbugs actually sends to. An /etc/aliases entry redirects it to the real emacs-bug-tracker address. + +** Administrivia + +The debbugs-submit list should have the administrivia option off, +else it can by mistake filter out requests to subscribe to bugs. +But, this feature doesn't work anyway (see bug#5439). + +** How to test changes + +Add an entry to /etc/debbugs/Maintainers like: + +mytest my.email.address + +Then if you do all your testing with 'Package: mytest', the resulting +mails should only go to your email address. From ed130eb0fe0a68f78160d194367abd15e16a9618 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 23 Jan 2010 15:18:58 -0800 Subject: [PATCH 29/36] Fix some details of previous change. --- admin/notes/bugtracker | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker index 36e8604f34b..37347903cea 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -37,9 +37,9 @@ to subsequent discussion, but this does not seem to be implemented. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=37078) See also http://debbugs.gnu.org/5439 -Do NOT send a separate copy to the bug list, since this may generate a -new report. The only time to send mail to the bug list is to create a -new report. +Do NOT send a separate copy to the bug list address, since this may +generate a new report. The only time to send mail to the bug list +address is to create a new report. Gnus users can add the following to message-dont-reply-to-names; similarly with Rmail and rmail-dont-reply-to-names: @@ -68,9 +68,14 @@ It is also merged into the Resent-CC header (see below). ** How does Debbugs send out mails? -The mails are sent out to the bug list with From: and To: unchanged. -Eg if you file a bug with "submit@debbugs.gnu.org", that -remains in the To: address. They reach the bug list by being resent. +The mails are sent out to the bug list by being resent. The From: +header is unchanged. In new reports only (at present), the To: +address is altered as follows. Any "bug-gnu-emacs", +"emacs-pretest-bug", or "submit@debbugs" address is replaced by +123@debbugs in the mail that gets sent out. (This also applies to any +Cc: header, though you should be using X-Debbugs-CC instead in new +reports). The original header is stored as X-Debbugs-Original-To, if +it was changed. Any X-Debbugs-CC is merged into the Cc. Mails arriving at the bug list have the following Resent-* headers: @@ -80,10 +85,6 @@ Resent-CC: maintainer email address, plus any X-Debbugs-CC: entries The "maintainer email address" is "bug-gnu-emacs@gnu.org" in most cases. -In a new report, any "bug-gnu-emacs", "emacs-pretest-bug", or -"submit@debbugs" address in the original To or Cc is replaced by -123@debbugs in the mail that gets sent out to the bug list. - ** To not get acknowledgement mail from the tracker, add an "X-Debbugs-No-Ack:" header (with any value). If you use Gnus, you can add an element to gnus-posting-styles to do this automatically, eg: From 741701037aa9ac7f2c79afc76003968f78050967 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 23 Jan 2010 15:25:25 -0800 Subject: [PATCH 30/36] Small fixes. --- admin/notes/bugtracker | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker index 37347903cea..30e6e86f8f9 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -59,8 +59,8 @@ reporting.) (e.g. bug-cc-mode@gnu.org), do NOT just use a Cc: header. Instead, use "X-Debbugs-CC:". This ensures the Cc address will get a mail with the bug report number in. If you do not do this, each reply -in the subsequent discussion will end up creating a new bug. This is -annoying. +in the subsequent discussion will end up creating a new bug. +This is annoying. If a new report contains X-Debbugs-CC in the input, this is converted to a real Cc header in the output. (See Bug#1720). @@ -188,8 +188,7 @@ tag:tag # all bugs with given tag See "Usertags" are very similar to tags: a set of labels that can be added -to a bug. There are two differences between normal tags and user -tags: +to a bug. There are two differences between normal tags and user tags: 1) Anyone can define any valid usertag they like. In contrast, only a limited, predefined set of normal tags are available (see above). @@ -368,7 +367,7 @@ http://lists.gnu.org/archive/html/emacs-devel/2009-11/msg00440.html ** Bazaar stuff -*** You can use the commit --fixes emacs:123 to mark that a commit fixes +*** You can use `bzr commit --fixes emacs:123' to mark that a commit fixes Emacs bug 123. You will first need to add a line to your bazaar.conf (untested): From ac59f99d910bf80135b647892636fa9a3135d55e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 23 Jan 2010 19:58:14 -0800 Subject: [PATCH 31/36] (aelement): Fix typo in previous. --- lisp/emacs-lisp/assoc.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el index 60692495776..ccab5d90c09 100644 --- a/lisp/emacs-lisp/assoc.el +++ b/lisp/emacs-lisp/assoc.el @@ -1,7 +1,7 @@ ;;; assoc.el --- insert/delete/sort functions on association lists -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 Free Software Foundation, Inc. ;; Author: Barry A. Warsaw ;; Keywords: extensions @@ -42,7 +42,7 @@ sorted list." (defun aelement (key value) "Make a list of a cons cell containing car of KEY and cdr of VALUE. -The returned list is suitable for concatanating with an existing +The returned list is suitable for concatenating with an existing alist, via `nconc'." (list (cons key value))) From bd4b5750a0b44b065ff269db274d69d110777058 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 24 Jan 2010 03:42:22 -0500 Subject: [PATCH 32/36] * keymap.c (shadow_lookup): Add `remap' arg. (describe_map, describe_vector): Update calls to shadow_lookup. (Fwhere_is_internal): Fix up handling of `remapped_sequences' and `remapped' so this flag is applicable to `sequence'. Be careful to perform remapping during shadow_lookup check of remapped_equences. --- src/ChangeLog | 8 ++++++++ src/keymap.c | 43 +++++++++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5589b7f34a2..7a2f0dad1f3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2010-01-24 Stefan Monnier + + * keymap.c (shadow_lookup): Add `remap' arg. + (describe_map, describe_vector): Update calls to shadow_lookup. + (Fwhere_is_internal): Fix up handling of `remapped_sequences' and + `remapped' so this flag is applicable to `sequence'. Be careful to + perform remapping during shadow_lookup check of remapped_equences. + 2010-01-22 YAMAMOTO Mitsuharu * lisp.h (make_pure_string): String pointer arg now points to const. diff --git a/src/keymap.c b/src/keymap.c index 17666c7efcc..98774d5d685 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2650,11 +2650,13 @@ static void where_is_internal_1 P_ ((Lisp_Object key, Lisp_Object binding, Lisp_Object args, void *data)); /* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map. - Returns the first non-nil binding found in any of those maps. */ + Returns the first non-nil binding found in any of those maps. + If REMAP is true, pass the result of the lookup through command + remapping before returning it. */ static Lisp_Object -shadow_lookup (shadow, key, flag) - Lisp_Object shadow, key, flag; +shadow_lookup (Lisp_Object shadow, Lisp_Object key, Lisp_Object flag, + int remap) { Lisp_Object tail, value; @@ -2669,7 +2671,15 @@ shadow_lookup (shadow, key, flag) return Qnil; } else if (!NILP (value)) - return value; + { + Lisp_Object remapping; + if (remap && SYMBOLP (value) + && (remapping = Fcommand_remapping (value, Qnil, shadow), + !NILP (remapping))) + return remapping; + else + return value; + } } return Qnil; } @@ -2860,30 +2870,30 @@ remapped command in the returned list. */) { /* We have a list of advertized bindings. */ while (CONSP (tem)) - if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil), definition)) + if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil, 0), definition)) return XCAR (tem); else tem = XCDR (tem); - if (EQ (shadow_lookup (keymaps, tem, Qnil), definition)) + if (EQ (shadow_lookup (keymaps, tem, Qnil, 0), definition)) return tem; } sequences = Freverse (where_is_internal (definition, keymaps, !NILP (noindirect), nomenus)); - while (CONSP (sequences)) + while (CONSP (sequences) + /* If we're at the end of the `sequences' list and we haven't + considered remapped sequences yet, copy them over and + process them. */ + || (!remapped && (sequences = remapped_sequences, + remapped = 1), + CONSP (sequences))) { Lisp_Object sequence, function; sequence = XCAR (sequences); sequences = XCDR (sequences); - if (NILP (sequences) && !remapped) - { - sequences = remapped_sequences; - remapped = 1; - } - /* Verify that this key binding is not shadowed by another binding for the same key, before we say it exists. @@ -2893,7 +2903,8 @@ remapped command in the returned list. */) Either nil or number as value from Flookup_key means undefined. */ - if (!EQ (shadow_lookup (keymaps, sequence, Qnil), definition)) + if (!EQ (shadow_lookup (keymaps, sequence, Qnil, remapped), + definition)) continue; /* If the current sequence is a command remapping with @@ -3506,7 +3517,7 @@ describe_map (map, prefix, elt_describer, partial, shadow, ASET (kludge, 0, event); if (!NILP (shadow)) { - tem = shadow_lookup (shadow, kludge, Qt); + tem = shadow_lookup (shadow, kludge, Qt, 0); if (!NILP (tem)) { /* If both bindings are keymaps, this key is a prefix key, @@ -3776,7 +3787,7 @@ describe_vector (vector, prefix, args, elt_describer, { Lisp_Object tem; - tem = shadow_lookup (shadow, kludge, Qt); + tem = shadow_lookup (shadow, kludge, Qt, 0); if (!NILP (tem)) { From 38da2cf87323c73565c5183fca151aa6f4c1bc7d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 24 Jan 2010 12:28:50 -0800 Subject: [PATCH 33/36] Add the aliases bug-emacs and bug-gnumacs. --- admin/notes/bugtracker | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker index 30e6e86f8f9..1a9f6f2bd4c 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -44,7 +44,7 @@ address is to create a new report. Gnus users can add the following to message-dont-reply-to-names; similarly with Rmail and rmail-dont-reply-to-names: -"\\(emacs-pretest-bug\\|bug-gnu-emacs\\)@gnu\\.org\\|\ +"\\(emacs-pretest-bug\\|bug-gnu-emacs\\|bug-\\(e\\|gnu\\)macs\\)@gnu\\.org\\|\ \\(submit\\|control\\|owner\\)@debbugs\\.gnu\\.org" The "owner@debbugs.gnu.org" entry is there because it appears in the @@ -451,7 +451,10 @@ needlessly held for moderation: *** debbugs-submit (quiet|control|submit)@(debbugs\.gnu\.org|emacsbugs\.donarmstrong\.com) [0-9]+(-done|-quiet|-subscribe)?@(debbugs\.gnu\.org|emacsbugs\.donarmstrong\.com) -(bug-gnu-emacs|emacs-pretest-bug)@gnu\.org +(bug-gnu-emacs|emacs-pretest-bug|bug-(e|gnu)macs)@gnu\.org + +bug-emacs and bug-gnumacs are lesser-used aliases from fencepost's +/etc/aliases file. *** emacs-bug-tracker sender: bug-gnu-emacs AT gnu.org From 51850286011bc5a11e3ea20e36985a43e03f2e44 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sun, 24 Jan 2010 13:08:53 -0800 Subject: [PATCH 34/36] (xterm-maybe-set-dark-background-mode): Rename from xterm-set-background-mode. Return t if the background mode was set. (terminal-init-xterm): Move tty-set-up-initial-frame-faces earlier, call it again in case the background mode has changed. --- lisp/ChangeLog | 8 ++++++++ lisp/term/xterm.el | 29 ++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cee15424814..bb7f2b41d11 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-01-24 Dan Nicolaescu + + * term/xterm.el (xterm-maybe-set-dark-background-mode): Rename + from xterm-set-background-mode. Return t if the background mode + was set. + (terminal-init-xterm): Move tty-set-up-initial-frame-faces + earlier, call it again in case the background mode has changed. + 2010-01-23 Dmitri Paduchikh (tiny change) * emacs-lisp/advice.el (ad-set-orig-definition): Fix typo diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 203c538609f..d881e6fcc7d 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -462,6 +462,7 @@ (set-keymap-parent input-decode-map map))) (xterm-register-default-colors) + (tty-set-up-initial-frame-faces) ;; Try to turn on the modifyOtherKeys feature on modern xterms. ;; When it is turned on many more key bindings work: things like @@ -471,6 +472,7 @@ (let ((coding-system-for-read 'binary) (chr nil) (str nil) + (recompute-faces nil) version) ;; Pending input can be mistakenly returned by the calls to ;; read-event below. Discard it. @@ -502,10 +504,11 @@ (while (not (equal (setq chr (read-event nil nil 2)) ?\\)) (setq str (concat str (string chr)))) (when (string-match "11;rgb:\\([a-f0-9]+\\)/\\([a-f0-9]+\\)/\\([a-f0-9]+\\)" str) - (xterm-set-background-mode - (string-to-number (match-string 1 str) 16) - (string-to-number (match-string 2 str) 16) - (string-to-number (match-string 3 str) 16)))))) + (setq recompute-faces + (xterm-maybe-set-dark-background-mode + (string-to-number (match-string 1 str) 16) + (string-to-number (match-string 2 str) 16) + (string-to-number (match-string 3 str) 16))))))) ;; NUMBER2 is the xterm version number, look for something ;; greater than 216, the version when modifyOtherKeys was ;; introduced. @@ -520,10 +523,16 @@ ;; need to deal with modify-other-keys. (push (frame-terminal (selected-frame)) xterm-modify-other-keys-terminal-list) - (xterm-turn-on-modify-other-keys)))))) + (xterm-turn-on-modify-other-keys)) - ;; This recomputes all the default faces given the colors we've just set up. - (tty-set-up-initial-frame-faces) + ;; Recompute faces here in case the background mode was + ;; set to dark. We used to call + ;; `tty-set-up-initial-frame-faces' only once, but that + ;; caused the light background faces to be computed + ;; incorrectly. See: + ;; http://permalink.gmane.org/gmane.emacs.devel/119627 + (when recompute-faces + (tty-set-up-initial-frame-faces)))))) (run-hooks 'terminal-init-xterm-hook)) @@ -666,11 +675,13 @@ versions of xterm." (delq terminal xterm-modify-other-keys-terminal-list)) (send-string-to-terminal "\e[>4m" terminal))) -(defun xterm-set-background-mode (redc greenc bluec) +(defun xterm-maybe-set-dark-background-mode (redc greenc bluec) ;; Use the heuristic in `frame-set-background-mode' to decide if a ;; frame is dark. (when (< (+ redc greenc bluec) (* .6 (+ 65535 65535 65535))) - (set-terminal-parameter nil 'background-mode 'dark))) + (setq xterm-background-mode-changed t) + (set-terminal-parameter nil 'background-mode 'dark) + t)) ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a ;;; xterm.el ends here From c2f1d6d81e9a513db096bb6986f284f736d55cbe Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sun, 24 Jan 2010 13:23:17 -0800 Subject: [PATCH 35/36] Remove support for adding --signoff on commit. Future support will use an incompatible generic mechanism. * vc-git.el (vc-git-add-signoff): Remove variable. (vc-git-toggle-signoff): Remove function. (vc-git-extra-menu-map): Do not bind vc-git-toggle-signoff. --- etc/NEWS | 3 --- lisp/ChangeLog | 6 ++++++ lisp/vc-git.el | 17 +---------------- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 5d1ffac8904..5eb39faf6ba 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -322,9 +322,6 @@ backends do not support this. **** The short log format for git makes use of the graph display, so it's not supported on git versions earlier than 1.5. -**** The new variable vc-git-add-signoff can be used to add a -Signed-off-by line when committing. - **** Support for operating with stashes has been added to vc-dir: the stash list is displayed in the *vc-dir* header, stashes can be created, removed, applied and their content displayed. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bb7f2b41d11..fa3761738bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2010-01-24 Dan Nicolaescu + Remove support for adding --signoff on commit. + Future support will use an incompatible generic mechanism. + * vc-git.el (vc-git-add-signoff): Remove variable. + (vc-git-toggle-signoff): Remove function. + (vc-git-extra-menu-map): Do not bind vc-git-toggle-signoff. + * term/xterm.el (xterm-maybe-set-dark-background-mode): Rename from xterm-set-background-mode. Return t if the background mode was set. diff --git a/lisp/vc-git.el b/lisp/vc-git.el index 52482d9ff4b..4896f79a395 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -118,13 +118,6 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "23.1" :group 'vc) -(defcustom vc-git-add-signoff nil - "Add a Signed-off-by line when committing." - :type 'boolean - :version "23.2" - :group 'vc) - - (defvar git-commits-coding-system 'utf-8 "Default coding system for git commits.") @@ -515,7 +508,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (defun vc-git-checkin (files rev comment) (let ((coding-system-for-write git-commits-coding-system)) (vc-git-command nil 0 files "commit" - (if vc-git-add-signoff "-s") "-m" comment "--only" "--"))) + "-m" comment "--only" "--"))) (defun vc-git-find-revision (file rev buffer) (let* (process-file-side-effects @@ -766,10 +759,6 @@ or BRANCH^ (where \"^\" can be repeated)." (define-key map [git-ss] '(menu-item "Show Stash..." vc-git-stash-show :help "Show stash contents")) - (define-key map [git-sig] - '(menu-item "Add Signed-off-by on commit" vc-git-toggle-signoff - :help "Add Add Signed-off-by when commiting (i.e. add the -s flag)" - :button (:toggle . vc-git-add-signoff))) map)) (defun vc-git-extra-menu () vc-git-extra-menu-map) @@ -779,10 +768,6 @@ or BRANCH^ (where \"^\" can be repeated)." (defun vc-git-root (file) (vc-find-root file ".git")) -(defun vc-git-toggle-signoff () - (interactive) - (setq vc-git-add-signoff (not vc-git-add-signoff))) - ;; Derived from `lgrep'. (defun vc-git-grep (regexp &optional files dir) "Run git grep, searching for REGEXP in FILES in directory DIR. From 285d07e27afc99de2562afa62c24fd5834721ed1 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 24 Jan 2010 18:03:13 -0500 Subject: [PATCH 36/36] Use png_sig_cmp to allow linking with libpng 1.4.0. * image.c (png_load): Use png_sig_cmp instead of the obsolete png_check_sig, which has been removed in libpng 1.4. --- src/ChangeLog | 5 +++++ src/image.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d20b3113ba7..00dbad31a8e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-01-24 Eric Bélanger (tiny change) + + * image.c (png_load): Use png_sig_cmp instead of the obsolete + png_check_sig, which has been removed in libpng 1.4. + 2010-01-23 Giorgos Keramidas (tiny change) * filelock.c: Include utmp.h only when HAVE_UTMP_H (FreeBSD 9.x diff --git a/src/image.c b/src/image.c index 9c11f466807..1265b900c6c 100644 --- a/src/image.c +++ b/src/image.c @@ -33,7 +33,7 @@ along with GNU Emacs. If not, see . */ #else # include #endif -#endif +#endif #include @@ -3051,7 +3051,7 @@ xbm_load (f, img) int nbytes, i; /* Windows mono bitmaps are reversed compared with X. */ invertedBits = bits; - nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR + nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR * img->height; bits = (char *) alloca(nbytes); for (i = 0; i < nbytes; i++) @@ -5559,7 +5559,7 @@ png_image_p (object) /* PNG library details. */ DEF_IMGLIB_FN (png_get_io_ptr); -DEF_IMGLIB_FN (png_check_sig); +DEF_IMGLIB_FN (png_sig_cmp); DEF_IMGLIB_FN (png_create_read_struct); DEF_IMGLIB_FN (png_create_info_struct); DEF_IMGLIB_FN (png_destroy_read_struct); @@ -5590,7 +5590,7 @@ init_png_functions (Lisp_Object libraries) return 0; LOAD_IMGLIB_FN (library, png_get_io_ptr); - LOAD_IMGLIB_FN (library, png_check_sig); + LOAD_IMGLIB_FN (library, png_sig_cmp); LOAD_IMGLIB_FN (library, png_create_read_struct); LOAD_IMGLIB_FN (library, png_create_info_struct); LOAD_IMGLIB_FN (library, png_destroy_read_struct); @@ -5615,7 +5615,7 @@ init_png_functions (Lisp_Object libraries) #else #define fn_png_get_io_ptr png_get_io_ptr -#define fn_png_check_sig png_check_sig +#define fn_png_sig_cmp png_sig_cmp #define fn_png_create_read_struct png_create_read_struct #define fn_png_create_info_struct png_create_info_struct #define fn_png_destroy_read_struct png_destroy_read_struct @@ -5762,7 +5762,7 @@ png_load (f, img) /* Check PNG signature. */ if (fread (sig, 1, sizeof sig, fp) != sizeof sig - || !fn_png_check_sig (sig, sizeof sig)) + || fn_png_sig_cmp (sig, 0, sizeof sig)) { image_error ("Not a PNG file: `%s'", file, Qnil); UNGCPRO; @@ -5779,7 +5779,7 @@ png_load (f, img) /* Check PNG signature. */ if (tbr.len < sizeof sig - || !fn_png_check_sig (tbr.bytes, sizeof sig)) + || fn_png_sig_cmp (tbr.bytes, 0, sizeof sig)) { image_error ("Not a PNG image: `%s'", img->spec, Qnil); UNGCPRO;