aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-05-16 12:33:12 +0300
committerEli Zaretskii2015-05-16 12:33:12 +0300
commitda4a31b1b1af919f0473dffa86b46beec5ca5541 (patch)
tree90abc1a14c215cd6efa3a492400a39dbd356602a
parent91a274810ff17403f37bde512716b180c9ab75ef (diff)
parenta96731d7f0f0616e500583a1d3eaa912a7f0ec16 (diff)
downloademacs-da4a31b1b1af919f0473dffa86b46beec5ca5541.tar.gz
emacs-da4a31b1b1af919f0473dffa86b46beec5ca5541.zip
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
-rw-r--r--admin/charsets/cp51932.awk2
-rw-r--r--admin/charsets/eucjp-ms.awk2
-rw-r--r--configure.ac22
-rw-r--r--doc/lispref/modes.texi6
-rw-r--r--etc/NEWS4
-rw-r--r--lib-src/etags.c4
-rw-r--r--lisp/cus-start.el1
-rw-r--r--lisp/emacs-lisp/generator.el2
-rw-r--r--lisp/emacs-lisp/tabulated-list.el24
-rw-r--r--lisp/international/cp51932.el2
-rw-r--r--lisp/international/eucjp-ms.el2
-rw-r--r--lisp/language/japanese.el4
-rw-r--r--lisp/loadup.el2
-rw-r--r--lwlib/Makefile.in20
-rw-r--r--lwlib/autodeps.mk5
-rw-r--r--lwlib/deps.mk2
-rw-r--r--oldXMenu/Makefile.in20
-rw-r--r--oldXMenu/autodeps.mk5
-rw-r--r--oldXMenu/deps.mk2
-rw-r--r--src/Makefile.in25
-rw-r--r--src/autodeps.mk5
-rw-r--r--src/deps.mk2
-rw-r--r--src/lisp.mk6
-rw-r--r--src/macfont.h6
-rw-r--r--src/nsfns.m31
-rw-r--r--src/nsimage.m9
-rw-r--r--src/nsmenu.m6
-rw-r--r--src/nsterm.h1
-rw-r--r--src/nsterm.m106
29 files changed, 193 insertions, 135 deletions
diff --git a/admin/charsets/cp51932.awk b/admin/charsets/cp51932.awk
index c8879b30200..f59e91cdb9c 100644
--- a/admin/charsets/cp51932.awk
+++ b/admin/charsets/cp51932.awk
@@ -52,4 +52,6 @@ END {
52 print " (setcar x (cdr x)) (setcdr x tmp)))"; 52 print " (setcar x (cdr x)) (setcdr x tmp)))";
53 print " map)"; 53 print " map)";
54 print " (define-translation-table 'cp51932-encode map))"; 54 print " (define-translation-table 'cp51932-encode map))";
55 print "";
56 print "(provide 'cp51932)";
55} 57}
diff --git a/admin/charsets/eucjp-ms.awk b/admin/charsets/eucjp-ms.awk
index 18c19f5fb55..f17222d901e 100644
--- a/admin/charsets/eucjp-ms.awk
+++ b/admin/charsets/eucjp-ms.awk
@@ -106,5 +106,7 @@ END {
106 print " (setcar x (cdr x)) (setcdr x tmp)))"; 106 print " (setcar x (cdr x)) (setcdr x tmp)))";
107 print " map)"; 107 print " map)";
108 print " (define-translation-table 'eucjp-ms-encode map))"; 108 print " (define-translation-table 'eucjp-ms-encode map))";
109 print "";
110 print "(provide 'eucjp-ms)";
109} 111}
110 112
diff --git a/configure.ac b/configure.ac
index 90a40552a35..1cddeb1e45f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1661,9 +1661,7 @@ dnl AC_C_BIGENDIAN is done by gnulib.
1661 1661
1662dnl check for Make feature 1662dnl check for Make feature
1663 1663
1664DEPFLAGS= 1664AUTO_DEPEND=no
1665MKDEPDIR=":"
1666deps_frag=deps.mk
1667dnl check if we have GCC and autodepend is on. 1665dnl check if we have GCC and autodepend is on.
1668if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then 1666if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
1669 AC_MSG_CHECKING([whether gcc understands -MMD -MF]) 1667 AC_MSG_CHECKING([whether gcc understands -MMD -MF])
@@ -1675,24 +1673,10 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
1675 rm -rf deps.d 1673 rm -rf deps.d
1676 AC_MSG_RESULT([$ac_enable_autodepend]) 1674 AC_MSG_RESULT([$ac_enable_autodepend])
1677 if test $ac_enable_autodepend = yes; then 1675 if test $ac_enable_autodepend = yes; then
1678 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' 1676 AUTO_DEPEND=yes
1679 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
1680 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
1681 deps_frag=autodeps.mk
1682 fi 1677 fi
1683fi 1678fi
1684lwlib_deps_frag=$srcdir/lwlib/$deps_frag 1679AC_SUBST(AUTO_DEPEND)
1685oldxmenu_deps_frag=$srcdir/oldXMenu/$deps_frag
1686deps_frag=$srcdir/src/$deps_frag
1687AC_SUBST(MKDEPDIR)
1688AC_SUBST(DEPFLAGS)
1689AC_SUBST_FILE(deps_frag)
1690AC_SUBST_FILE(lwlib_deps_frag)
1691AC_SUBST_FILE(oldxmenu_deps_frag)
1692
1693lisp_frag=$srcdir/src/lisp.mk
1694AC_SUBST_FILE(lisp_frag)
1695
1696 1680
1697dnl checks for operating system services 1681dnl checks for operating system services
1698AC_SYS_LONG_FILE_NAMES 1682AC_SYS_LONG_FILE_NAMES
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 8cb0f3db246..c325506da11 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -958,9 +958,9 @@ Menu,,, emacs, The GNU Emacs Manual}).
958way, specifying @code{tabulated-list-mode} as the second argument 958way, specifying @code{tabulated-list-mode} as the second argument
959(@pxref{Derived Modes}). The body of the @code{define-derived-mode} 959(@pxref{Derived Modes}). The body of the @code{define-derived-mode}
960form should specify the format of the tabulated data, by assigning 960form should specify the format of the tabulated data, by assigning
961values to the variables documented below; then, it should call the 961values to the variables documented below; optionally, it can then call
962function @code{tabulated-list-init-header} to initialize the header 962the function @code{tabulated-list-init-header}, which will populate a
963line. 963header with the names of the columns.
964 964
965 The derived mode should also define a @dfn{listing command}. This, 965 The derived mode should also define a @dfn{listing command}. This,
966not the mode command, is what the user calls (e.g., @kbd{M-x 966not the mode command, is what the user calls (e.g., @kbd{M-x
diff --git a/etc/NEWS b/etc/NEWS
index 2888c16a399..fdd0c874bad 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -205,6 +205,10 @@ font, and (iii) the specified window.
205 `message' and related functions from displaying messages the Echo 205 `message' and related functions from displaying messages the Echo
206 Area. The output is still logged to the *Messages* buffer. 206 Area. The output is still logged to the *Messages* buffer.
207 207
208** It is now safe for a mode that derives `tabulated-list-mode' to not
209call `tabulated-list-init-header', in which case it will have no
210header.
211
208 212
209* Editing Changes in Emacs 25.1 213* Editing Changes in Emacs 25.1
210 214
diff --git a/lib-src/etags.c b/lib-src/etags.c
index f2438213d04..7bacbd3e619 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -68,8 +68,8 @@ University of California, as described above. */
68 * 1994 Line-by-line regexp tags by Tom Tromey. 68 * 1994 Line-by-line regexp tags by Tom Tromey.
69 * 2001 Nested classes by Francesco Potortì (concept by Mykola Dzyuba). 69 * 2001 Nested classes by Francesco Potortì (concept by Mykola Dzyuba).
70 * 2002 #line directives by Francesco Potortì. 70 * 2002 #line directives by Francesco Potortì.
71 * 71 * Francesco Potortì maintained and improved it for many years
72 * Francesco Potortì <pot@gnu.org> has maintained and improved it since 1993. 72 starting in 1993.
73 */ 73 */
74 74
75/* 75/*
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 071aaa6850f..b4d2139022c 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -438,6 +438,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
438 (const super)) "23.1") 438 (const super)) "23.1")
439 (ns-antialias-text ns boolean "23.1") 439 (ns-antialias-text ns boolean "23.1")
440 (ns-auto-hide-menu-bar ns boolean "24.1") 440 (ns-auto-hide-menu-bar ns boolean "24.1")
441 (ns-confirm-quit ns boolean "25.1")
441 (ns-use-native-fullscreen ns boolean "24.4") 442 (ns-use-native-fullscreen ns boolean "24.4")
442 (ns-use-fullscreen-animation ns boolean "25.1") 443 (ns-use-fullscreen-animation ns boolean "25.1")
443 (ns-use-srgb-colorspace ns boolean "24.4") 444 (ns-use-srgb-colorspace ns boolean "24.4")
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index 65def39bf2e..8251682590e 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -90,7 +90,7 @@
90 ;; Change this function to use `cl-gensym' if you want the generated 90 ;; Change this function to use `cl-gensym' if you want the generated
91 ;; code to be easier to read and debug. 91 ;; code to be easier to read and debug.
92 ;; (cl-gensym (apply #'format fmt args)) 92 ;; (cl-gensym (apply #'format fmt args))
93 `(make-symbol (format ,fmt . ,args))) 93 `(make-symbol ,fmt))
94 94
95(defvar cps--dynamic-wrappers '(identity) 95(defvar cps--dynamic-wrappers '(identity)
96 "List of transformer functions to apply to atomic forms we 96 "List of transformer functions to apply to atomic forms we
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index b12edc8c595..5d10b55d14c 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -179,7 +179,9 @@ If ADVANCE is non-nil, move forward by one line afterwards."
179 table) 179 table)
180 "The `glyphless-char-display' table in Tabulated List buffers.") 180 "The `glyphless-char-display' table in Tabulated List buffers.")
181 181
182(defvar tabulated-list--header-string nil) 182(defvar tabulated-list--header-string nil
183 "Holds the header if `tabulated-list-use-header-line' is nil.
184Populated by `tabulated-list-init-header'.")
183(defvar tabulated-list--header-overlay nil) 185(defvar tabulated-list--header-overlay nil)
184 186
185(defun tabulated-list-init-header () 187(defun tabulated-list-init-header ()
@@ -243,15 +245,17 @@ If ADVANCE is non-nil, move forward by one line afterwards."
243 (setq-local tabulated-list--header-string cols)))) 245 (setq-local tabulated-list--header-string cols))))
244 246
245(defun tabulated-list-print-fake-header () 247(defun tabulated-list-print-fake-header ()
246 "Insert a fake Tabulated List \"header line\" at the start of the buffer." 248 "Insert a fake Tabulated List \"header line\" at the start of the buffer.
247 (goto-char (point-min)) 249Do nothing if `tabulated-list--header-string' is nil."
248 (let ((inhibit-read-only t)) 250 (when tabulated-list--header-string
249 (insert tabulated-list--header-string "\n") 251 (goto-char (point-min))
250 (if tabulated-list--header-overlay 252 (let ((inhibit-read-only t))
251 (move-overlay tabulated-list--header-overlay (point-min) (point)) 253 (insert tabulated-list--header-string "\n")
252 (setq-local tabulated-list--header-overlay 254 (if tabulated-list--header-overlay
253 (make-overlay (point-min) (point)))) 255 (move-overlay tabulated-list--header-overlay (point-min) (point))
254 (overlay-put tabulated-list--header-overlay 'face 'underline))) 256 (setq-local tabulated-list--header-overlay
257 (make-overlay (point-min) (point))))
258 (overlay-put tabulated-list--header-overlay 'face 'underline))))
255 259
256(defun tabulated-list-revert (&rest ignored) 260(defun tabulated-list-revert (&rest ignored)
257 "The `revert-buffer-function' for `tabulated-list-mode'. 261 "The `revert-buffer-function' for `tabulated-list-mode'.
diff --git a/lisp/international/cp51932.el b/lisp/international/cp51932.el
index a6489268578..cb72356fea0 100644
--- a/lisp/international/cp51932.el
+++ b/lisp/international/cp51932.el
@@ -468,3 +468,5 @@
468 (setcar x (cdr x)) (setcdr x tmp))) 468 (setcar x (cdr x)) (setcdr x tmp)))
469 map) 469 map)
470 (define-translation-table 'cp51932-encode map)) 470 (define-translation-table 'cp51932-encode map))
471
472(provide 'cp51932)
diff --git a/lisp/international/eucjp-ms.el b/lisp/international/eucjp-ms.el
index 6e4e1e798b0..efb0a2b2d75 100644
--- a/lisp/international/eucjp-ms.el
+++ b/lisp/international/eucjp-ms.el
@@ -2085,3 +2085,5 @@
2085 (setcar x (cdr x)) (setcdr x tmp))) 2085 (setcar x (cdr x)) (setcdr x tmp)))
2086 map) 2086 map)
2087 (define-translation-table 'eucjp-ms-encode map)) 2087 (define-translation-table 'eucjp-ms-encode map))
2088
2089(provide 'eucjp-ms)
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index ce480252e7c..38159d7b458 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -34,8 +34,8 @@
34;;; Code: 34;;; Code:
35 35
36;;; Load translation tables for CP932. 36;;; Load translation tables for CP932.
37(load "international/cp51932") 37(require 'cp51932)
38(load "international/eucjp-ms") 38(require 'eucjp-ms)
39 39
40(define-coding-system 'iso-2022-jp 40(define-coding-system 'iso-2022-jp
41 "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)." 41 "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)."
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 828b19e85e3..525cbad9db7 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -178,6 +178,8 @@
178(load "language/romanian") 178(load "language/romanian")
179(load "language/greek") 179(load "language/greek")
180(load "language/hebrew") 180(load "language/hebrew")
181(load "international/cp51932")
182(load "international/eucjp-ms")
181(load "language/japanese") 183(load "language/japanese")
182(load "language/korean") 184(load "language/korean")
183(load "language/lao") 185(load "language/lao")
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index 1f332e92939..2fd59598e3e 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -70,10 +70,15 @@ am__v_at_0 = @
70am__v_at_1 = 70am__v_at_1 =
71 71
72DEPDIR = deps 72DEPDIR = deps
73## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. 73AUTO_DEPEND = @AUTO_DEPEND@
74DEPFLAGS = @DEPFLAGS@ 74
75## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. 75ifeq ($(AUTO_DEPEND),yes)
76MKDEPDIR = @MKDEPDIR@ 76DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
77MKDEPDIR = ${MKDIR_P} ${DEPDIR}
78else
79DEPFLAGS =
80MKDEPDIR = :
81endif
77 82
78## ../src is where the generated file (config.h, globals.h) are. 83## ../src is where the generated file (config.h, globals.h) are.
79## $(srcdir)/../src is where the non-generated files (lisp.h) are. 84## $(srcdir)/../src is where the non-generated files (lisp.h) are.
@@ -102,8 +107,11 @@ globals_h = ../src/globals.h
102$(globals_h): 107$(globals_h):
103 $(MAKE) -C ../src globals.h 108 $(MAKE) -C ../src globals.h
104 109
105## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. 110ifeq ($(AUTO_DEPEND),yes)
106@lwlib_deps_frag@ 111-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
112else
113include $(srcdir)/deps.mk
114endif
107 115
108.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean 116.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
109 117
diff --git a/lwlib/autodeps.mk b/lwlib/autodeps.mk
deleted file mode 100644
index f7109295ce2..00000000000
--- a/lwlib/autodeps.mk
+++ /dev/null
@@ -1,5 +0,0 @@
1### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs
2
3## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes.
4
5-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
diff --git a/lwlib/deps.mk b/lwlib/deps.mk
index 11cc0567428..a19e51f34d1 100644
--- a/lwlib/deps.mk
+++ b/lwlib/deps.mk
@@ -20,7 +20,7 @@
20 20
21### Commentary: 21### Commentary:
22 22
23## This file is inserted in lwlib/Makefile if AUTO_DEPEND=no. 23## This file is included in lwlib/Makefile if AUTO_DEPEND=no.
24## It defines static dependencies between the various source files. 24## It defines static dependencies between the various source files.
25 25
26### Code: 26### Code:
diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in
index ef2a3600a6b..de5b8e1114c 100644
--- a/oldXMenu/Makefile.in
+++ b/oldXMenu/Makefile.in
@@ -112,10 +112,15 @@ am__v_at_0 = @
112am__v_at_1 = 112am__v_at_1 =
113 113
114DEPDIR = deps 114DEPDIR = deps
115## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. 115AUTO_DEPEND = @AUTO_DEPEND@
116DEPFLAGS = @DEPFLAGS@ 116
117## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. 117ifeq ($(AUTO_DEPEND),yes)
118MKDEPDIR = @MKDEPDIR@ 118DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
119MKDEPDIR = ${MKDIR_P} ${DEPDIR}
120else
121DEPFLAGS =
122MKDEPDIR = :
123endif
119 124
120ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ 125ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
121 $(C_SWITCH_X_SITE) $(DEPFLAGS) \ 126 $(C_SWITCH_X_SITE) $(DEPFLAGS) \
@@ -132,8 +137,11 @@ libXMenu11.a: $(OBJS) $(EXTRA)
132 $(AM_V_at)$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA) 137 $(AM_V_at)$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA)
133 $(AM_V_at)$(RANLIB) $@ 138 $(AM_V_at)$(RANLIB) $@
134 139
135## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. 140ifeq ($(AUTO_DEPEND),yes)
136@oldxmenu_deps_frag@ 141-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
142else
143include $(srcdir)/deps.mk
144endif
137 145
138.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean 146.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
139 147
diff --git a/oldXMenu/autodeps.mk b/oldXMenu/autodeps.mk
deleted file mode 100644
index f7109295ce2..00000000000
--- a/oldXMenu/autodeps.mk
+++ /dev/null
@@ -1,5 +0,0 @@
1### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs
2
3## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes.
4
5-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
diff --git a/oldXMenu/deps.mk b/oldXMenu/deps.mk
index cdb89f9ead9..54ce3587574 100644
--- a/oldXMenu/deps.mk
+++ b/oldXMenu/deps.mk
@@ -32,7 +32,7 @@
32 32
33### Commentary: 33### Commentary:
34 34
35## This file is inserted in oldXMenu/Makefile if AUTO_DEPEND=no. 35## This file is included in oldXMenu/Makefile if AUTO_DEPEND=no.
36## It defines static dependencies between the various source files. 36## It defines static dependencies between the various source files.
37 37
38### Code: 38### Code:
diff --git a/src/Makefile.in b/src/Makefile.in
index 1c03b27c2c3..51a5b982474 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -323,10 +323,15 @@ am__v_at_0 = @
323am__v_at_1 = 323am__v_at_1 =
324 324
325DEPDIR=deps 325DEPDIR=deps
326## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. 326AUTO_DEPEND = @AUTO_DEPEND@
327DEPFLAGS=@DEPFLAGS@ 327
328## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. 328ifeq ($(AUTO_DEPEND),yes)
329MKDEPDIR=@MKDEPDIR@ 329DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
330MKDEPDIR = ${MKDIR_P} ${DEPDIR}
331else
332DEPFLAGS =
333MKDEPDIR = :
334endif
330 335
331## DO NOT use -R. There is a special hack described in lastfile.c 336## DO NOT use -R. There is a special hack described in lastfile.c
332## which is used instead. Some initialized data areas are modified 337## which is used instead. Some initialized data areas are modified
@@ -413,9 +418,7 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
413FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ 418FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
414ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) 419ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
415 420
416## Configure inserts the file lisp.mk at this point, defining $lisp. 421include $(srcdir)/lisp.mk
417@lisp_frag@
418
419 422
420## Construct full set of libraries to be linked. 423## Construct full set of libraries to be linked.
421LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ 424LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
@@ -667,8 +670,10 @@ endif
667 @: Compile some files earlier to speed up further compilation. 670 @: Compile some files earlier to speed up further compilation.
668 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" 671 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
669 672
670## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. 673ifeq ($(AUTO_DEPEND),yes)
671@deps_frag@ 674-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
672 675else
676include $(srcdir)/deps.mk
677endif
673 678
674### Makefile.in ends here 679### Makefile.in ends here
diff --git a/src/autodeps.mk b/src/autodeps.mk
deleted file mode 100644
index 8b014a7508c..00000000000
--- a/src/autodeps.mk
+++ /dev/null
@@ -1,5 +0,0 @@
1### autodeps.mk --- src/Makefile fragment for GNU Emacs
2
3## This is inserted in src/Makefile if AUTO_DEPEND=yes.
4
5-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
diff --git a/src/deps.mk b/src/deps.mk
index 71a5f42d22e..23789384fdb 100644
--- a/src/deps.mk
+++ b/src/deps.mk
@@ -20,7 +20,7 @@
20 20
21## Commentary: 21## Commentary:
22## 22##
23## This file is inserted in src/Makefile if AUTO_DEPEND=no. 23## This file is included in src/Makefile if AUTO_DEPEND=no.
24## It defines static dependencies between the various source files. 24## It defines static dependencies between the various source files.
25 25
26## FIXME some of these dependencies are platform-specific. 26## FIXME some of these dependencies are platform-specific.
diff --git a/src/lisp.mk b/src/lisp.mk
index 8eb86b7429e..0a431a59d7d 100644
--- a/src/lisp.mk
+++ b/src/lisp.mk
@@ -34,10 +34,6 @@
34## that does not have an explicit .el extension, but beware of any 34## that does not have an explicit .el extension, but beware of any
35## no-byte-compile ones. 35## no-byte-compile ones.
36 36
37## Confusingly, international/cp51932 and international/eucjp-ms are
38## unconditionally loaded from language/japanese, instead of being
39## loaded directly from loadup.el; FIXME.
40
41## Note that this list should not include lisp files which might not 37## Note that this list should not include lisp files which might not
42## be present, like site-load.el and site-init.el; this makefile 38## be present, like site-load.el and site-init.el; this makefile
43## expects them all to be either present or buildable. 39## expects them all to be either present or buildable.
@@ -96,9 +92,9 @@ lisp = \
96 $(lispsource)/language/romanian.elc \ 92 $(lispsource)/language/romanian.elc \
97 $(lispsource)/language/greek.elc \ 93 $(lispsource)/language/greek.elc \
98 $(lispsource)/language/hebrew.elc \ 94 $(lispsource)/language/hebrew.elc \
99 $(lispsource)/language/japanese.elc \
100 $(lispsource)/international/cp51932.el \ 95 $(lispsource)/international/cp51932.el \
101 $(lispsource)/international/eucjp-ms.el \ 96 $(lispsource)/international/eucjp-ms.el \
97 $(lispsource)/language/japanese.elc \
102 $(lispsource)/language/korean.elc \ 98 $(lispsource)/language/korean.elc \
103 $(lispsource)/language/lao.elc \ 99 $(lispsource)/language/lao.elc \
104 $(lispsource)/language/tai-viet.elc \ 100 $(lispsource)/language/tai-viet.elc \
diff --git a/src/macfont.h b/src/macfont.h
index f311577f051..403be94e332 100644
--- a/src/macfont.h
+++ b/src/macfont.h
@@ -48,7 +48,7 @@ struct mac_glyph_layout
48typedef CTFontDescriptorRef FontDescriptorRef; 48typedef CTFontDescriptorRef FontDescriptorRef;
49typedef CTFontRef FontRef; 49typedef CTFontRef FontRef;
50typedef CTFontSymbolicTraits FontSymbolicTraits; 50typedef CTFontSymbolicTraits FontSymbolicTraits;
51typedef CTCharacterCollection CharacterCollection; 51typedef NSCharacterCollection CharacterCollection;
52 52
53#define MAC_FONT_NAME_ATTRIBUTE kCTFontNameAttribute 53#define MAC_FONT_NAME_ATTRIBUTE kCTFontNameAttribute
54#define MAC_FONT_FAMILY_NAME_ATTRIBUTE kCTFontFamilyNameAttribute 54#define MAC_FONT_FAMILY_NAME_ATTRIBUTE kCTFontFamilyNameAttribute
@@ -79,8 +79,8 @@ enum {
79}; 79};
80 80
81enum { 81enum {
82 MAC_CHARACTER_COLLECTION_IDENTITY_MAPPING = kCTIdentityMappingCharacterCollection, 82 MAC_CHARACTER_COLLECTION_IDENTITY_MAPPING = NSIdentityMappingCharacterCollection,
83 MAC_CHARACTER_COLLECTION_ADOBE_JAPAN1 = kCTAdobeJapan1CharacterCollection 83 MAC_CHARACTER_COLLECTION_ADOBE_JAPAN1 = NSAdobeJapan1CharacterCollection
84}; 84};
85 85
86#define mac_font_descriptor_create_with_attributes \ 86#define mac_font_descriptor_create_with_attributes \
diff --git a/src/nsfns.m b/src/nsfns.m
index f8863e6d400..8a3c6ccf2b0 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1075,7 +1075,6 @@ This function is an internal primitive--use `make-frame' instead. */)
1075 Lisp_Object name; 1075 Lisp_Object name;
1076 int minibuffer_only = 0; 1076 int minibuffer_only = 0;
1077 long window_prompting = 0; 1077 long window_prompting = 0;
1078 int width, height;
1079 ptrdiff_t count = specpdl_ptr - specpdl; 1078 ptrdiff_t count = specpdl_ptr - specpdl;
1080 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 1079 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
1081 Lisp_Object display; 1080 Lisp_Object display;
@@ -1455,6 +1454,15 @@ ns_run_file_dialog (void)
1455 ns_fd_data.panel = nil; 1454 ns_fd_data.panel = nil;
1456} 1455}
1457 1456
1457#ifdef NS_IMPL_COCOA
1458#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_9
1459#define MODAL_OK_RESPONSE NSModalResponseOK
1460#endif
1461#endif
1462#ifndef MODAL_OK_RESPONSE
1463#define MODAL_OK_RESPONSE NSOKButton
1464#endif
1465
1458DEFUN ("ns-read-file-name", Fns_read_file_name, Sns_read_file_name, 1, 5, 0, 1466DEFUN ("ns-read-file-name", Fns_read_file_name, Sns_read_file_name, 1, 5, 0,
1459 doc: /* Use a graphical panel to read a file name, using prompt PROMPT. 1467 doc: /* Use a graphical panel to read a file name, using prompt PROMPT.
1460Optional arg DIR, if non-nil, supplies a default directory. 1468Optional arg DIR, if non-nil, supplies a default directory.
@@ -1466,10 +1474,9 @@ Optional arg DIR_ONLY_P, if non-nil, means choose only directories. */)
1466 Lisp_Object init, Lisp_Object dir_only_p) 1474 Lisp_Object init, Lisp_Object dir_only_p)
1467{ 1475{
1468 static id fileDelegate = nil; 1476 static id fileDelegate = nil;
1469 BOOL ret;
1470 BOOL isSave = NILP (mustmatch) && NILP (dir_only_p); 1477 BOOL isSave = NILP (mustmatch) && NILP (dir_only_p);
1471 id panel; 1478 id panel;
1472 Lisp_Object fname; 1479 Lisp_Object fname = Qnil;
1473 1480
1474 NSString *promptS = NILP (prompt) || !STRINGP (prompt) ? nil : 1481 NSString *promptS = NILP (prompt) || !STRINGP (prompt) ? nil :
1475 [NSString stringWithUTF8String: SSDATA (prompt)]; 1482 [NSString stringWithUTF8String: SSDATA (prompt)];
@@ -1549,20 +1556,17 @@ Optional arg DIR_ONLY_P, if non-nil, means choose only directories. */)
1549 while (ns_fd_data.panel != nil) 1556 while (ns_fd_data.panel != nil)
1550 [NSApp run]; 1557 [NSApp run];
1551 1558
1552 ret = (ns_fd_data.ret == NSOKButton); 1559 if (ns_fd_data.ret == MODAL_OK_RESPONSE)
1553
1554 if (ret)
1555 { 1560 {
1556 NSString *str = ns_filename_from_panel (panel); 1561 NSString *str = ns_filename_from_panel (panel);
1557 if (! str) str = ns_directory_from_panel (panel); 1562 if (! str) str = ns_directory_from_panel (panel);
1558 if (! str) ret = NO; 1563 if (str) fname = build_string ([str UTF8String]);
1559 else fname = build_string ([str UTF8String]);
1560 } 1564 }
1561 1565
1562 [[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow]; 1566 [[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow];
1563 unblock_input (); 1567 unblock_input ();
1564 1568
1565 return ret ? fname : Qnil; 1569 return fname;
1566} 1570}
1567 1571
1568const char * 1572const char *
@@ -2677,7 +2681,16 @@ compute_tip_xy (struct frame *f,
2677 pt.y = dpyinfo->last_mouse_motion_y; 2681 pt.y = dpyinfo->last_mouse_motion_y;
2678 /* Convert to screen coordinates */ 2682 /* Convert to screen coordinates */
2679 pt = [view convertPoint: pt toView: nil]; 2683 pt = [view convertPoint: pt toView: nil];
2684#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
2680 pt = [[view window] convertBaseToScreen: pt]; 2685 pt = [[view window] convertBaseToScreen: pt];
2686#else
2687 {
2688 NSRect r = NSMakeRect (pt.x, pt.y, 0, 0);
2689 r = [[view window] convertRectToScreen: r];
2690 pt.x = r.origin.x;
2691 pt.y = r.origin.y;
2692 }
2693#endif
2681 } 2694 }
2682 else 2695 else
2683 { 2696 {
diff --git a/src/nsimage.m b/src/nsimage.m
index 3e90226cbf6..9302cd2f212 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -187,7 +187,11 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
187 187
188 /* The next two lines cause the DPI of the image to be ignored. 188 /* The next two lines cause the DPI of the image to be ignored.
189 This seems to be the behavior users expect. */ 189 This seems to be the behavior users expect. */
190#ifdef NS_IMPL_COCOA
191#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
190 [image setScalesWhenResized: YES]; 192 [image setScalesWhenResized: YES];
193#endif
194#endif
191 [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])]; 195 [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
192 196
193 [image setName: [NSString stringWithUTF8String: SSDATA (file)]]; 197 [image setName: [NSString stringWithUTF8String: SSDATA (file)]];
@@ -207,7 +211,6 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
207- initFromXBM: (unsigned char *)bits width: (int)w height: (int)h 211- initFromXBM: (unsigned char *)bits width: (int)w height: (int)h
208 fg: (unsigned long)fg bg: (unsigned long)bg 212 fg: (unsigned long)fg bg: (unsigned long)bg
209{ 213{
210 int bpr = (w + 7) / 8;
211 unsigned char *planes[5]; 214 unsigned char *planes[5];
212 215
213 [self initWithSize: NSMakeSize (w, h)]; 216 [self initWithSize: NSMakeSize (w, h)];
@@ -353,7 +356,11 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
353 356
354 /* The next two lines cause the DPI of the image to be ignored. 357 /* The next two lines cause the DPI of the image to be ignored.
355 This seems to be the behavior users expect. */ 358 This seems to be the behavior users expect. */
359#ifdef NS_IMPL_COCOA
360#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
356 [self setScalesWhenResized: YES]; 361 [self setScalesWhenResized: YES];
362#endif
363#endif
357 [self setSize: NSMakeSize([bmr pixelsWide], [bmr pixelsHigh])]; 364 [self setSize: NSMakeSize([bmr pixelsWide], [bmr pixelsHigh])];
358 365
359 break; 366 break;
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 26fe26e5e0d..b5cb64d68e5 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1418,7 +1418,7 @@ Lisp_Object
1418ns_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents) 1418ns_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
1419{ 1419{
1420 id dialog; 1420 id dialog;
1421 Lisp_Object window, tem, title; 1421 Lisp_Object tem, title;
1422 NSPoint p; 1422 NSPoint p;
1423 BOOL isQ; 1423 BOOL isQ;
1424 NSAutoreleasePool *pool; 1424 NSAutoreleasePool *pool;
@@ -1506,7 +1506,11 @@ ns_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
1506 area.size.width = ICONSIZE; 1506 area.size.width = ICONSIZE;
1507 area.size.height= ICONSIZE; 1507 area.size.height= ICONSIZE;
1508 img = [[NSImage imageNamed: @"NSApplicationIcon"] copy]; 1508 img = [[NSImage imageNamed: @"NSApplicationIcon"] copy];
1509#ifdef NS_IMPL_COCOA
1510#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
1509 [img setScalesWhenResized: YES]; 1511 [img setScalesWhenResized: YES];
1512#endif
1513#endif
1510 [img setSize: NSMakeSize (ICONSIZE, ICONSIZE)]; 1514 [img setSize: NSMakeSize (ICONSIZE, ICONSIZE)];
1511 imgView = [[NSImageView alloc] initWithFrame: area]; 1515 imgView = [[NSImageView alloc] initWithFrame: area];
1512 [imgView setImage: img]; 1516 [imgView setImage: img];
diff --git a/src/nsterm.h b/src/nsterm.h
index d8ffd93a71b..c06b7c49a6d 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -396,6 +396,7 @@ typedef float EmacsCGFloat;
396- condemn; 396- condemn;
397- reprieve; 397- reprieve;
398- (bool)judge; 398- (bool)judge;
399+ (CGFloat)scrollerWidth;
399@end 400@end
400 401
401 402
diff --git a/src/nsterm.m b/src/nsterm.m
index 6a4d0a6ad23..67a03898d13 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1538,7 +1538,7 @@ ns_get_color (const char *name, NSColor **col)
1538{ 1538{
1539 NSColor *new = nil; 1539 NSColor *new = nil;
1540 static char hex[20]; 1540 static char hex[20];
1541 int scaling; 1541 int scaling = 0;
1542 float r = -1.0, g, b; 1542 float r = -1.0, g, b;
1543 NSString *nsname = [NSString stringWithUTF8String: name]; 1543 NSString *nsname = [NSString stringWithUTF8String: name];
1544 1544
@@ -2093,6 +2093,18 @@ ns_clear_frame_area (struct frame *f, int x, int y, int width, int height)
2093 return; 2093 return;
2094} 2094}
2095 2095
2096static void
2097ns_copy_bits (struct frame *f, NSRect src, NSRect dest)
2098{
2099 if (FRAME_NS_VIEW (f))
2100 {
2101 ns_focus (f, &dest, 1);
2102 [FRAME_NS_VIEW (f) scrollRect: src
2103 by: NSMakeSize (dest.origin.x - src.origin.x,
2104 dest.origin.y - src.origin.y)];
2105 ns_unfocus (f);
2106 }
2107}
2096 2108
2097static void 2109static void
2098ns_scroll_run (struct window *w, struct run *run) 2110ns_scroll_run (struct window *w, struct run *run)
@@ -2145,11 +2157,8 @@ ns_scroll_run (struct window *w, struct run *run)
2145 { 2157 {
2146 NSRect srcRect = NSMakeRect (x, from_y, width, height); 2158 NSRect srcRect = NSMakeRect (x, from_y, width, height);
2147 NSRect dstRect = NSMakeRect (x, to_y, width, height); 2159 NSRect dstRect = NSMakeRect (x, to_y, width, height);
2148 NSPoint dstOrigin = NSMakePoint (x, to_y);
2149 2160
2150 ns_focus (f, &dstRect, 1); 2161 ns_copy_bits (f, srcRect , dstRect);
2151 NSCopyBits (0, srcRect , dstOrigin);
2152 ns_unfocus (f);
2153 } 2162 }
2154 2163
2155 unblock_input (); 2164 unblock_input ();
@@ -2205,13 +2214,10 @@ ns_shift_glyphs_for_insert (struct frame *f,
2205{ 2214{
2206 NSRect srcRect = NSMakeRect (x, y, width, height); 2215 NSRect srcRect = NSMakeRect (x, y, width, height);
2207 NSRect dstRect = NSMakeRect (x+shift_by, y, width, height); 2216 NSRect dstRect = NSMakeRect (x+shift_by, y, width, height);
2208 NSPoint dstOrigin = dstRect.origin;
2209 2217
2210 NSTRACE (ns_shift_glyphs_for_insert); 2218 NSTRACE (ns_shift_glyphs_for_insert);
2211 2219
2212 ns_focus (f, &dstRect, 1); 2220 ns_copy_bits (f, srcRect, dstRect);
2213 NSCopyBits (0, srcRect, dstOrigin);
2214 ns_unfocus (f);
2215} 2221}
2216 2222
2217 2223
@@ -2459,6 +2465,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
2459 2465
2460 switch (cursor_type) 2466 switch (cursor_type)
2461 { 2467 {
2468 case DEFAULT_CURSOR:
2462 case NO_CURSOR: 2469 case NO_CURSOR:
2463 break; 2470 break;
2464 case FILLED_BOX_CURSOR: 2471 case FILLED_BOX_CURSOR:
@@ -3957,7 +3964,6 @@ ns_set_horizontal_scroll_bar (struct window *window,
3957 EmacsScroller *bar; 3964 EmacsScroller *bar;
3958 int top, height, left, width; 3965 int top, height, left, width;
3959 int window_x, window_width; 3966 int window_x, window_width;
3960 int pixel_width = WINDOW_PIXEL_WIDTH (window);
3961 BOOL update_p = YES; 3967 BOOL update_p = YES;
3962 3968
3963 /* optimization; display engine sends WAY too many of these.. */ 3969 /* optimization; display engine sends WAY too many of these.. */
@@ -4315,6 +4321,7 @@ ns_create_terminal (struct ns_display_info *dpyinfo)
4315 terminal->menu_show_hook = ns_menu_show; 4321 terminal->menu_show_hook = ns_menu_show;
4316 terminal->popup_dialog_hook = ns_popup_dialog; 4322 terminal->popup_dialog_hook = ns_popup_dialog;
4317 terminal->set_vertical_scroll_bar_hook = ns_set_vertical_scroll_bar; 4323 terminal->set_vertical_scroll_bar_hook = ns_set_vertical_scroll_bar;
4324 terminal->set_horizontal_scroll_bar_hook = ns_set_horizontal_scroll_bar;
4318 terminal->condemn_scroll_bars_hook = ns_condemn_scroll_bars; 4325 terminal->condemn_scroll_bars_hook = ns_condemn_scroll_bars;
4319 terminal->redeem_scroll_bar_hook = ns_redeem_scroll_bar; 4326 terminal->redeem_scroll_bar_hook = ns_redeem_scroll_bar;
4320 terminal->judge_scroll_bars_hook = ns_judge_scroll_bars; 4327 terminal->judge_scroll_bars_hook = ns_judge_scroll_bars;
@@ -4599,7 +4606,7 @@ ns_term_shutdown (int sig)
4599 4606
4600- (id)init 4607- (id)init
4601{ 4608{
4602 if (self = [super init]) 4609 if ((self = [super init]))
4603 { 4610 {
4604#ifdef NS_IMPL_COCOA 4611#ifdef NS_IMPL_COCOA
4605 self->isFirst = YES; 4612 self->isFirst = YES;
@@ -4886,21 +4893,43 @@ ns_term_shutdown (int sig)
4886 EV_TRAILER ((id)nil); 4893 EV_TRAILER ((id)nil);
4887} 4894}
4888 4895
4896static bool
4897runAlertPanel(NSString *title,
4898 NSString *msgFormat,
4899 NSString *defaultButton,
4900 NSString *alternateButton)
4901{
4902#if !defined (NS_IMPL_COCOA) || \
4903 MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_9
4904 return NSRunAlertPanel(title, msgFormat, defaultButton, alternateButton, nil)
4905 == NSAlertDefaultReturn;
4906#else
4907 NSAlert *alert = [[NSAlert alloc] init];
4908 [alert setAlertStyle: NSCriticalAlertStyle];
4909 [alert setMessageText: msgFormat];
4910 [alert addButtonWithTitle: defaultButton];
4911 [alert addButtonWithTitle: alternateButton];
4912 NSInteger ret = [alert runModal];
4913 [alert release];
4914 return ret == NSAlertFirstButtonReturn;
4915#endif
4916}
4917
4889 4918
4890- (NSApplicationTerminateReply)applicationShouldTerminate: (id)sender 4919- (NSApplicationTerminateReply)applicationShouldTerminate: (id)sender
4891{ 4920{
4892 int ret; 4921 bool ret;
4893 4922
4894 if (NILP (ns_confirm_quit)) // || ns_shutdown_properly --> TO DO 4923 if (NILP (ns_confirm_quit)) // || ns_shutdown_properly --> TO DO
4895 return NSTerminateNow; 4924 return NSTerminateNow;
4896 4925
4897 ret = NSRunAlertPanel(ns_app_name, 4926 ret = runAlertPanel(ns_app_name,
4898 @"Exit requested. Would you like to Save Buffers and Exit, or Cancel the request?", 4927 @"Exit requested. Would you like to Save Buffers and Exit, or Cancel the request?",
4899 @"Save Buffers and Exit", @"Cancel", nil); 4928 @"Save Buffers and Exit", @"Cancel");
4900 4929
4901 if (ret == NSAlertDefaultReturn) 4930 if (ret)
4902 return NSTerminateNow; 4931 return NSTerminateNow;
4903 else if (ret == NSAlertAlternateReturn) 4932 else
4904 return NSTerminateCancel; 4933 return NSTerminateCancel;
4905 return NSTerminateNow; /* just in case */ 4934 return NSTerminateNow; /* just in case */
4906} 4935}
@@ -5244,9 +5273,6 @@ not_in_argv (NSString *arg)
5244 int code; 5273 int code;
5245 unsigned fnKeysym = 0; 5274 unsigned fnKeysym = 0;
5246 static NSMutableArray *nsEvArray; 5275 static NSMutableArray *nsEvArray;
5247#ifdef NS_IMPL_GNUSTEP
5248 static BOOL firstTime = YES;
5249#endif
5250 int left_is_none; 5276 int left_is_none;
5251 unsigned int flags = [theEvent modifierFlags]; 5277 unsigned int flags = [theEvent modifierFlags];
5252 5278
@@ -5475,18 +5501,6 @@ not_in_argv (NSString *arg)
5475 } 5501 }
5476 5502
5477 5503
5478#ifdef NS_IMPL_GNUSTEP
5479 /* if we get here we should send the key for input manager processing */
5480 /* Disable warning, there is nothing a user can do about it anyway, and
5481 it does not seem to matter. */
5482#if 0
5483 if (firstTime && [[NSInputManager currentInputManager]
5484 wantsToDelayTextChangeNotifications] == NO)
5485 fprintf (stderr,
5486 "Emacs: WARNING: TextInput mgr wants marked text to be permanent!\n");
5487#endif
5488 firstTime = NO;
5489#endif
5490 if (NS_KEYLOG && !processingCompose) 5504 if (NS_KEYLOG && !processingCompose)
5491 fprintf (stderr, "keyDown: Begin compose sequence.\n"); 5505 fprintf (stderr, "keyDown: Begin compose sequence.\n");
5492 5506
@@ -6251,8 +6265,10 @@ if (cols > 0 && rows > 0)
6251 6265
6252 [win setAcceptsMouseMovedEvents: YES]; 6266 [win setAcceptsMouseMovedEvents: YES];
6253 [win setDelegate: self]; 6267 [win setDelegate: self];
6268#if !defined (NS_IMPL_COCOA) || \
6269 MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_9
6254 [win useOptimizedDrawing: YES]; 6270 [win useOptimizedDrawing: YES];
6255 6271#endif
6256 sz.width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f); 6272 sz.width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
6257 sz.height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f); 6273 sz.height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
6258 [win setResizeIncrements: sz]; 6274 [win setResizeIncrements: sz];
@@ -6313,8 +6329,10 @@ if (cols > 0 && rows > 0)
6313 if ([col alphaComponent] != (EmacsCGFloat) 1.0) 6329 if ([col alphaComponent] != (EmacsCGFloat) 1.0)
6314 [win setOpaque: NO]; 6330 [win setOpaque: NO];
6315 6331
6332#if !defined (NS_IMPL_COCOA) || \
6333 MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_9
6316 [self allocateGState]; 6334 [self allocateGState];
6317 6335#endif
6318 [NSApp registerServicesMenuSendTypes: ns_send_types 6336 [NSApp registerServicesMenuSendTypes: ns_send_types
6319 returnTypes: nil]; 6337 returnTypes: nil];
6320 6338
@@ -6369,7 +6387,7 @@ if (cols > 0 && rows > 0)
6369 } 6387 }
6370 else if (next_maximized == FULLSCREEN_HEIGHT 6388 else if (next_maximized == FULLSCREEN_HEIGHT
6371 || (next_maximized == -1 6389 || (next_maximized == -1
6372 && abs (defaultFrame.size.height - result.size.height) 6390 && abs ((int)(defaultFrame.size.height - result.size.height))
6373 > FRAME_LINE_HEIGHT (emacsframe))) 6391 > FRAME_LINE_HEIGHT (emacsframe)))
6374 { 6392 {
6375 /* first click */ 6393 /* first click */
@@ -6392,7 +6410,7 @@ if (cols > 0 && rows > 0)
6392 } 6410 }
6393 else if (next_maximized == FULLSCREEN_MAXIMIZED 6411 else if (next_maximized == FULLSCREEN_MAXIMIZED
6394 || (next_maximized == -1 6412 || (next_maximized == -1
6395 && abs (defaultFrame.size.width - result.size.width) 6413 && abs ((int)(defaultFrame.size.width - result.size.width))
6396 > FRAME_COLUMN_WIDTH (emacsframe))) 6414 > FRAME_COLUMN_WIDTH (emacsframe)))
6397 { 6415 {
6398 result = defaultFrame; /* second click */ 6416 result = defaultFrame; /* second click */
@@ -6639,7 +6657,10 @@ if (cols > 0 && rows > 0)
6639 [fw setTitle:[w title]]; 6657 [fw setTitle:[w title]];
6640 [fw setDelegate:self]; 6658 [fw setDelegate:self];
6641 [fw setAcceptsMouseMovedEvents: YES]; 6659 [fw setAcceptsMouseMovedEvents: YES];
6660#if !defined (NS_IMPL_COCOA) || \
6661 MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_9
6642 [fw useOptimizedDrawing: YES]; 6662 [fw useOptimizedDrawing: YES];
6663#endif
6643 [fw setResizeIncrements: sz]; 6664 [fw setResizeIncrements: sz];
6644 [fw setBackgroundColor: col]; 6665 [fw setBackgroundColor: col];
6645 if ([col alphaComponent] != (EmacsCGFloat) 1.0) 6666 if ([col alphaComponent] != (EmacsCGFloat) 1.0)
@@ -6882,7 +6903,7 @@ if (cols > 0 && rows > 0)
6882/* NSDraggingDestination protocol methods. Actually this is not really a 6903/* NSDraggingDestination protocol methods. Actually this is not really a
6883 protocol, but a category of Object. O well... */ 6904 protocol, but a category of Object. O well... */
6884 6905
6885-(NSUInteger) draggingEntered: (id <NSDraggingInfo>) sender 6906-(NSDragOperation) draggingEntered: (id <NSDraggingInfo>) sender
6886{ 6907{
6887 NSTRACE (draggingEntered); 6908 NSTRACE (draggingEntered);
6888 return NSDragOperationGeneric; 6909 return NSDragOperationGeneric;
@@ -7167,7 +7188,6 @@ if (cols > 0 && rows > 0)
7167 one screen, we want to constrain. Other times not. */ 7188 one screen, we want to constrain. Other times not. */
7168 NSArray *screens = [NSScreen screens]; 7189 NSArray *screens = [NSScreen screens];
7169 NSUInteger nr_screens = [screens count], nr_eff_screens = 0, i; 7190 NSUInteger nr_screens = [screens count], nr_eff_screens = 0, i;
7170 struct frame *f = ((EmacsView *)[self delegate])->emacsframe;
7171 NSTRACE (constrainFrameRect); 7191 NSTRACE (constrainFrameRect);
7172 NSTRACE_RECT ("input", frameRect); 7192 NSTRACE_RECT ("input", frameRect);
7173 7193
@@ -7263,7 +7283,15 @@ if (cols > 0 && rows > 0)
7263{ 7283{
7264 /* TODO: if we want to allow variable widths, this is the place to do it, 7284 /* TODO: if we want to allow variable widths, this is the place to do it,
7265 however neither GNUstep nor Cocoa support it very well */ 7285 however neither GNUstep nor Cocoa support it very well */
7266 return [NSScroller scrollerWidth]; 7286 CGFloat r;
7287#if !defined (NS_IMPL_COCOA) || \
7288 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
7289 r = [NSScroller scrollerWidth];
7290#else
7291 r = [NSScroller scrollerWidthForControlSize: NSRegularControlSize
7292 scrollerStyle: NSScrollerStyleLegacy];
7293#endif
7294 return r;
7267} 7295}
7268 7296
7269 7297