我正在使用ECB(Emacs代码浏览器),我的默认布局如下:
;; +------+-------+--------------------------------------+
;; | | |
;; | Directories | |
;; | | |
;; +------+-------+ |
;; | History | Edit |
;; +------+-------+ |
;; | Methods | |
;; | | |
;; +-----------------------------------------------------+
默认情况下,方法按照它们在编辑缓冲区中出现的顺序显示,但我正在寻找一种按名称排序的方法。我想使用类似ecb-methods-sort-method
的东西,但它似乎不存在。
有关如何设置的任何提示?
答案 0 :(得分:1)
我快速查看了文档,看起来你可以自定义'ecb-methods-menu-sorter'。
C-h v ecb-methods-menu-sorter
来自文档:
*Function which re-sorts the menu-entries of the directories buffer.
If a function then this function is called to re-arrange the menu-entries of
the combined menu-entries of the user-menu-extensions of
`ecb-directories-menu-user-extension' and the built-in-menu
`ecb-directories-menu'. If nil then no special sorting will be done and the
user-extensions are placed in front of the built-in-entries.
The function get one argument, a list of menu-entries. For the format of this
argument see `ecb-directories-menu-user-extension'. The function must return a
new list in the same format. Of course this function can not only re-arrange
the entries but also delete entries or add new entries.