29

我正在使用ECB(Emacs 代码浏览器),我的默认布局如下:

;; +------+-------+--------------------------------------+
;; |              |                                      |
;; | Directories  |                                      |
;; |              |                                      |
;; +------+-------+                                      |
;; |   History    |              Edit                    |
;; +------+-------+                                      |
;; |   Methods    |                                      |
;; |              |                                      |
;; +-----------------------------------------------------+

默认情况下,这些方法是按照它们在编辑缓冲区中出现的顺序显示的,但我正在寻找一种让它们按名称排序的方法。我想使用类似的东西,ecb-methods-sort-method但它似乎不存在。关于如何设置的任何提示?

4

1 回答 1

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.                       
于 2012-12-06T14:19:04.507 回答