From: Glenn Morris Date: Sat, 6 Nov 2010 19:28:44 +0000 (-0700) Subject: Silence mail-extr compilation. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~360 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0e4bb7f0ce542c7b10bdf960be5cb52e95640af6;p=emacs.git Silence mail-extr compilation. * lisp/mail/mail-extr.el (mail-extract-address-components): Give dynamic local variables `cbeg' and `cend' a prefix. (mail-extr-voodoo): Update for above name change. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31771b2a4e4..b7cc8d772f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2010-11-06 Glenn Morris + * mail/mail-extr.el (mail-extract-address-components): Give dynamic + local variables `cbeg' and `cend' a prefix. + (mail-extr-voodoo): Update for above name change. + * textmodes/reftex-toc.el (reftex-toc-do-promote) (reftex-toc-promote-prepare): Pass `delta' as an explicit argument. (reftex-toc-promote-action): Doc fix. diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 342d735c939..9b958e41b05 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -1,7 +1,8 @@ ;;; mail-extr.el --- extract full name and address from RFC 822 mail header -*- coding: utf-8 -*- ;; Copyright (C) 1991, 1992, 1993, 1994, 1997, 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: Joe Wells ;; Maintainer: FSF @@ -691,8 +692,8 @@ Unless NO-REPLACE is true, at each of the positions in LIST-SYMBOL ;; (defvar disable-initial-guessing-flag) ; dynamic assignment -(defvar cbeg) ; dynamic assignment -(defvar cend) ; dynamic assignment +(defvar mailextr-cbeg) ; dynamic assignment +(defvar mailextr-cend) ; dynamic assignment (defvar mail-extr-all-top-level-domains) ; Defined below. ;;;###autoload @@ -762,7 +763,8 @@ consing a string.)" record-pos-symbol first-real-pos last-real-pos phrase-beg phrase-end - cbeg cend ; dynamically set from -voodoo + ;; Dynamically set in mail-extr-voodoo. + mailextr-cbeg mailextr-cend quote-beg quote-end atom-beg atom-end mbox-beg mbox-end @@ -796,19 +798,19 @@ consing a string.)" ((eq char ?\() (set-syntax-table mail-extr-address-comment-syntax-table) ;; only record the first non-empty comment's position - (if (and (not cbeg) + (if (and (not mailextr-cbeg) (save-excursion (forward-char 1) (mail-extr-skip-whitespace-forward) (not (eq ?\) (char-after (point)))))) - (setq cbeg (point))) + (setq mailextr-cbeg (point))) ;; TODO: don't record if unbalanced (or (mail-extr-safe-move-sexp 1) (forward-char 1)) (set-syntax-table mail-extr-address-syntax-table) - (if (and cbeg - (not cend)) - (setq cend (point)))) + (if (and mailextr-cbeg + (not mailextr-cend)) + (setq mailextr-cend (point)))) ;; quoted text ((eq char ?\") ;; only record the first non-empty quote's position @@ -994,10 +996,10 @@ consing a string.)" (> last-real-pos (1+ group-\;-pos)) (setq last-real-pos (1+ group-\;-pos))) ;; *** This may be wrong: - (and cend - (> cend group-\;-pos) - (setq cend nil - cbeg nil)) + (and mailextr-cend + (> mailextr-cend group-\;-pos) + (setq mailextr-cend nil + mailextr-cbeg nil)) (and quote-end (> quote-end group-\;-pos) (setq quote-end nil @@ -1228,8 +1230,8 @@ consing a string.)" (narrow-to-region phrase-beg phrase-end)) ;; Example: fml@foo.bar.dom (First M. Last) - (cbeg - (narrow-to-region (1+ cbeg) (1- cend)) + (mailextr-cbeg + (narrow-to-region (1+ mailextr-cbeg) (1- mailextr-cend)) (mail-extr-undo-backslash-quoting (point-min) (point-max)) ;; Deal with spacing problems @@ -1472,7 +1474,6 @@ place. It affects how `mail-extract-address-components' works." (case-fold-search nil) mixed-case-flag lower-case-flag ;;upper-case-flag suffix-flag last-name-comma-flag - ;;cbeg cend initial begin-again-flag drop-this-word-if-trailing-flag @@ -1618,7 +1619,7 @@ place. It affects how `mail-extract-address-components' works." ;; Delete parenthesized/quoted comment/nickname ((memq (following-char) '(?\( ?\{ ?\[ ?\" ?\' ?\`)) - (setq cbeg (point)) + (setq mailextr-cbeg (point)) (set-syntax-table mail-extr-address-text-comment-syntax-table) (cond ((memq (following-char) '(?\' ?\`)) (or (search-forward "'" nil t @@ -1628,23 +1629,23 @@ place. It affects how `mail-extract-address-components' works." (or (mail-extr-safe-move-sexp 1) (goto-char (point-max))))) (set-syntax-table mail-extr-address-text-syntax-table) - (setq cend (point)) + (setq mailextr-cend (point)) (cond ;; Handle case of entire name being quoted ((and (eq word-count 0) (looking-at " *\\'") - (>= (- cend cbeg) 2)) - (narrow-to-region (1+ cbeg) (1- cend)) + (>= (- mailextr-cend mailextr-cbeg) 2)) + (narrow-to-region (1+ mailextr-cbeg) (1- mailextr-cend)) (goto-char (point-min))) (t ;; Handle case of quoted initial - (if (and (or (= 3 (- cend cbeg)) - (and (= 4 (- cend cbeg)) - (eq ?. (char-after (+ 2 cbeg))))) + (if (and (or (= 3 (- mailextr-cend mailextr-cbeg)) + (and (= 4 (- mailextr-cend mailextr-cbeg)) + (eq ?. (char-after (+ 2 mailextr-cbeg))))) (not (looking-at " *\\'"))) - (setq initial (char-after (1+ cbeg))) + (setq initial (char-after (1+ mailextr-cbeg))) (setq initial nil)) - (delete-region cbeg cend) + (delete-region mailextr-cbeg mailextr-cend) (if initial (insert initial ". "))))) @@ -2174,5 +2175,4 @@ place. It affects how `mail-extract-address-components' works." (provide 'mail-extr) -;; arch-tag: 7785fade-1073-4ed6-b4f6-28db34a7982d ;;; mail-extr.el ends here