Separated Cygwin & ansi colors settings.
--- a/.emacs-my Wed Apr 07 22:48:39 2021 +0300
+++ b/.emacs-my Wed Jun 02 00:17:06 2021 +0300
@@ -526,14 +526,31 @@
("America/New_York" "New York")
("Asia/Tokyo" "Tokyo")))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "shell, bash, Cygwin, MSYS")
+(message "term colors, ansi colors")
+
+(ansi-color-for-comint-mode-on)
+
+(defun my-ansi-color (&optional beg end)
+ "Interpret ANSI color esacape sequence by colorifying cotent.
+Operate on selected region on whole buffer."
+ (interactive
+ (if (use-region-p)
+ (list (region-beginning) (region-end))
+ (list (point-min) (point-max))))
+ (ansi-color-apply-on-region beg end))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "shell, bash")
(cl-eval-when (compile) (require 'shell))
-(defvar my-use-windows-shell nil
- "If t 'cmdproxy.exe' will be used as shell.
-Affect on \\[shell] like commands. If nil, 'sh' will be used." )
+(setq explicit-bash-args '("-i"))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "Cygwin, MSYS")
(defun follow-cygwin-symlink ()
"Follow new-style (and also UCS-16) Cygwin symlinks."
@@ -615,19 +632,6 @@
(defun executable-find (command) (locate-file command exec-path exec-suffixes))
)
-(ansi-color-for-comint-mode-on)
-
-(defun my-ansi-color (&optional beg end)
- "Interpret ANSI color esacape sequence by colorifying cotent.
-Operate on selected region on whole buffer."
- (interactive
- (if (use-region-p)
- (list (region-beginning) (region-end))
- (list (point-min) (point-max))))
- (ansi-color-apply-on-region beg end))
-
-(setq explicit-bash-args '("-i"))
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "term")
@@ -1652,12 +1656,12 @@
(insert result)))))
(defun my-calc-line (arg)
- "Evaluate calc expression in current line and display the
+ "Evaluate calc expression in the current line and display the
result in the echo area by skipping everything after the final
'=' sign.
With prefix ARG non-nil or repeating command interactively,
-insert the result at the end of line + add a space if necessary
+insert the result at the end of line & add a space if necessary
for delimiting clearing everything after '=' sign if it is here."
(interactive "P")
(require 'calc)