GNU bug report logs -
#13005
24.2.50; table.el not working with lexical-binding
Previous Next
Reported by: Andreas Politz <politza <at> fh-trier.de>
Date: Mon, 26 Nov 2012 23:50:02 UTC
Severity: normal
Found in version 24.2.50
Fixed in version 24.3
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13005 in the body.
You can then email your comments to 13005 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13005
; Package
emacs
.
(Mon, 26 Nov 2012 23:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Politz <politza <at> fh-trier.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 26 Nov 2012 23:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
emacs -Q
M-x table-insert 5xRET
Debugger entered--Lisp error: (void-variable columns)
symbol-value(columns)
After (setq lexical-binding nil) and reloading the function it works
fine.
-ap
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13005
; Package
emacs
.
(Tue, 27 Nov 2012 02:10:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 13005 <at> debbugs.gnu.org (full text, mbox):
> emacs -Q
> M-x table-insert 5xRET
> Debugger entered--Lisp error: (void-variable columns)
> symbol-value(columns)
> After (setq lexical-binding nil) and reloading the function it works
> fine.
Indeed, thanks. I installed the patch below in the emacs-24 branch
which will fix this bug (it also fixes a few long lines, tho very few
compared to how many remain).
Stefan
=== modified file 'lisp/textmodes/table.el'
--- lisp/textmodes/table.el 2012-10-02 03:46:08 +0000
+++ lisp/textmodes/table.el 2012-11-27 01:51:52 +0000
@@ -1570,8 +1570,7 @@
Inside a table cell has a special keymap.
-\\{table-cell-map}
-"
+\\{table-cell-map}"
(interactive
(progn
(barf-if-buffer-read-only)
@@ -1583,41 +1582,47 @@
("Cell width(s)" . table-cell-width-history)
("Cell height(s)" . table-cell-height-history)))))
(table--make-cell-map)
- ;; reform the arguments.
+ ;; Reform the arguments.
(if (null cell-width) (setq cell-width (car table-cell-width-history)))
(if (null cell-height) (setq cell-height (car table-cell-height-history)))
(if (stringp columns) (setq columns (string-to-number columns)))
(if (stringp rows) (setq rows (string-to-number rows)))
- (if (stringp cell-width) (setq cell-width (table--string-to-number-list cell-width)))
- (if (stringp cell-height) (setq cell-height (table--string-to-number-list cell-height)))
+ (if (stringp cell-width)
+ (setq cell-width (table--string-to-number-list cell-width)))
+ (if (stringp cell-height)
+ (setq cell-height (table--string-to-number-list cell-height)))
(if (numberp cell-width) (setq cell-width (cons cell-width nil)))
(if (numberp cell-height) (setq cell-height (cons cell-height nil)))
- ;; test validity of the arguments.
- (mapc (lambda (arg)
- (let* ((value (symbol-value arg))
+ ;; Test validity of the arguments.
+ (dolist (arg `((columns . ,columns)
+ (rows . ,rows)
+ (cell-width . ,cell-width)
+ (cell-height . ,cell-height)))
+ (let* ((value (cdr arg))
(error-handler
- (function (lambda ()
- (error "%s must be a positive integer%s" arg
- (if (listp value) " or a list of positive integers" ""))))))
+ (lambda ()
+ (error "%s must be a positive integer%s" (car arg)
+ (if (listp value)
+ " or a list of positive integers" "")))))
(if (null value) (funcall error-handler))
- (mapcar (function (lambda (arg1)
+ (dolist (arg1 (if (listp value) value
+ (cons value nil)))
(if (or (not (integerp arg1))
(< arg1 1))
- (funcall error-handler))))
- (if (listp value) value
- (cons value nil)))))
- '(columns rows cell-width cell-height))
+ (funcall error-handler)))))
(let ((orig-coord (table--get-coordinate))
(coord (table--get-coordinate))
r i cw ch cell-str border-str)
- ;; prefabricate the building blocks border-str and cell-str.
+ ;; Prefabricate the building blocks border-str and cell-str.
(with-temp-buffer
- ;; construct border-str
+ ;; Construct border-str.
(insert table-cell-intersection-char)
(setq cw cell-width)
(setq i 0)
(while (< i columns)
- (insert (make-string (car cw) (string-to-char table-cell-horizontal-chars)) table-cell-intersection-char)
+ (insert (make-string (car cw)
+ (string-to-char table-cell-horizontal-chars))
+ table-cell-intersection-char)
(if (cdr cw) (setq cw (cdr cw)))
(setq i (1+ i)))
(setq border-str (buffer-substring (point-min) (point-max)))
bug marked as fixed in version 24.3, send any further explanations to
13005 <at> debbugs.gnu.org and Andreas Politz <politza <at> fh-trier.de>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 27 Nov 2012 16:39:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 26 Dec 2012 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.