aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Nazarewicz2014-10-17 09:20:51 +0200
committerMichal Nazarewicz2014-10-17 09:20:51 +0200
commite31f014c0fdc15d629913e7bb7959e15fa3d8bc1 (patch)
treefb554c5d2e3332083ccb20afc9947f77a3e361cf
parent942501730f55719f1d3cda9f476e00f5c497259c (diff)
downloademacs-e31f014c0fdc15d629913e7bb7959e15fa3d8bc1.tar.gz
emacs-e31f014c0fdc15d629913e7bb7959e15fa3d8bc1.zip
tildify.el (tildify--pick-alist-entry): rename from tildify-mode-alist
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.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/tildify.el12
2 files changed, 11 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b69ab31db3d..c7678bc2e3c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-06-05 Michal Nazarewicz <mina86@mina86.com>
2
3 * textmodes/tildify.el (tildify--pick-alist-entry): rename from
4 tildify-mode-alist.
5
12014-10-17 Stefan Monnier <monnier@iro.umontreal.ca> 62014-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * emacs-lisp/eieio.el: Use lexical-binding drop non-GV fallback. 8 * emacs-lisp/eieio.el: Use lexical-binding drop non-GV fallback.
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index 50fee2f4b84..91f5a38ce0b 100644
--- a/lisp/textmodes/tildify.el
+++ b/lisp/textmodes/tildify.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Milan Zamazal <pdm@zamazal.org> 5;; Author: Milan Zamazal <pdm@zamazal.org>
6;; Michal Nazarewicz <mina86@mina86.com> 6;; Michal Nazarewicz <mina86@mina86.com>
7;; Version: 4.5.3 7;; Version: 4.5.4
8;; Keywords: text, TeX, SGML, wp 8;; Keywords: text, TeX, SGML, wp
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -226,13 +226,13 @@ won't be prompted for confirmation of each substitution."
226 226
227;;; *** Auxiliary functions *** 227;;; *** Auxiliary functions ***
228 228
229(defun tildify-mode-alist (mode-alist &optional mode) 229(defun tildify--pick-alist-entry (mode-alist &optional mode)
230 "Return alist item for the MODE-ALIST in the current major MODE." 230 "Return alist item for the MODE-ALIST in the current major MODE."
231 (let ((alist (cdr (or (assoc (or mode major-mode) mode-alist) 231 (let ((alist (cdr (or (assoc (or mode major-mode) mode-alist)
232 (assoc t mode-alist))))) 232 (assoc t mode-alist)))))
233 (if (and alist 233 (if (and alist
234 (symbolp alist)) 234 (symbolp alist))
235 (tildify-mode-alist mode-alist alist) 235 (tildify--pick-alist-entry mode-alist alist)
236 alist))) 236 alist)))
237 237
238(defun tildify-foreach-region-outside-env (beg end callback) 238(defun tildify-foreach-region-outside-env (beg end callback)
@@ -244,7 +244,7 @@ arguments specifying the region to operate on. Stop scanning the
244region as soon as CALLBACK returns nil. Environments to ignore 244region as soon as CALLBACK returns nil. Environments to ignore
245are determined from `tildify-ignored-environments-alist'." 245are determined from `tildify-ignored-environments-alist'."
246 (declare (indent 2)) 246 (declare (indent 2))
247 (let ((pairs (tildify-mode-alist tildify-ignored-environments-alist))) 247 (let ((pairs (tildify--pick-alist-entry tildify-ignored-environments-alist)))
248 (if (not pairs) 248 (if (not pairs)
249 (funcall callback beg end) 249 (funcall callback beg end)
250 (let ((func (lambda (b e) 250 (let ((func (lambda (b e)
@@ -300,10 +300,10 @@ replacements done and response is one of symbols: t (all right), nil
300(quit), force (replace without further questions)." 300(quit), force (replace without further questions)."
301 (save-excursion 301 (save-excursion
302 (goto-char beg) 302 (goto-char beg)
303 (let* ((alist (tildify-mode-alist tildify-pattern-alist)) 303 (let* ((alist (tildify--pick-alist-entry tildify-pattern-alist))
304 (regexp (car alist)) 304 (regexp (car alist))
305 (match-number (cadr alist)) 305 (match-number (cadr alist))
306 (tilde (tildify-mode-alist tildify-string-alist)) 306 (tilde (tildify--pick-alist-entry tildify-string-alist))
307 (end-marker (copy-marker end)) 307 (end-marker (copy-marker end))
308 answer 308 answer
309 bad-answer 309 bad-answer