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

[cgreek:00031] Re: More tlg utilities



Dear Dr.Smith


>     Kenji> May I say one thing?
> 
>     Kenji> When the cursor is located to the line without quotaion,
> 
>     Kenji>          nil*nil*nil*nil*nil*nil
> 
>     Kenji> is displayed in the mode line. But it may be surprising a
>     Kenji> little bit.  The content of nil in the variables may be
>     Kenji> better altered to some other character. Is it possible?
> 
> The place to fix this is tlg-getref, which at present simply retrieves
> all the "level" values and concatenates them into a string separated by
> '*'.  At the least, it should know how to ignore nil values.  I should
> also make the format string customizable.  Thanks for pointing this out.


After I wrote it, I tried some posssibilities. The following may be the
simplest.

    # Of course, the character " " can be others.

(defun tlg-getref ()
  "Return the current TLG citation data."
  (interactive)
  (setq tlg-current-ref (format "%s*%s*%s*%s*%s*%s" 
                                (or (get-text-property (point) 'nref) " ")
                                (or (get-text-property (point) 'vref) " ")
                                (or (get-text-property (point) 'wref) " ")
                                (or (get-text-property (point) 'xref) " ")
                                (or (get-text-property (point) 'yref) " ")
                                (or (get-text-property (point) 'zref) " "))
        )
  )


  # I had written it in another mail. But till now I can't read it.
  # If it will be distributed today or so, pardon me.


                                  ------------------------------------------
                                                       Prof.Kenji Mizuochi
                                                    Meijigakuin University
                                                              Tokyo, JAPAN
                                    E-Mail: mizuochi@xxxxxxxxxxxxxxxxxxxxx
                                                     knj_miz@xxxxxxxxxxxxx
                                  ------------------------------------------