[Top][All Lists]

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

Re: column int->float diff

From: Thien-Thi Nguyen
Subject: Re: column int->float diff
Date: Sat, 01 Jun 2002 19:54:32 -0700

   From: Richard Stallman <address@hidden>
   Date: Sat, 1 Jun 2002 15:05:13 -0600 (MDT)

   It seems reasonable; if you see that it works, how about installing it?

ok.  fyi, i see that it works by temporarily adding `float-current-column'
that exposes the float and running a scan on some files (code below) w/o

further testing raises another question.  inserting text increments the
column normally, but this is not the case for images (on the same line)
which add 1 to the column only:

      012345    6789...

i surmise there is no code that depends on TEXT2 column, or that such code
would silently break depending on how we fix this underspecification, but
that it's not really a big deal, just something to mention to programmers
(and specify more precisely, of course).  am i missing something?  does
anyone else see different behavior?


;; -*- emacs-lisp -*-
(defvar count 0)

(mapcar (lambda (file)
          (find-file file)
          (goto-char (point-min))
          (princ file) (princ "  ")
          (while (< (point) (point-max))
            (unless (= (current-column) (float-current-column))
              (error "%s %s %s"
                     (point) (current-column) (float-current-column)))
            (forward-char 1)
            (setq count (1+ count))
            (when (= 0 (% count 1024))
              (princ ".")))
          (kill-buffer (current-buffer))
          (princ "\n"))
        (split-string (shell-command-to-string "find . -name '*.[hc]'")))

;;; Local variables:
;;; compile-command: "./emacs -q --no-site-file -batch -l .ttn.test"
;;; End:

reply via email to

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