From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.bugs Subject: bug#18730: [PATCHv2 1/2] tildify.el (tildify--pick-alist-entry): rename from tildify-mode-alist. Date: Thu, 16 Oct 2014 17:34:11 +0200 Message-ID: <1413473652-26262-1-git-send-email-mina86@mina86.com> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1413473724 28485 80.91.229.3 (16 Oct 2014 15:35:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2014 15:35:24 +0000 (UTC) Cc: Milan Zamazal To: Stefan Monnier , 18730@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 16 17:35:16 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xen5A-0007YY-9c for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Oct 2014 17:35:16 +0200 Original-Received: from localhost ([::1]:50912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xen59-0002DS-UC for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Oct 2014 11:35:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xen52-0002BF-Nq for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 11:35:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xen4x-0003CY-T2 for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 11:35:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xen4x-0003C9-PS for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 11:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xen4x-0001Vz-4b for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 11:35:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michal Nazarewicz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Oct 2014 15:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18730 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 18730-submit@debbugs.gnu.org id=B18730.14134736635740 (code B ref 18730); Thu, 16 Oct 2014 15:35:03 +0000 Original-Received: (at 18730) by debbugs.gnu.org; 16 Oct 2014 15:34:23 +0000 Original-Received: from localhost ([127.0.0.1]:46113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xen4I-0001UO-UQ for submit@debbugs.gnu.org; Thu, 16 Oct 2014 11:34:23 -0400 Original-Received: from mail-wi0-f201.google.com ([209.85.212.201]:56205) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xen4G-0001UE-R7 for 18730@debbugs.gnu.org; Thu, 16 Oct 2014 11:34:21 -0400 Original-Received: by mail-wi0-f201.google.com with SMTP id hi2so290352wib.0 for <18730@debbugs.gnu.org>; Thu, 16 Oct 2014 08:34:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GcDfGMCCztorkdQimR9oR/5bjfF61SwTd2YxgBQVcAg=; b=idurbar0AXL486Qw6sg/je+asM0CkRhPX4jukiPoxu2uvoDyOGO9AFZQaj+WDVb8Pd ZFKgoZP3Yazops1D/Rgfs3uOkA6YdAWNP4N/Bj1uOGEU6ktj3yO/oqdA273aNiouY1sP YIM92XoIIh9T+PYWIWsMqQrfQHI9joy8GKLhguEvRBDkMXVIfTrxAQmcNJXEVezoKMFH 2XzvjgYkGjA9DtS/y1QYE6sJJP4bw5ws26Hn9sTQzbjz0gjZPlTo2RMK+mGi8GZoutQt exd1l6Fz0B1jM0fTxVS0IBpuxT7rUUzQVuXEjzjX4h9pCVXEEVJvzrTRU1pI9igFPnO5 iPKg== X-Gm-Message-State: ALoCoQkncXvDPvKVOCCj4pqLfocd2DMmiT8VglylJq0hXbJ2dRSJkDw+gadHPTGIQQ5NxW8dhxwuF9LlS6jjV2hIwKqe4gQtg1VCtIkH5f5gmx3H8JhbLGVPpvxdLm0x4CJF4m+Veu7XUQWfaO+4c8SN/ClAs8RXeQDqwEbqJhjqJx+1IXrdAWo= X-Received: by 10.181.11.130 with SMTP id ei2mr1070442wid.3.1413473660112; Thu, 16 Oct 2014 08:34:20 -0700 (PDT) Original-Received: from corpmail-nozzle1-2.eem.corp.google.com (corpmail-nozzle1-2.eem.corp.google.com. [172.25.144.13]) by gmr-mx.google.com with ESMTPS id u2si119766wiw.0.2014.10.16.08.34.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Oct 2014 08:34:20 -0700 (PDT) Original-Received: from mpn.zrh.corp.google.com ([172.16.113.113]) by corpmail-nozzle1-2.eem.corp.google.com with ESMTP id HWH2dIQm.1; Thu, 16 Oct 2014 08:34:20 -0700 Original-Received: by mpn.zrh.corp.google.com (Postfix, from userid 126942) id 99A911E01E9; Thu, 16 Oct 2014 17:34:19 +0200 (CEST) X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94630 tildify-mode-alist does not really describe what the functino does so rename it to tildify--pick-alist-entry. This also makes it clear that the function is an internal one. --- lisp/textmodes/tildify.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el index 50fee2f..91f5a38 100644 --- a/lisp/textmodes/tildify.el +++ b/lisp/textmodes/tildify.el @@ -4,7 +4,7 @@ ;; Author: Milan Zamazal ;; Michal Nazarewicz -;; Version: 4.5.3 +;; Version: 4.5.4 ;; Keywords: text, TeX, SGML, wp ;; This file is part of GNU Emacs. @@ -226,13 +226,13 @@ won't be prompted for confirmation of each substitution." ;;; *** Auxiliary functions *** -(defun tildify-mode-alist (mode-alist &optional mode) +(defun tildify--pick-alist-entry (mode-alist &optional mode) "Return alist item for the MODE-ALIST in the current major MODE." (let ((alist (cdr (or (assoc (or mode major-mode) mode-alist) (assoc t mode-alist))))) (if (and alist (symbolp alist)) - (tildify-mode-alist mode-alist alist) + (tildify--pick-alist-entry mode-alist alist) alist))) (defun tildify-foreach-region-outside-env (beg end callback) @@ -244,7 +244,7 @@ arguments specifying the region to operate on. Stop scanning the region as soon as CALLBACK returns nil. Environments to ignore are determined from `tildify-ignored-environments-alist'." (declare (indent 2)) - (let ((pairs (tildify-mode-alist tildify-ignored-environments-alist))) + (let ((pairs (tildify--pick-alist-entry tildify-ignored-environments-alist))) (if (not pairs) (funcall callback beg end) (let ((func (lambda (b e) @@ -300,10 +300,10 @@ replacements done and response is one of symbols: t (all right), nil (quit), force (replace without further questions)." (save-excursion (goto-char beg) - (let* ((alist (tildify-mode-alist tildify-pattern-alist)) + (let* ((alist (tildify--pick-alist-entry tildify-pattern-alist)) (regexp (car alist)) (match-number (cadr alist)) - (tilde (tildify-mode-alist tildify-string-alist)) + (tilde (tildify--pick-alist-entry tildify-string-alist)) (end-marker (copy-marker end)) answer bad-answer -- 2.1.0.rc2.206.gedb03e5