[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ascii-art-to-unicode 42f07bc 04/42: [aa2u] Fix bug: Ma
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ascii-art-to-unicode 42f07bc 04/42: [aa2u] Fix bug: Make ‘M-x aa2u’ operate on accessible portion. |
Date: |
Sun, 29 Nov 2020 18:57:03 -0500 (EST) |
branch: externals/ascii-art-to-unicode
commit 42f07bceb096b1d254be43e3480a168327192d6d
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[aa2u] Fix bug: Make ‘M-x aa2u’ operate on accessible portion.
Regression introduced 2014-04-03, "Make ‘aa2u’ region-aware".
* packages/ascii-art-to-unicode/ascii-art-to-unicode.el (aa2u):
Take optional arg INTERACTIVE; add "p" to ‘interactive’ form;
when INTERACTIVE and region is not active, set BEG, END.
---
ascii-art-to-unicode.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/ascii-art-to-unicode.el b/ascii-art-to-unicode.el
index 894187e..cd3126d 100644
--- a/ascii-art-to-unicode.el
+++ b/ascii-art-to-unicode.el
@@ -231,7 +231,7 @@ Their values are STRINGIFIER and COMPONENTS, respectively."
;;; command
;;;###autoload
-(defun aa2u (beg end)
+(defun aa2u (beg end &optional interactive)
"Convert simple ASCII art line drawings to Unicode.
Specifically, perform the following replacements:
@@ -259,7 +259,15 @@ south, east and west neighbors.
This command operates on either the active region,
or the accessible portion otherwise."
- (interactive "r")
+ (interactive "r\np")
+ ;; This weirdness, along w/ the undocumented "p" in the ‘interactive’
+ ;; form, is to allow ‘M-x aa2u’ (interactive invocation) w/ no region
+ ;; selected to default to the accessible portion (as documented), which
+ ;; was the norm in ascii-art-to-unicode.el prior to 1.5. A bugfix,
+ ;; essentially. This is ugly, unfortunately -- is there a better way?!
+ (when (and interactive (not (region-active-p)))
+ (setq beg (point-min)
+ end (point-max)))
(save-excursion
(save-restriction
(widen)
- [elpa] branch externals/ascii-art-to-unicode created (now 46e24a6), Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode f319591 01/42: New package: ascii-art-to-unicode, Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode 1e682b8 02/42: [aa2u] Make ‘aa2u’ region-aware., Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode 42f07bc 04/42: [aa2u] Fix bug: Make ‘M-x aa2u’ operate on accessible portion.,
Stefan Monnier <=
- [elpa] externals/ascii-art-to-unicode fc130df 05/42: [aa2u] Release: 1.6, Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode 1a107c7 06/42: [aa2u maint] Extract NEWS and HACKING to separate files; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode 80b9003 08/42: [aa2u int] Don't use ‘cl-labels’ when ‘cl-flet*’ will do., Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode 6b628eb 14/42: [aa2u] New command: aa2u-rectangle, Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode 45094de 11/42: [aa2u maint] Update HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode 119855b 15/42: [aa2u] Release: 1.7, Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode dfc56c7 18/42: [aa2u int] Add abstraction: gsr, Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode c25476c 19/42: [aa2u] New command: aa2u-mark-as-text, Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode b9fcf21 21/42: [aa2u maint] Mention TAB infelicity in HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/ascii-art-to-unicode 01635f7 07/42: [aa2u int] Add "Tip Jar" URL in Commentary; nfc., Stefan Monnier, 2020/11/29