bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20343: csv-mode fails if mode line is customized


From: Peter Eisentraut
Subject: bug#20343: csv-mode fails if mode line is customized
Date: Wed, 15 Apr 2015 20:00:23 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

This is about csv-mode.el version 1.2 from elpa.gnu.org.

If the mode line has been customized in a certain way, calling csv-mode
will fail.

Example:

in ~/emacs.d/init.el

(setq-default mode-line-format '("%e"))

Install csv-mode.el.

Then run

emacs test.csv

This will produce a message like

(wrong-type-argument number-or-marker-p ("%e"))


The reason is that in the definition of csv-mode-line-format, the
arguments of the `last' function are flipped:

(defconst csv-mode-line-format
  ;; See bindings.el for details of `mode-line-format' construction.
  (let* ((ml (copy-sequence (default-value 'mode-line-format)))
         (x (or (memq 'mode-line-position ml) (last 3 ml))))  ;; wrong


(I doubt that messing around with the mode line like that is current
practice, but that might be a separate discussion.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]