[Top][All Lists]

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

API changes

From: Ben Wing
Subject: API changes
Date: Sat, 27 Apr 2002 06:39:11 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv: Gecko/20020314 Netscape6/6.2.2

I've made the following API changes to stuff that's also in GNU Emacs:

scroll-up/scroll-down take a second optional argument, WINDOW.

commandp takes a second optional argument, CALL-INTERACTIVELY, which indicates whether the given item can be executed by `call-interactively' (normally, the return value indicates whether the item can be executed by `command-execute'; this includes vectors and strings, which are not allowed by `call-interactively'). this is a clean way of determining, for example, how to execute a callback in a menu spec or the like -- such callbacks are defined as "if an interactive thing, use call-interactively; else, use eval".

Recently I also added the function

(truncate-string-with-continuation-dots STR END-COLUMN &optional DOTS-STR)

Truncate string STR to end at column END-COLUMN, adding dots if needed.
The dots (normally `...', but can be controlled by DOTS-STR)' will be added
in such a way that the total string occupies no more than END-COLUMN
columns -- i.e. if the string goes past END-COLUMN, it will be truncated
somewhere short of END-COLUMN so that, with the dots added, the string
occupies END-COLUMN columns.

"columns" in here refers to the same thing that `truncate-string-to-width' deals in, i.e. "display columns" where Japanese characters get two.


reply via email to

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