From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Roland McGrath Newsgroups: gmane.emacs.bugs Subject: add-change-add-log-entry regression, with fix Date: Thu, 5 Jul 2007 12:17:44 -0700 (PDT) Message-ID: <20070705191744.9D6104D0435@magilla.localdomain> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1183669126 7669 80.91.229.12 (5 Jul 2007 20:58:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jul 2007 20:58:46 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 05 22:58:45 2007 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6YPV-0006XB-8j for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jul 2007 22:58:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6YPU-0001c9-OW for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jul 2007 16:58:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6WqN-0002jF-AN for bug-gnu-emacs@gnu.org; Thu, 05 Jul 2007 15:18:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I6WqM-0002ir-KO for bug-gnu-emacs@gnu.org; Thu, 05 Jul 2007 15:18:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6WqM-0002io-DK for bug-gnu-emacs@gnu.org; Thu, 05 Jul 2007 15:18:22 -0400 Original-Received: from sccrmhc13.comcast.net ([204.127.200.83]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I6WqM-0006od-30 for bug-gnu-emacs@gnu.org; Thu, 05 Jul 2007 15:18:22 -0400 Original-Received: from gateway.sf.frob.com (c-69-181-208-57.hsd1.ca.comcast.net[69.181.208.57]) by comcast.net (sccrmhc13) with ESMTP id <20070705191745013005la76e>; Thu, 5 Jul 2007 19:17:45 +0000 Original-Received: from magilla.localdomain (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id C83EF357B; Thu, 5 Jul 2007 12:17:44 -0700 (PDT) Original-Received: by magilla.localdomain (Postfix, from userid 5281) id 9D6104D0435; Thu, 5 Jul 2007 12:17:44 -0700 (PDT) X-Zippy-Says: Yow! Legally-imposed CULTURE-reduction is CABBAGE-BRAINED! X-detected-kernel: NetCache Data OnTap 5.x X-Mailman-Approved-At: Thu, 05 Jul 2007 16:58:08 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16087 Archived-At: Before version 22, a function on change-log-mode-hook could set add-log-mailing-address or add-log-full-name as a buffer-local variable in the change-log-mode buffer and have this affect what add-change-add-log-entry inserted in the buffer. In 22, this is broken. This patch restores the behavior that hooks have been able to rely on since 18. Thanks, Roland --- add-log.el.orig 2007-07-05 12:15:24.000000000 -0700 +++ add-log.el 2007-07-05 12:15:05.000000000 -0700 @@ -509,19 +509,19 @@ non-nil, otherwise in local time." (file-name (expand-file-name (find-change-log file-name buffer-file))) ;; Set ITEM to the file name to use in the new item. (item (add-log-file-name buffer-file file-name)) - bound - (full-name (or add-log-full-name (user-full-name))) - (mailing-address (or add-log-mailing-address user-mail-address))) + bound full-name mailing-address) (if whoami (progn - (setq full-name (read-string "Full name: " full-name)) + (setq full-name (read-string "Full name: " + (or add-log-full-name (user-full-name)))) ;; Note that some sites have room and phone number fields in ;; full name which look silly when inserted. Rather than do ;; anything about that here, let user give prefix argument so that ;; s/he can edit the full name field in prompter if s/he wants. (setq mailing-address - (read-string "Mailing address: " mailing-address)))) + (read-string "Mailing address: " + (or add-log-mailing-address user-mail-address))))) (unless (equal file-name buffer-file-name) (if (or other-window (window-dedicated-p (selected-window))) @@ -532,6 +532,11 @@ non-nil, otherwise in local time." (undo-boundary) (goto-char (point-min)) + (or full-name + (setq full-name (or add-log-full-name (user-full-name)))) + (or mailing-address + (setq mailing-address (or add-log-mailing-address user-mail-address))) + ;; If file starts with a copyright and permission notice, skip them. ;; Assume they end at first blank line. (when (looking-at "Copyright")