Subject: bug#17088: closed (Re: bug#17088: 24.3.50; align-region : Wrong type argument: markerp, nil)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 24 Mar 2014 16:57:03 +0000

Your bug report

#17088: 24.3.50; align-region : Wrong type argument: markerp, nil

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17088: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17088
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17088: 24.3.50; align-region : Wrong type argument: markerp, nil
From: Juanma Barranquero <[email-masked]>
To: Nicolas Richard <[email-masked]>
Cc: [email-masked]
Date: Mon, 24 Mar 2014 17:55:55 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.3.50

> -    (set-marker end-mark nil)
> +    (when end-mark (set-marker end-mark nil))

Committed, thanks.

Subject: 24.3.50; align-region : Wrong type argument: markerp, nil
From: Nicolas Richard <[email-masked]>
To: [email-masked]
Date: Mon, 24 Mar 2014 17:29:25 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Doing this:
$ emacs -Q -f message-mode -f align-current
results in an error :
Wrong type argument: markerp, nil

This is a fix :

>From 38914dac908c21c090db2a92df6a696d3b252ebf Mon Sep 17 00:00:00 2001
From: Nicolas Richard <[email-masked]>
Date: Mon, 24 Mar 2014 17:23:07 +0100
Subject: [PATCH] align.el (align-region): Do not fail when end-mark is nil.

---
 lisp/ChangeLog | 3 +++
 lisp/align.el  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0c8c2cc..4a1290c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,6 @@
+2014-03-24  Nicolas Richard  <[email-masked]>
+
+	* align.el (align-region): Do not fail when end-mark is nil.
 2014-03-24  Dmitry Gutov  <[email-masked]>
 
 	* progmodes/ruby-mode.el (ruby-expression-expansion-re):
diff --git a/lisp/align.el b/lisp/align.el
index 9038adf..3b54aba 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -1603,7 +1603,7 @@ aligner would have dealt with are."
 	    rule-index (1+ rule-index)))
     ;; This function can use a lot of temporary markers, so instead of
     ;; waiting for the next GC we delete them immediately (Bug#10047).
-    (set-marker end-mark nil)
+    (when end-mark (set-marker end-mark nil))
     (dolist (m markers)
       (set-marker m nil))
 
-- 
1.8.3.2

-- 
Nico.