0

What setting has to be set in Emacs24 to make the load-file command to be case insensitive?

Filip Allberg
  • 3,941
  • 3
  • 20
  • 37
  • I typed `M-x find-function RET load-file RET` and took a look at the function consisting of 7 lines, including the doc-string and a comment. It uses the function `read-file-name`, which I then Googled **read-file-name case insensitive auto-complete** and came up with the variable `read-file-name-completion-ignore-case` mentioned in the manual at the following link: http://www.gnu.org/software/emacs/manual/html_node/emacs/Completion-Options.html That variable can be set globally, or `load-file` can be revised with an `advice`, or create a new or revised function by let-binding the variable. – lawlist Nov 14 '15 at 21:51
  • Note that Emacs has a built-in searching mechanism for useful terms and such -- e.g., apropos -- but I'm kind of lazy and like Google better. Here is the link to the section on apropos: http://www.gnu.org/software/emacs/manual/html_node/emacs/Apropos.html – lawlist Nov 14 '15 at 21:57

1 Answers1

1

I don't think there is anything directly built in, but all the standard Elisp files have lowercase names, so if that's all you need to cope with, you could do something like

(defadvice load-file (around lowercase-argument activate compile)
  "Call `downcase' on the FILE argument to `load-file'."
  (let ((file (downcase file)))  
    ad-do-it))
tripleee
  • 175,061
  • 34
  • 275
  • 318