;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Section 1 language configurations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; japanese settings for Carbon Emacs Package (when (equal (substring (shell-command-to-string "defaults read -g AppleLocale") 0 2) "ja") (require 'utf-8m) (set-language-environment 'Japanese) (prefer-coding-system 'utf-8-unix) (load "menu-tree") )
(defun my-file-complete () (interactive) (let*((p (point)) (s (save-excursion (skip-chars-backward "^ \t\n:;\"\'()<>") (point))) (path (buffer-substring s p)) (dir (or (file-name-directory path) "")) (file (file-name-nondirectory path)) (res (file-name-completion file dir))) (cond ((eq res t) (message "Sole completion")) ((eq res nil) (ding) (message "No match!")) ((string= file res) (message (mapconcat 'princ (file-name-all-completions file dir) " "))) (t (delete-region p s) (insert dir res))))) (global-set-key [(alt k)] 'my-file-complete) ;; このキーバインドだとnwモードで使えない