aki2o / emacs-tss

Provide a interface for auto-complete.el/flymake.el on typescript-mode.
108 stars 17 forks source link

flymake-float-time -> float-time #8

Closed chuntaro closed 10 years ago

chuntaro commented 10 years ago

flymake.el contained in Emacs24.4 is not defined flymake-float-time.

aki2o commented 10 years ago

Maybe we should have the code like the following for compatibility.

(setq flymake-check-start-time (if (functionp 'flymake-float-time)
                                                     (flymake-float-time)
                                                   (float-time)))

In this case, maybe warning is shown when compile. I suppose it's no need to make an effort to avoid that. If you mind that, it's OK even if different code.

chuntaro commented 10 years ago

OK. However, flymake-float-time is an alias for float-time in GnuEmacs. (not XEmacs)

(defalias 'flymake-float-time
  (if (fboundp 'float-time)
      'float-time
    (if (featurep 'xemacs)
    (lambda ()
      (multiple-value-bind (s0 s1 s2) (values-list (current-time))
        (+ (* (float (ash 1 16)) s0) (float s1) (* 0.0000001 s2)))))))
aki2o commented 10 years ago

I see. But, I think it might be better that the call of flymake-float-time is remained for XEmacs.