equal
deleted
inserted
replaced
439 (message "shell, bash, Cygwin, MSYS") |
439 (message "shell, bash, Cygwin, MSYS") |
440 |
440 |
441 (eval-when 'compile (require 'shell)) |
441 (eval-when 'compile (require 'shell)) |
442 |
442 |
443 ;; Activate Cygwin for native Windows Emacs if available. |
443 ;; Activate Cygwin for native Windows Emacs if available. |
444 (when (and (eq window-system 'w32) (require 'cygwin-mount nil t)) |
444 (when (and (eq system-type 'windows-nt) (require 'cygwin-mount nil t)) |
445 (cygwin-mount-activate)) |
445 (cygwin-mount-activate)) |
446 |
446 |
447 (defvar my-use-windows-shell nil |
447 (defvar my-use-windows-shell nil |
448 "If t 'cmdproxy.exe' will be used as shell. |
448 "If t 'cmdproxy.exe' will be used as shell. |
449 Affect on \\[shell] like commands. If nil, 'sh' will be used." ) |
449 Affect on \\[shell] like commands. If nil, 'sh' will be used." ) |
494 (setq shell-file-name "bash") |
494 (setq shell-file-name "bash") |
495 (setenv "SHELL" "/bin/bash") |
495 (setenv "SHELL" "/bin/bash") |
496 (modify-coding-system-alist 'process "bash" '(cp1251-unix . cp1251-unix)) |
496 (modify-coding-system-alist 'process "bash" '(cp1251-unix . cp1251-unix)) |
497 ) |
497 ) |
498 |
498 |
499 (when (eq window-system 'w32) |
499 (when (eq system-type 'windows-nt) |
500 ;; Fix 'starttls.el' on native Windows Emacs with gnutls-cli from Cygwin. |
500 ;; Fix 'starttls.el' on native Windows Emacs with gnutls-cli from Cygwin. |
501 ;; 'gnutls-cli' run with '-s' opt and process wait for SIGALRM. |
501 ;; 'gnutls-cli' run with '-s' opt and process wait for SIGALRM. |
502 ;; But build-in native Emacs 'kill' command can not send such Cygwin |
502 ;; But build-in native Emacs 'kill' command can not send such Cygwin |
503 ;; specific sygnal. So 'starttls-negotiate-gnutls' function infinitely |
503 ;; specific sygnal. So 'starttls-negotiate-gnutls' function infinitely |
504 ;; wait for 'gnutls-cli' output. |
504 ;; wait for 'gnutls-cli' output. |
512 )) |
512 )) |
513 (ad-activate 'signal-process) |
513 (ad-activate 'signal-process) |
514 (modify-coding-system-alist 'process "gnutls-cli" '(binary . binary)) |
514 (modify-coding-system-alist 'process "gnutls-cli" '(binary . binary)) |
515 ) |
515 ) |
516 |
516 |
517 (when (eq window-system 'w32) |
517 (when (eq system-type 'windows-nt) |
518 (add-to-list 'exec-suffixes ".py") |
518 (add-to-list 'exec-suffixes ".py") |
519 (add-to-list 'exec-suffixes ".sh") |
519 (add-to-list 'exec-suffixes ".sh") |
520 (defun executable-find (command) (locate-file command exec-path exec-suffixes)) |
520 (defun executable-find (command) (locate-file command exec-path exec-suffixes)) |
521 ) |
521 ) |
522 |
522 |
865 ;; Scroll Bar gets dragged by mouse butn 1 |
865 ;; Scroll Bar gets dragged by mouse butn 1 |
866 (global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag) |
866 (global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag) |
867 ;; Paste at point NOT at cursor |
867 ;; Paste at point NOT at cursor |
868 (setq mouse-yank-at-point t) |
868 (setq mouse-yank-at-point t) |
869 (when window-system |
869 (when window-system |
870 (mouse-wheel-mode 1) |
870 (mouse-wheel-mode 1)) |
871 ) |
|
872 |
871 |
873 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
872 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
874 (message "key binding, short-keys") |
873 (message "key binding, short-keys") |
875 |
874 |
876 (defun my--smart-beginning-of-line () |
875 (defun my--smart-beginning-of-line () |
1114 'my-dired-enter-to-dir) |
1113 'my-dired-enter-to-dir) |
1115 |
1114 |
1116 ;; Make behaviour same as in GUI. |
1115 ;; Make behaviour same as in GUI. |
1117 (unless window-system |
1116 (unless window-system |
1118 (define-key dired-mode-map (kbd "DEL") 'my-dired-up-dir) |
1117 (define-key dired-mode-map (kbd "DEL") 'my-dired-up-dir) |
1119 (define-key dired-mode-map (kbd "RET") 'my-dired-enter-to-dir) |
1118 (define-key dired-mode-map (kbd "RET") 'my-dired-enter-to-dir)) |
1120 ) |
|
1121 |
1119 |
1122 ;; Enable 'a' command. |
1120 ;; Enable 'a' command. |
1123 (put 'dired-find-alternate-file 'disabled nil) |
1121 (put 'dired-find-alternate-file 'disabled nil) |
1124 |
1122 |
1125 (defvar my--file-name-tmp-refex |
1123 (defvar my--file-name-tmp-refex |
1445 |
1443 |
1446 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1444 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1447 (message "info") |
1445 (message "info") |
1448 |
1446 |
1449 (unless (getenv "INFOPATH") |
1447 (unless (getenv "INFOPATH") |
1450 (if (not (eq window-system 'w32)) |
1448 (if (eq system-type 'windows-nt) |
1451 (setenv "INFOPATH" (expand-file-name "~/usr/share/info:")) |
1449 (setenv "INFOPATH" (concat (expand-file-name "~/usr/share/info") ":/usr/share/info:")) |
1452 (setenv "INFOPATH" (concat (expand-file-name "~/usr/share/info") ":/usr/share/info:")))) |
1450 (setenv "INFOPATH" (expand-file-name "~/usr/share/info:")))) |
1453 |
1451 |
1454 ;; Assume that cygwin-mount already activated. |
1452 ;; Assume that cygwin-mount already activated. |
1455 (when (featurep 'cygwin-mount) |
1453 (when (featurep 'cygwin-mount) |
1456 (setenv "INFOPATH" "/usr/share/info/:~/usr/share/info/:") |
1454 (setenv "INFOPATH" "/usr/share/info/:~/usr/share/info/:") |
1457 ;; Redefine path-separator to UNIX to update Info-directory-list. |
1455 ;; Redefine path-separator to UNIX to update Info-directory-list. |