--- a/.emacs-my Mon Dec 20 23:33:48 2010 +0200
+++ b/.emacs-my Thu Dec 23 00:57:29 2010 +0200
@@ -529,7 +529,7 @@
(setq ls-lisp-use-insert-directory-program nil)
(setq ls-lisp-ignore-case t)
(setq ls-lisp-dirs-first t)
-(if (eq system-type 'windows-nt)
+(if (memq system-type '(windows-nt cygwin))
(setq ls-lisp-verbosity nil)
(setq ls-lisp-verbosity '(links uid gid)))
;; Force use 'ls-lisp-format-time-list'.
--- a/Makefile Mon Dec 20 23:33:48 2010 +0200
+++ b/Makefile Thu Dec 23 00:57:29 2010 +0200
@@ -2,6 +2,14 @@
#
# You can do anything with this file without any warranty.
+################################################################
+# Helper definition.
+
+which = $(firstword $(foreach item,$(subst :, ,$(PATH)),$(wildcard $(item)/$1)))
+
+################################################################
+# Platform/environment definition.
+
ifeq '' '$(HOME)'
$(error Home env var not set!)
endif
@@ -11,13 +19,17 @@
host_os = windows
endif
-# Special case for Windows if emacs-nox from Cygwin installed along with native Emacs.
-# So we run native Emacs to compile sources.
EMACS = emacs
+# I prefer native Windows Emacs, so use it if available.
ifeq 'windows' '$(host_os)'
- EMACS = runemacs
+ ifneq '' '$(call which,runemacs.exe)'
+ EMACS = runemacs
+ endif
endif
+################################################################
+# Targets.
+
FILES_MODE_EL := $(wildcard *-mode.el)
.PHONY: all