diff options
| author | Stefan Monnier | 2012-11-26 21:06:19 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2012-11-26 21:06:19 -0500 |
| commit | 369f945d0b71738812f237123dbe24938d65999e (patch) | |
| tree | 35b4a76b55adb33859bda419c5e2e0caf87ff2d1 | |
| parent | 999e745ef7ada0fcecd687fb7595e794577fa6ec (diff) | |
| download | emacs-369f945d0b71738812f237123dbe24938d65999e.tar.gz emacs-369f945d0b71738812f237123dbe24938d65999e.zip | |
* lisp/textmodes/table.el (table-insert): Don't use `symbol-name' on
lexically scoped variables.
Fixes: debbugs:13005
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/textmodes/table.el | 51 |
2 files changed, 35 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d0c29dab0d8..79028d68f73 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-11-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * textmodes/table.el (table-insert): Don't use `symbol-name' on | ||
| 4 | lexically scoped variables (bug#13005). | ||
| 5 | |||
| 1 | 2012-11-26 Glenn Morris <rgm@gnu.org> | 6 | 2012-11-26 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * vc/vc-hooks.el (vc-mistrust-permissions): | 8 | * vc/vc-hooks.el (vc-mistrust-permissions): |
| @@ -27,8 +32,8 @@ | |||
| 27 | 32 | ||
| 28 | 2012-11-25 Eli Zaretskii <eliz@gnu.org> | 33 | 2012-11-25 Eli Zaretskii <eliz@gnu.org> |
| 29 | 34 | ||
| 30 | * descr-text.el (describe-char-padded-string): Call | 35 | * descr-text.el (describe-char-padded-string): |
| 31 | internal-char-font only on GUI frames. (Bug#11964) | 36 | Call internal-char-font only on GUI frames. (Bug#11964) |
| 32 | 37 | ||
| 33 | 2012-11-24 Andreas Schwab <schwab@linux-m68k.org> | 38 | 2012-11-24 Andreas Schwab <schwab@linux-m68k.org> |
| 34 | 39 | ||
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 3d9f88a43c9..69762ce2a26 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el | |||
| @@ -1570,8 +1570,7 @@ results. | |||
| 1570 | 1570 | ||
| 1571 | Inside a table cell has a special keymap. | 1571 | Inside a table cell has a special keymap. |
| 1572 | 1572 | ||
| 1573 | \\{table-cell-map} | 1573 | \\{table-cell-map}" |
| 1574 | " | ||
| 1575 | (interactive | 1574 | (interactive |
| 1576 | (progn | 1575 | (progn |
| 1577 | (barf-if-buffer-read-only) | 1576 | (barf-if-buffer-read-only) |
| @@ -1583,41 +1582,47 @@ Inside a table cell has a special keymap. | |||
| 1583 | ("Cell width(s)" . table-cell-width-history) | 1582 | ("Cell width(s)" . table-cell-width-history) |
| 1584 | ("Cell height(s)" . table-cell-height-history))))) | 1583 | ("Cell height(s)" . table-cell-height-history))))) |
| 1585 | (table--make-cell-map) | 1584 | (table--make-cell-map) |
| 1586 | ;; reform the arguments. | 1585 | ;; Reform the arguments. |
| 1587 | (if (null cell-width) (setq cell-width (car table-cell-width-history))) | 1586 | (if (null cell-width) (setq cell-width (car table-cell-width-history))) |
| 1588 | (if (null cell-height) (setq cell-height (car table-cell-height-history))) | 1587 | (if (null cell-height) (setq cell-height (car table-cell-height-history))) |
| 1589 | (if (stringp columns) (setq columns (string-to-number columns))) | 1588 | (if (stringp columns) (setq columns (string-to-number columns))) |
| 1590 | (if (stringp rows) (setq rows (string-to-number rows))) | 1589 | (if (stringp rows) (setq rows (string-to-number rows))) |
| 1591 | (if (stringp cell-width) (setq cell-width (table--string-to-number-list cell-width))) | 1590 | (if (stringp cell-width) |
| 1592 | (if (stringp cell-height) (setq cell-height (table--string-to-number-list cell-height))) | 1591 | (setq cell-width (table--string-to-number-list cell-width))) |
| 1592 | (if (stringp cell-height) | ||
| 1593 | (setq cell-height (table--string-to-number-list cell-height))) | ||
| 1593 | (if (numberp cell-width) (setq cell-width (cons cell-width nil))) | 1594 | (if (numberp cell-width) (setq cell-width (cons cell-width nil))) |
| 1594 | (if (numberp cell-height) (setq cell-height (cons cell-height nil))) | 1595 | (if (numberp cell-height) (setq cell-height (cons cell-height nil))) |
| 1595 | ;; test validity of the arguments. | 1596 | ;; Test validity of the arguments. |
| 1596 | (mapc (lambda (arg) | 1597 | (dolist (arg `((columns . ,columns) |
| 1597 | (let* ((value (symbol-value arg)) | 1598 | (rows . ,rows) |
| 1598 | (error-handler | 1599 | (cell-width . ,cell-width) |
| 1599 | (function (lambda () | 1600 | (cell-height . ,cell-height))) |
| 1600 | (error "%s must be a positive integer%s" arg | 1601 | (let* ((value (cdr arg)) |
| 1601 | (if (listp value) " or a list of positive integers" "")))))) | 1602 | (error-handler |
| 1602 | (if (null value) (funcall error-handler)) | 1603 | (lambda () |
| 1603 | (mapcar (function (lambda (arg1) | 1604 | (error "%s must be a positive integer%s" (car arg) |
| 1604 | (if (or (not (integerp arg1)) | 1605 | (if (listp value) |
| 1605 | (< arg1 1)) | 1606 | " or a list of positive integers" ""))))) |
| 1606 | (funcall error-handler)))) | 1607 | (if (null value) (funcall error-handler)) |
| 1607 | (if (listp value) value | 1608 | (dolist (arg1 (if (listp value) value |
| 1608 | (cons value nil))))) | 1609 | (cons value nil))) |
| 1609 | '(columns rows cell-width cell-height)) | 1610 | (if (or (not (integerp arg1)) |
| 1611 | (< arg1 1)) | ||
| 1612 | (funcall error-handler))))) | ||
| 1610 | (let ((orig-coord (table--get-coordinate)) | 1613 | (let ((orig-coord (table--get-coordinate)) |
| 1611 | (coord (table--get-coordinate)) | 1614 | (coord (table--get-coordinate)) |
| 1612 | r i cw ch cell-str border-str) | 1615 | r i cw ch cell-str border-str) |
| 1613 | ;; prefabricate the building blocks border-str and cell-str. | 1616 | ;; Prefabricate the building blocks border-str and cell-str. |
| 1614 | (with-temp-buffer | 1617 | (with-temp-buffer |
| 1615 | ;; construct border-str | 1618 | ;; Construct border-str. |
| 1616 | (insert table-cell-intersection-char) | 1619 | (insert table-cell-intersection-char) |
| 1617 | (setq cw cell-width) | 1620 | (setq cw cell-width) |
| 1618 | (setq i 0) | 1621 | (setq i 0) |
| 1619 | (while (< i columns) | 1622 | (while (< i columns) |
| 1620 | (insert (make-string (car cw) (string-to-char table-cell-horizontal-chars)) table-cell-intersection-char) | 1623 | (insert (make-string (car cw) |
| 1624 | (string-to-char table-cell-horizontal-chars)) | ||
| 1625 | table-cell-intersection-char) | ||
| 1621 | (if (cdr cw) (setq cw (cdr cw))) | 1626 | (if (cdr cw) (setq cw (cdr cw))) |
| 1622 | (setq i (1+ i))) | 1627 | (setq i (1+ i))) |
| 1623 | (setq border-str (buffer-substring (point-min) (point-max))) | 1628 | (setq border-str (buffer-substring (point-min) (point-max))) |