强迫嬉皮士扩大尊重资本化

时间:2012-01-04 05:12:53

标签: emacs

我想阻止嬉皮士扩展给我完成与我已经提供的大小写不匹配的完成。例子:

start with "hippie1", "Hippie2", and "HIPPIE3"

"H" completes to "Hippie2" and "HIPPIE3", but not "hippie1"

是否有一种简单的方法可以实现这一目标?

1 个答案:

答案 0 :(得分:5)

hippie-expand将工作归结为hippie-expand-try-functions-list中的功能,我认为每个单独的功能都取决于它是否认为案例具有重要意义,因此可能没有简单的解决方案?

实验上,case-fold-search变量在某些情况下有效,但不是全部。

编辑:
那么不是对所述问题的明确解决方案,但是如果设置case-fold-search足以满足您的目的,您可以使用以下内容:

(defadvice hippie-expand (around hippie-expand-case-fold)
  "Try to do case-sensitive matching (not effective with all functions)."
  (let ((case-fold-search nil))
    ad-do-it))
(ad-activate 'hippie-expand)
相关问题