aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-07-08 13:22:17 -0700
committerPaul Eggert2011-07-08 13:22:17 -0700
commit67517972df013491db07d81f516c7e56ddc214c8 (patch)
treecbe742bb4f4f075bcbb670ea22dab331053f487a
parent2a84b02da8b20138fad7fafdea92d7c8f0564ee0 (diff)
parent1b85461891d3354aef97bec97fab891ddb24e06e (diff)
downloademacs-67517972df013491db07d81f516c7e56ddc214c8.tar.gz
emacs-67517972df013491db07d81f516c7e56ddc214c8.zip
Merge from trunk.
-rw-r--r--ChangeLog2
-rwxr-xr-xautogen/configure84
-rw-r--r--lisp/ChangeLog63
-rw-r--r--lisp/abbrev.el35
-rw-r--r--lisp/custom.el6
-rw-r--r--lisp/mail/sendmail.el11
-rw-r--r--lisp/net/tramp-sh.el7
-rw-r--r--lisp/vc/vc-bzr.el2
-rw-r--r--src/ChangeLog49
-rw-r--r--src/emacs.c4
-rw-r--r--src/gtkutil.c25
-rw-r--r--src/nsfns.m5
-rw-r--r--src/nsimage.m4
-rw-r--r--src/nsmenu.m2
-rw-r--r--src/nsselect.m6
-rw-r--r--src/nsterm.h35
-rw-r--r--src/nsterm.m25
-rw-r--r--src/w32fns.c9
18 files changed, 269 insertions, 105 deletions
diff --git a/ChangeLog b/ChangeLog
index 845fce543b6..1a25ba8e33d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,8 @@
14 * src/Makefile.in (LIB_PTHREAD_SIGMASK): New macro. 14 * src/Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
15 (LIBES): Use it. 15 (LIBES): Use it.
16 16
17 * lib/getopt.c, lib/unistd.in.h, m4/getopt.m4: Merge from gnulib.
18
172011-07-07 Andreas Schwab <schwab@linux-m68k.org> 192011-07-07 Andreas Schwab <schwab@linux-m68k.org>
18 20
19 * configure.in (maintainer-mode): Reflect default in help string. 21 * configure.in (maintainer-mode): Reflect default in help string.
diff --git a/autogen/configure b/autogen/configure
index 7e45acbdb83..10bdf24c3a9 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -1932,8 +1932,8 @@ Optional Features:
1932 --disable-ns-self-contained 1932 --disable-ns-self-contained
1933 disable self contained build under NeXTstep 1933 disable self contained build under NeXTstep
1934 --enable-asserts compile code with asserts enabled 1934 --enable-asserts compile code with asserts enabled
1935 --enable-maintainer-mode 1935 --disable-maintainer-mode
1936 enable make rules and dependencies not useful (and 1936 disable make rules and dependencies not useful (and
1937 sometimes confusing) to the casual installer 1937 sometimes confusing) to the casual installer
1938 --enable-locallisppath=PATH 1938 --enable-locallisppath=PATH
1939 directories Emacs should search for lisp files 1939 directories Emacs should search for lisp files
@@ -14918,7 +14918,7 @@ int *p = &optreset; return optreset;
14918 return 0; 14918 return 0;
14919} 14919}
14920_ACEOF 14920_ACEOF
14921if ac_fn_c_try_compile "$LINENO"; then : 14921if ac_fn_c_try_link "$LINENO"; then :
14922 gl_optind_min=1 14922 gl_optind_min=1
14923else 14923else
14924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14939,7 +14939,8 @@ else
14939fi 14939fi
14940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14941fi 14941fi
14942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14942rm -f core conftest.err conftest.$ac_objext \
14943 conftest$ac_exeext conftest.$ac_ext
14943 14944
14944 gl_save_CPPFLAGS=$CPPFLAGS 14945 gl_save_CPPFLAGS=$CPPFLAGS
14945 CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" 14946 CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
@@ -14962,22 +14963,20 @@ int
14962main () 14963main ()
14963{ 14964{
14964 { 14965 {
14965 int argc = 0; 14966 static char program[] = "program";
14966 char *argv[10]; 14967 static char a[] = "-a";
14968 static char foo[] = "foo";
14969 static char bar[] = "bar";
14970 char *argv[] = { program, a, foo, bar, NULL };
14967 int c; 14971 int c;
14968 14972
14969 argv[argc++] = "program";
14970 argv[argc++] = "-a";
14971 argv[argc++] = "foo";
14972 argv[argc++] = "bar";
14973 argv[argc] = NULL;
14974 optind = OPTIND_MIN; 14973 optind = OPTIND_MIN;
14975 opterr = 0; 14974 opterr = 0;
14976 14975
14977 c = getopt (argc, argv, "ab"); 14976 c = getopt (4, argv, "ab");
14978 if (!(c == 'a')) 14977 if (!(c == 'a'))
14979 return 1; 14978 return 1;
14980 c = getopt (argc, argv, "ab"); 14979 c = getopt (4, argv, "ab");
14981 if (!(c == -1)) 14980 if (!(c == -1))
14982 return 2; 14981 return 2;
14983 if (!(optind == 2)) 14982 if (!(optind == 2))
@@ -14985,22 +14984,20 @@ main ()
14985 } 14984 }
14986 /* Some internal state exists at this point. */ 14985 /* Some internal state exists at this point. */
14987 { 14986 {
14988 int argc = 0; 14987 static char program[] = "program";
14989 char *argv[10]; 14988 static char donald[] = "donald";
14989 static char p[] = "-p";
14990 static char billy[] = "billy";
14991 static char duck[] = "duck";
14992 static char a[] = "-a";
14993 static char bar[] = "bar";
14994 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
14990 int c; 14995 int c;
14991 14996
14992 argv[argc++] = "program";
14993 argv[argc++] = "donald";
14994 argv[argc++] = "-p";
14995 argv[argc++] = "billy";
14996 argv[argc++] = "duck";
14997 argv[argc++] = "-a";
14998 argv[argc++] = "bar";
14999 argv[argc] = NULL;
15000 optind = OPTIND_MIN; 14997 optind = OPTIND_MIN;
15001 opterr = 0; 14998 opterr = 0;
15002 14999
15003 c = getopt (argc, argv, "+abp:q:"); 15000 c = getopt (7, argv, "+abp:q:");
15004 if (!(c == -1)) 15001 if (!(c == -1))
15005 return 4; 15002 return 4;
15006 if (!(strcmp (argv[0], "program") == 0)) 15003 if (!(strcmp (argv[0], "program") == 0))
@@ -15022,7 +15019,9 @@ main ()
15022 } 15019 }
15023 /* Detect MacOS 10.5, AIX 7.1 bug. */ 15020 /* Detect MacOS 10.5, AIX 7.1 bug. */
15024 { 15021 {
15025 char *argv[3] = { "program", "-ab", NULL }; 15022 static char program[] = "program";
15023 static char ab[] = "-ab";
15024 char *argv[3] = { program, ab, NULL };
15026 optind = OPTIND_MIN; 15025 optind = OPTIND_MIN;
15027 opterr = 0; 15026 opterr = 0;
15028 if (getopt (2, argv, "ab:") != 'a') 15027 if (getopt (2, argv, "ab:") != 'a')
@@ -15101,19 +15100,22 @@ main ()
15101 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, 15100 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
15102 OSF/1 5.1, Solaris 10. */ 15101 OSF/1 5.1, Solaris 10. */
15103 { 15102 {
15104 char *myargv[3]; 15103 static char conftest[] = "conftest";
15105 myargv[0] = "conftest"; 15104 static char plus[] = "-+";
15106 myargv[1] = "-+"; 15105 char *argv[3] = { conftest, plus, NULL };
15107 myargv[2] = 0;
15108 opterr = 0; 15106 opterr = 0;
15109 if (getopt (2, myargv, "+a") != '?') 15107 if (getopt (2, argv, "+a") != '?')
15110 result |= 1; 15108 result |= 1;
15111 } 15109 }
15112 /* This code succeeds on glibc 2.8, mingw, 15110 /* This code succeeds on glibc 2.8, mingw,
15113 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, 15111 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
15114 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ 15112 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
15115 { 15113 {
15116 char *argv[] = { "program", "-p", "foo", "bar", NULL }; 15114 static char program[] = "program";
15115 static char p[] = "-p";
15116 static char foo[] = "foo";
15117 static char bar[] = "bar";
15118 char *argv[] = { program, p, foo, bar, NULL };
15117 15119
15118 optind = 1; 15120 optind = 1;
15119 if (getopt (4, argv, "p::") != 'p') 15121 if (getopt (4, argv, "p::") != 'p')
@@ -15127,7 +15129,10 @@ main ()
15127 } 15129 }
15128 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ 15130 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
15129 { 15131 {
15130 char *argv[] = { "program", "foo", "-p", NULL }; 15132 static char program[] = "program";
15133 static char foo[] = "foo";
15134 static char p[] = "-p";
15135 char *argv[] = { program, foo, p, NULL };
15131 optind = 0; 15136 optind = 0;
15132 if (getopt (3, argv, "-p") != 1) 15137 if (getopt (3, argv, "-p") != 1)
15133 result |= 16; 15138 result |= 16;
@@ -15136,13 +15141,26 @@ main ()
15136 } 15141 }
15137 /* This code fails on glibc 2.11. */ 15142 /* This code fails on glibc 2.11. */
15138 { 15143 {
15139 char *argv[] = { "program", "-b", "-a", NULL }; 15144 static char program[] = "program";
15145 static char b[] = "-b";
15146 static char a[] = "-a";
15147 char *argv[] = { program, b, a, NULL };
15140 optind = opterr = 0; 15148 optind = opterr = 0;
15141 if (getopt (3, argv, "+:a:b") != 'b') 15149 if (getopt (3, argv, "+:a:b") != 'b')
15142 result |= 64; 15150 result |= 64;
15143 else if (getopt (3, argv, "+:a:b") != ':') 15151 else if (getopt (3, argv, "+:a:b") != ':')
15144 result |= 64; 15152 result |= 64;
15145 } 15153 }
15154 /* This code dumps core on glibc 2.14. */
15155 {
15156 static char program[] = "program";
15157 static char w[] = "-W";
15158 static char dummy[] = "dummy";
15159 char *argv[] = { program, w, dummy, NULL };
15160 optind = opterr = 1;
15161 if (getopt (3, argv, "W;") != 'W')
15162 result |= 128;
15163 }
15146 return result; 15164 return result;
15147 15165
15148 ; 15166 ;
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 35337de3fa4..729013ba54c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,23 @@
12011-07-08 Andreas Schwab <schwab@linux-m68k.org>
2
3 * mail/sendmail.el (send-mail-function): No longer delay custom
4 initialization.
5 * custom.el (custom-initialize-delay): Doc fix.
6
72011-07-08 Stefan Monnier <monnier@iro.umontreal.ca>
8
9 * abbrev.el (expand-abbrev): Try to preserve point (bug#5805).
10
112011-07-08 Michael Albinus <michael.albinus@gmx.de>
12
13 * net/tramp-sh.el (tramp-sh-handle-start-file-process): Use a
14 human-friendly prompt.
15
162011-07-08 Stefan Monnier <monnier@iro.umontreal.ca>
17
18 * vc/vc-bzr.el (vc-bzr-revision-keywords): Remove svn, it's only
19 provided by a particular plugin.
20
12011-07-08 Lars Magne Ingebrigtsen <larsi@gnus.org> 212011-07-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 22
3 * mail/sendmail.el (sendmail-query-once): If we aren't allowed to 23 * mail/sendmail.el (sendmail-query-once): If we aren't allowed to
@@ -41,7 +61,7 @@
41 * info.el (Info-mode-map): Remove S-TAB binding, since [backtab] 61 * info.el (Info-mode-map): Remove S-TAB binding, since [backtab]
42 should cover it (bug#1281). 62 should cover it (bug#1281).
43 63
44 * cus-edit.el (custom-show): Marked as obsolete. 64 * cus-edit.el (custom-show): Mark as obsolete.
45 65
46 * net/network-stream.el (network-stream-open-starttls): If gnutls 66 * net/network-stream.el (network-stream-open-starttls): If gnutls
47 negotiation fails, then possibly try again with a non-encrypted 67 negotiation fails, then possibly try again with a non-encrypted
@@ -62,18 +82,17 @@
62 82
63 * international/characters.el (build-unicode-category-table): 83 * international/characters.el (build-unicode-category-table):
64 Delete it. 84 Delete it.
65 (unicode-category-table): Set it by 85 (unicode-category-table): Set it by unicode-property-table-internal.
66 unicode-prroperty-table-internal.
67 86
68 * international/mule-cmds.el (char-code-property-alist): Moved to 87 * international/mule-cmds.el (char-code-property-alist): Move to
69 to src/chartab.c. 88 to src/chartab.c.
70 (get-char-code-property): Call unicode-property-table-internal to 89 (get-char-code-property): Call unicode-property-table-internal to
71 load a file. Call get-unicode-property-internal where necessary. 90 load a file. Call get-unicode-property-internal where necessary.
72 (put-char-code-property): Call unicode-property-table-internal to 91 (put-char-code-property): Call unicode-property-table-internal to
73 load a file. Call put-unicode-property-internal where necessary. 92 load a file. Call put-unicode-property-internal where necessary.
74 put-unicode-property-internal where necessary. 93 put-unicode-property-internal where necessary.
75 (char-code-property-description): Call 94 (char-code-property-description):
76 unicode-property-table-internal to load a file. 95 Call unicode-property-table-internal to load a file.
77 96
78 * international/charprop.el: 97 * international/charprop.el:
79 * international/uni-bidi.el: 98 * international/uni-bidi.el:
@@ -142,8 +161,8 @@
1422011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org> 1612011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
143 162
144 * emacs-lisp/lisp-mode.el (eval-defun-1): Update the documentation 163 * emacs-lisp/lisp-mode.el (eval-defun-1): Update the documentation
145 of faces when `M-C-x'-ing their definitions (bug#8378). Also 164 of faces when `M-C-x'-ing their definitions (bug#8378).
146 clean up the code slightly. 165 Also clean up the code slightly.
147 166
148 * progmodes/grep.el (rgrep): Don't bind `process-connection-type', 167 * progmodes/grep.el (rgrep): Don't bind `process-connection-type',
149 because that makes the colours go away. 168 because that makes the colours go away.
@@ -167,39 +186,38 @@
1672011-07-06 Michael R. Mauger <mmaug@yahoo.com> 1862011-07-06 Michael R. Mauger <mmaug@yahoo.com>
168 187
169 * progmodes/sql.el: Version 3.0 188 * progmodes/sql.el: Version 3.0
170 (sql-product-alist): Added product :completion-object, 189 (sql-product-alist): Add product :completion-object,
171 :completion-column, and :statement attributes. 190 :completion-column, and :statement attributes.
172 (sql-mode-menu, sql-interactive-mode-map): Fixed List entries. 191 (sql-mode-menu, sql-interactive-mode-map): Fix List entries.
173 (sql-mode-syntax-table): Mark all punctuation. 192 (sql-mode-syntax-table): Mark all punctuation.
174 (sql-font-lock-keywords-builder): Temporarily removed fallback on 193 (sql-font-lock-keywords-builder): Temporarily remove fallback on
175 ansi keywords. 194 ansi keywords.
176 (sql-regexp-abbrev, sql-regexp-abbrev-list): New functions. 195 (sql-regexp-abbrev, sql-regexp-abbrev-list): New functions.
177 (sql-mode-oracle-font-lock-keywords): Improved. 196 (sql-mode-oracle-font-lock-keywords): Improve.
178 (sql-oracle-show-reserved-words): New function for development. 197 (sql-oracle-show-reserved-words): New function for development.
179 (sql-product-font-lock): Simplify for source code buffers. 198 (sql-product-font-lock): Simplify for source code buffers.
180 (sql-product-syntax-table, sql-product-font-lock-syntax-alist): 199 (sql-product-syntax-table, sql-product-font-lock-syntax-alist):
181 New functions. 200 New functions.
182 (sql-highlight-product): Set product specific syntax table. 201 (sql-highlight-product): Set product specific syntax table.
183 (sql-mode-map): Added statement movement functions. 202 (sql-mode-map): Add statement movement functions.
184 (sql-ansi-statement-starters, sql-oracle-statement-starters): New 203 (sql-ansi-statement-starters, sql-oracle-statement-starters):
185 variable. 204 New variable.
186 (sql-statement-regexp, sql-beginning-of-statement) 205 (sql-statement-regexp, sql-beginning-of-statement)
187 (sql-end-of-statement, sql-signum): New functions. 206 (sql-end-of-statement, sql-signum): New functions.
188 (sql-buffer-live-p, sql=find-sqli-buffer): Added CONNECTION 207 (sql-buffer-live-p, sql=find-sqli-buffer): Add CONNECTION parameter.
189 parameter.
190 (sql-show-sqli-buffer): Bug fix. 208 (sql-show-sqli-buffer): Bug fix.
191 (sql-interactive-mode): Store connection data as buffer local. 209 (sql-interactive-mode): Store connection data as buffer local.
192 (sql-connect): Added NEW-NAME parameter. Redesigned interaction 210 (sql-connect): Add NEW-NAME parameter. Redesign interaction
193 with sql-interactive-mode. 211 with sql-interactive-mode.
194 (sql-save-connection): Save buffer local settings. 212 (sql-save-connection): Save buffer local settings.
195 (sql-connection-menu-filter): Changed menu entry name. 213 (sql-connection-menu-filter): Change menu entry name.
196 (sql-product-interactive): Bug fix. 214 (sql-product-interactive): Bug fix.
197 (sql-preoutput-hold): New variable. 215 (sql-preoutput-hold): New variable.
198 (sql-interactive-remove-continuation-prompt): Bug fixes. 216 (sql-interactive-remove-continuation-prompt): Bug fixes.
199 (sql-debug-redirect): New variable. 217 (sql-debug-redirect): New variable.
200 (sql-str-literal): New function. 218 (sql-str-literal): New function.
201 (sql-redirect, sql-redirect-one, sql-redirect-value, sql-execute): 219 (sql-redirect, sql-redirect-one, sql-redirect-value, sql-execute):
202 Redesigned. 220 Redesign.
203 (sql-oracle-save-settings, sql-oracle-restore-settings) 221 (sql-oracle-save-settings, sql-oracle-restore-settings)
204 (sql-oracle-list-all, sql-oracle-list-table): New functions. 222 (sql-oracle-list-all, sql-oracle-list-table): New functions.
205 (sql-completion-object, sql-completion-column) 223 (sql-completion-object, sql-completion-column)
@@ -372,9 +390,8 @@
372 buffer-saved-size and some allout state to not inhibit auto-saves 390 buffer-saved-size and some allout state to not inhibit auto-saves
373 if there are no longer any plain-text topics pending encryption. 391 if there are no longer any plain-text topics pending encryption.
374 392
375 (allout-next-topic-pending-encryption), 393 (allout-next-topic-pending-encryption, allout-encrypt-decrypted):
376 (allout-encrypt-decrypted): No longer provide for exemption of the 394 No longer provide for exemption of the current topic.
377 current topic.
378 395
3792011-07-04 Juri Linkov <juri@jurta.org> 3962011-07-04 Juri Linkov <juri@jurta.org>
380 397
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 2122f43bbad..3795dd46010 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -814,19 +814,28 @@ Returns the abbrev symbol, if expansion took place."
814 (destructuring-bind (&optional sym name wordstart wordend) 814 (destructuring-bind (&optional sym name wordstart wordend)
815 (abbrev--before-point) 815 (abbrev--before-point)
816 (when sym 816 (when sym
817 (unless (or ;; executing-kbd-macro 817 (let ((startpos (copy-marker (point) t))
818 noninteractive 818 (endmark (copy-marker wordend t)))
819 (window-minibuffer-p (selected-window))) 819 (unless (or ;; executing-kbd-macro
820 ;; Add an undo boundary, in case we are doing this for 820 noninteractive
821 ;; a self-inserting command which has avoided making one so far. 821 (window-minibuffer-p (selected-window)))
822 (undo-boundary)) 822 ;; Add an undo boundary, in case we are doing this for
823 ;; Now sym is the abbrev symbol. 823 ;; a self-inserting command which has avoided making one so far.
824 (setq last-abbrev-text name) 824 (undo-boundary))
825 (setq last-abbrev sym) 825 ;; Now sym is the abbrev symbol.
826 (setq last-abbrev-location wordstart) 826 (setq last-abbrev-text name)
827 ;; If this abbrev has an expansion, delete the abbrev 827 (setq last-abbrev sym)
828 ;; and insert the expansion. 828 (setq last-abbrev-location wordstart)
829 (abbrev-insert sym name wordstart wordend))))) 829 ;; If this abbrev has an expansion, delete the abbrev
830 ;; and insert the expansion.
831 (prog1
832 (abbrev-insert sym name wordstart wordend)
833 ;; Yuck!! If expand-abbrev is called with point slightly
834 ;; further than the end of the abbrev, move point back to
835 ;; where it started.
836 (if (and (> startpos endmark)
837 (= (point) endmark)) ;Obey skeletons that move point.
838 (goto-char startpos))))))))
830 839
831(defun unexpand-abbrev () 840(defun unexpand-abbrev ()
832 "Undo the expansion of the last abbrev that expanded. 841 "Undo the expansion of the last abbrev that expanded.
diff --git a/lisp/custom.el b/lisp/custom.el
index a5c0065036a..4f69c741468 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -120,8 +120,10 @@ the :set function.
120For variables in preloaded files, you can simply use this 120For variables in preloaded files, you can simply use this
121function for the :initialize property. For autoloaded variables, 121function for the :initialize property. For autoloaded variables,
122you will also need to add an autoload stanza calling this 122you will also need to add an autoload stanza calling this
123function, and another one setting the standard-value property. 123function, and another one setting the standard-value property."
124See `send-mail-function' in sendmail.el for an example." 124 ;; No longer true:
125 ;; "See `send-mail-function' in sendmail.el for an example."
126
125 ;; Until the var is actually initialized, it is kept unbound. 127 ;; Until the var is actually initialized, it is kept unbound.
126 ;; This seemed to be at least as good as setting it to an arbitrary 128 ;; This seemed to be at least as good as setting it to an arbitrary
127 ;; value like nil (evaluating `value' is not an option because it 129 ;; value like nil (evaluating `value' is not an option because it
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index b14c7e50137..5ffc834f533 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -138,14 +138,6 @@ Otherwise, let mailer send back a message to report errors."
138 :group 'sendmail 138 :group 'sendmail
139 :version "23.1") 139 :version "23.1")
140 140
141;; Prevent problems with `window-system' not having the correct value
142;; when loaddefs.el is loaded. `custom-reevaluate-setting' needs the
143;; standard value.
144;;;###autoload
145(put 'send-mail-function 'standard-value
146 ;; MS-Windows can access the clipboard even under -nw.
147 '('sendmail-query-once))
148
149;; Useful to set in site-init.el 141;; Useful to set in site-init.el
150;;;###autoload 142;;;###autoload
151(defcustom send-mail-function 'sendmail-query-once 143(defcustom send-mail-function 'sendmail-query-once
@@ -161,7 +153,6 @@ This is used by the default mail-sending commands. See also
161 (function-item feedmail-send-it :tag "Use Feedmail package") 153 (function-item feedmail-send-it :tag "Use Feedmail package")
162 (function-item mailclient-send-it :tag "Use Mailclient package") 154 (function-item mailclient-send-it :tag "Use Mailclient package")
163 function) 155 function)
164 :initialize 'custom-initialize-delay
165 :version "24.1" 156 :version "24.1"
166 :group 'sendmail) 157 :group 'sendmail)
167 158
@@ -212,8 +203,6 @@ function to use, and then save that choice."
212 (setq sendmail-query-once-function function)))) 203 (setq sendmail-query-once-function function))))
213 (funcall sendmail-query-once-function)) 204 (funcall sendmail-query-once-function))
214 205
215;;;###autoload(custom-initialize-delay 'send-mail-function nil)
216
217;;;###autoload 206;;;###autoload
218(defcustom mail-header-separator (purecopy "--text follows this line--") 207(defcustom mail-header-separator (purecopy "--text follows this line--")
219 "Line used to separate headers from text in messages being composed." 208 "Line used to separate headers from text in messages being composed."
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index f342b005c4c..1c6f0844be0 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2690,8 +2690,13 @@ the result will be a local, non-Tramp, filename."
2690 ;; When PROGRAM is nil, we just provide a tty. 2690 ;; When PROGRAM is nil, we just provide a tty.
2691 (let ((command 2691 (let ((command
2692 (when (stringp program) 2692 (when (stringp program)
2693 (format "cd %s; exec %s" 2693 (format "cd %s; exec env PS1=%s %s"
2694 (tramp-shell-quote-argument localname) 2694 (tramp-shell-quote-argument localname)
2695 ;; Use a human-friendly prompt, for example for `shell'.
2696 (tramp-shell-quote-argument
2697 (format "%s %s"
2698 (file-remote-p default-directory)
2699 tramp-initial-end-of-output))
2695 (mapconcat 'tramp-shell-quote-argument 2700 (mapconcat 'tramp-shell-quote-argument
2696 (cons program args) " ")))) 2701 (cons program args) " "))))
2697 (tramp-process-connection-type 2702 (tramp-process-connection-type
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 0fdb2230af8..4eff3244cdc 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -1174,7 +1174,7 @@ stream. Standard error output is discarded."
1174 (defconst vc-bzr-revision-keywords 1174 (defconst vc-bzr-revision-keywords
1175 ;; bzr help revisionspec | sed -ne 's/^\([a-z]*\):$/"\1"/p' | sort -u 1175 ;; bzr help revisionspec | sed -ne 's/^\([a-z]*\):$/"\1"/p' | sort -u
1176 '("ancestor" "annotate" "before" "branch" "date" "last" "mainline" "revid" 1176 '("ancestor" "annotate" "before" "branch" "date" "last" "mainline" "revid"
1177 "revno" "submit" "svn" "tag"))) 1177 "revno" "submit" "tag")))
1178 1178
1179(defun vc-bzr-revision-completion-table (files) 1179(defun vc-bzr-revision-completion-table (files)
1180 (lexical-let ((files files)) 1180 (lexical-let ((files files))
diff --git a/src/ChangeLog b/src/ChangeLog
index ccafc9c5963..bd250886ad0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -9,6 +9,55 @@
9 9
102011-07-08 Jan Djärv <jan.h.d@swipnet.se> 102011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11 11
12 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
13 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
14 wrong (Bug#8591).
15
162011-07-08 Jan Djärv <jan.h.d@swipnet.se>
17
18 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
19 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
20 (xg_hide_tooltip): Fix comment.
21
22 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
23 in registerServicesMenuSendTypes.
24 (validRequestorForSendType): Don't check ns_return_types.
25
26 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
27 ns_return_type.
28
292011-07-08 Jason Rumney <jasonr@gnu.org>
30
31 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
32 frame struct members of non-existent frames (Bug#6284).
33
342011-07-08 Jan Djärv <jan.h.d@swipnet.se>
35
36 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
37 variable firstTime not needed on OSX >= 10.6.
38 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
39 >= 10.5. Use setKnobProportion, setDoubleValue.
40
41 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
42 (MAC_OS_X_VERSION_10_5): Define if not defined.
43 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
44 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
45 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
46
47 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
48 cString and lossyCString on OSX >= 10.4
49
50 * nsmenu.m (fillWithWidgetValue): Don't use depercated method
51 sizeToFit on OSX >= 10.2.
52
53 * nsimage.m (allocInitFromFile): Don't use deprecated method
54 bestRepresentationForDevice on OSX >= 10.6.
55
56 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
57 to avoid warning.
58
59 * emacs.c: Declare unexec_init_emacs_zone.
60
12 * nsgui.h: Fix compiler warning about gnulib redefining verify. 61 * nsgui.h: Fix compiler warning about gnulib redefining verify.
13 62
14 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842). 63 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
diff --git a/src/emacs.c b/src/emacs.c
index e4b3a68a6c1..c1d517900ca 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -129,6 +129,10 @@ Lisp_Object empty_unibyte_string, empty_multibyte_string;
129 on subsequent starts. */ 129 on subsequent starts. */
130int initialized; 130int initialized;
131 131
132#ifdef DARWIN_OS
133extern void unexec_init_emacs_zone (void);
134#endif
135
132#ifdef DOUG_LEA_MALLOC 136#ifdef DOUG_LEA_MALLOC
133/* Preserves a pointer to the memory allocated that copies that 137/* Preserves a pointer to the memory allocated that copies that
134 static data inside glibc's malloc. */ 138 static data inside glibc's malloc. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 343fcfa083a..dfc5b63f375 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -633,6 +633,9 @@ qttip_cb (GtkWidget *widget,
633 struct x_output *x = f->output_data.x; 633 struct x_output *x = f->output_data.x;
634 if (x->ttip_widget == NULL) 634 if (x->ttip_widget == NULL)
635 { 635 {
636 GtkWidget *p;
637 GList *list, *iter;
638
636 g_object_set (G_OBJECT (widget), "has-tooltip", FALSE, NULL); 639 g_object_set (G_OBJECT (widget), "has-tooltip", FALSE, NULL);
637 x->ttip_widget = tooltip; 640 x->ttip_widget = tooltip;
638 g_object_ref (G_OBJECT (tooltip)); 641 g_object_ref (G_OBJECT (tooltip));
@@ -640,6 +643,19 @@ qttip_cb (GtkWidget *widget,
640 g_object_ref (G_OBJECT (x->ttip_lbl)); 643 g_object_ref (G_OBJECT (x->ttip_lbl));
641 gtk_tooltip_set_custom (tooltip, x->ttip_lbl); 644 gtk_tooltip_set_custom (tooltip, x->ttip_lbl);
642 x->ttip_window = GTK_WINDOW (gtk_widget_get_toplevel (x->ttip_lbl)); 645 x->ttip_window = GTK_WINDOW (gtk_widget_get_toplevel (x->ttip_lbl));
646
647 /* Change stupid Gtk+ default line wrapping. */
648 p = gtk_widget_get_parent (x->ttip_lbl);
649 list = gtk_container_get_children (GTK_CONTAINER (p));
650 iter;
651 for (iter = list; iter; iter = g_list_next (iter))
652 {
653 GtkWidget *w = GTK_WIDGET (iter->data);
654 if (GTK_IS_LABEL (w))
655 gtk_label_set_line_wrap (GTK_LABEL (w), FALSE);
656 }
657 g_list_free (list);
658
643 /* ATK needs an empty title for some reason. */ 659 /* ATK needs an empty title for some reason. */
644 gtk_window_set_title (x->ttip_window, ""); 660 gtk_window_set_title (x->ttip_window, "");
645 /* Realize so we can safely get screen later on. */ 661 /* Realize so we can safely get screen later on. */
@@ -659,8 +675,8 @@ qttip_cb (GtkWidget *widget,
659 675
660int 676int
661xg_prepare_tooltip (FRAME_PTR f, 677xg_prepare_tooltip (FRAME_PTR f,
662 Lisp_Object string, 678 Lisp_Object string,
663 int *width, 679 int *width,
664 int *height) 680 int *height)
665{ 681{
666#ifndef USE_GTK_TOOLTIP 682#ifndef USE_GTK_TOOLTIP
@@ -697,10 +713,9 @@ xg_prepare_tooltip (FRAME_PTR f,
697 (gtk_widget_get_display (GTK_WIDGET (x->ttip_window))), 713 (gtk_widget_get_display (GTK_WIDGET (x->ttip_window))),
698 "gdk-display-current-tooltip", NULL); 714 "gdk-display-current-tooltip", NULL);
699 715
700 /* Put out dummy widget in so we can get callbacks for unrealize and 716 /* Put our dummy widget in so we can get callbacks for unrealize and
701 hierarchy-changed. */ 717 hierarchy-changed. */
702 gtk_tooltip_set_custom (x->ttip_widget, widget); 718 gtk_tooltip_set_custom (x->ttip_widget, widget);
703
704 gtk_tooltip_set_text (x->ttip_widget, SSDATA (encoded_string)); 719 gtk_tooltip_set_text (x->ttip_widget, SSDATA (encoded_string));
705 gtk_widget_get_preferred_size (GTK_WIDGET (x->ttip_window), NULL, &req); 720 gtk_widget_get_preferred_size (GTK_WIDGET (x->ttip_window), NULL, &req);
706 if (width) *width = req.width; 721 if (width) *width = req.width;
@@ -731,7 +746,7 @@ xg_show_tooltip (FRAME_PTR f, int root_x, int root_y)
731} 746}
732 747
733/* Hide tooltip if shown. Do nothing if not shown. 748/* Hide tooltip if shown. Do nothing if not shown.
734 Return non-zero if tip was hidden, non-ero if not (i.e. not using 749 Return non-zero if tip was hidden, non-zero if not (i.e. not using
735 system tooltips). */ 750 system tooltips). */
736 751
737int 752int
diff --git a/src/nsfns.m b/src/nsfns.m
index d124f61a4f2..0452086201e 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -162,7 +162,7 @@ check_ns_display_info (Lisp_Object frame)
162 struct terminal *t = get_terminal (frame, 1); 162 struct terminal *t = get_terminal (frame, 1);
163 163
164 if (t->type != output_ns) 164 if (t->type != output_ns)
165 error ("Terminal %d is not a Nextstep display", XINT (frame)); 165 error ("Terminal %ld is not a Nextstep display", (long) XINT (frame));
166 166
167 return t->display_info.ns; 167 return t->display_info.ns;
168 } 168 }
@@ -1729,7 +1729,8 @@ terminate Emacs if we can't open the connection.
1729 /* Register our external input/output types, used for determining 1729 /* Register our external input/output types, used for determining
1730 applicable services and also drag/drop eligibility. */ 1730 applicable services and also drag/drop eligibility. */
1731 ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain]; 1731 ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain];
1732 ns_return_types = [[NSArray arrayWithObjects: nil] retain]; 1732 ns_return_types = [[NSArray arrayWithObjects: NSStringPboardType, nil]
1733 retain];
1733 ns_drag_types = [[NSArray arrayWithObjects: 1734 ns_drag_types = [[NSArray arrayWithObjects:
1734 NSStringPboardType, 1735 NSStringPboardType,
1735 NSTabularTextPboardType, 1736 NSTabularTextPboardType,
diff --git a/src/nsimage.m b/src/nsimage.m
index c38cefdc5d5..2cb0c3bff76 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -189,7 +189,11 @@ static EmacsImage *ImageList = nil;
189 image = [[EmacsImage alloc] initByReferencingFile: 189 image = [[EmacsImage alloc] initByReferencingFile:
190 [NSString stringWithUTF8String: SDATA (found)]]; 190 [NSString stringWithUTF8String: SDATA (found)]];
191 191
192#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
193 imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
194#else
192 imgRep = [image bestRepresentationForDevice: nil]; 195 imgRep = [image bestRepresentationForDevice: nil];
196#endif
193 if (imgRep == nil) 197 if (imgRep == nil)
194 { 198 {
195 [image release]; 199 [image release];
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 0d25b82d5b5..6a9ee7dd4f5 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -695,9 +695,11 @@ set_frame_menubar (struct frame *f, int first_time, int deep_p)
695 if ([[self window] isVisible]) 695 if ([[self window] isVisible])
696 [self sizeToFit]; 696 [self sizeToFit];
697#else 697#else
698#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2
698 if ([self supermenu] == nil) 699 if ([self supermenu] == nil)
699 [self sizeToFit]; 700 [self sizeToFit];
700#endif 701#endif
702#endif
701} 703}
702 704
703 705
diff --git a/src/nsselect.m b/src/nsselect.m
index aeb2a3e3a99..867cf3252e5 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -352,16 +352,22 @@ ns_string_from_pasteboard (id pb)
352 utfStr = [mstr UTF8String]; 352 utfStr = [mstr UTF8String];
353 length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; 353 length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding];
354 354
355#if ! defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
355 if (!utfStr) 356 if (!utfStr)
356 { 357 {
357 utfStr = [mstr cString]; 358 utfStr = [mstr cString];
358 length = strlen (utfStr); 359 length = strlen (utfStr);
359 } 360 }
361#endif
360 } 362 }
361 NS_HANDLER 363 NS_HANDLER
362 { 364 {
363 message1 ("ns_string_from_pasteboard: UTF8String failed\n"); 365 message1 ("ns_string_from_pasteboard: UTF8String failed\n");
366#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
367 utfStr = "Conversion failed";
368#else
364 utfStr = [str lossyCString]; 369 utfStr = [str lossyCString];
370#endif
365 length = strlen (utfStr); 371 length = strlen (utfStr);
366 } 372 }
367 NS_ENDHANDLER 373 NS_ENDHANDLER
diff --git a/src/nsterm.h b/src/nsterm.h
index b442973f0d9..f419391a11e 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -26,10 +26,19 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#ifdef HAVE_NS 26#ifdef HAVE_NS
27 27
28#ifdef NS_IMPL_COCOA 28#ifdef NS_IMPL_COCOA
29#ifndef MAC_OS_X_VERSION_10_3
30#define MAC_OS_X_VERSION_10_3 1030
31#endif
32#ifndef MAC_OS_X_VERSION_10_4
33#define MAC_OS_X_VERSION_10_4 1040
34#endif
35#ifndef MAC_OS_X_VERSION_10_5
36#define MAC_OS_X_VERSION_10_5 1050
37#endif
29#ifndef MAC_OS_X_VERSION_10_6 38#ifndef MAC_OS_X_VERSION_10_6
30#define MAC_OS_X_VERSION_10_6 1060 39#define MAC_OS_X_VERSION_10_6 1060
31#endif 40#endif
32#endif 41#endif /* NS_IMPL_COCOA */
33 42
34#ifdef __OBJC__ 43#ifdef __OBJC__
35 44
@@ -61,7 +70,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
61 70
62@class EmacsToolbar; 71@class EmacsToolbar;
63 72
64@interface EmacsView : NSView <NSTextInput> /* 10.6+: NSWindowDelegate */ 73#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
74@interface EmacsView : NSView <NSTextInput, NSWindowDelegate>
75#else
76@interface EmacsView : NSView <NSTextInput>
77#endif
65 { 78 {
66 char *old_title; 79 char *old_title;
67 BOOL windowClosing; 80 BOOL windowClosing;
@@ -112,7 +125,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
112 125
113 ========================================================================== */ 126 ========================================================================== */
114 127
115@interface EmacsMenu : NSMenu /* 10.6+: <NSMenuDelegate> */ 128#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
129@interface EmacsMenu : NSMenu <NSMenuDelegate>
130#else
131@interface EmacsMenu : NSMenu
132#endif
116{ 133{
117 struct frame *frame; 134 struct frame *frame;
118 unsigned long keyEquivModMask; 135 unsigned long keyEquivModMask;
@@ -139,7 +156,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
139 156
140@class EmacsImage; 157@class EmacsImage;
141 158
142@interface EmacsToolbar : NSToolbar /* 10.6+: <NSToolbarDelegate> */ 159#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
160@interface EmacsToolbar : NSToolbar <NSToolbarDelegate>
161#else
162@interface EmacsToolbar : NSToolbar
163#endif
143 { 164 {
144 EmacsView *emacsView; 165 EmacsView *emacsView;
145 NSMutableDictionary *identifierToItem; 166 NSMutableDictionary *identifierToItem;
@@ -182,7 +203,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
182- (Lisp_Object)runDialogAt: (NSPoint)p; 203- (Lisp_Object)runDialogAt: (NSPoint)p;
183@end 204@end
184 205
185@interface EmacsTooltip : NSObject /* 10.6+: <NSWindowDelegate> */ 206#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
207@interface EmacsTooltip : NSObject <NSWindowDelegate>
208#else
209@interface EmacsTooltip : NSObject
210#endif
186 { 211 {
187 NSWindow *win; 212 NSWindow *win;
188 NSTextField *textField; 213 NSTextField *textField;
diff --git a/src/nsterm.m b/src/nsterm.m
index ac95409ee7e..546247ab74a 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4515,7 +4515,9 @@ ns_term_shutdown (int sig)
4515 unsigned fnKeysym = 0; 4515 unsigned fnKeysym = 0;
4516 int flags; 4516 int flags;
4517 static NSMutableArray *nsEvArray; 4517 static NSMutableArray *nsEvArray;
4518#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
4518 static BOOL firstTime = YES; 4519 static BOOL firstTime = YES;
4520#endif
4519 int left_is_none; 4521 int left_is_none;
4520 4522
4521 NSTRACE (keyDown); 4523 NSTRACE (keyDown);
@@ -4703,13 +4705,15 @@ ns_term_shutdown (int sig)
4703 } 4705 }
4704 } 4706 }
4705 4707
4708
4709#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
4706 /* if we get here we should send the key for input manager processing */ 4710 /* if we get here we should send the key for input manager processing */
4707 if (firstTime && [[NSInputManager currentInputManager] 4711 if (firstTime && [[NSInputManager currentInputManager]
4708 wantsToDelayTextChangeNotifications] == NO) 4712 wantsToDelayTextChangeNotifications] == NO)
4709 fprintf (stderr, 4713 fprintf (stderr,
4710 "Emacs: WARNING: TextInput mgr wants marked text to be permanent!\n"); 4714 "Emacs: WARNING: TextInput mgr wants marked text to be permanent!\n");
4711 firstTime = NO; 4715 firstTime = NO;
4712 4716#endif
4713 if (NS_KEYLOG && !processingCompose) 4717 if (NS_KEYLOG && !processingCompose)
4714 fprintf (stderr, "keyDown: Begin compose sequence.\n"); 4718 fprintf (stderr, "keyDown: Begin compose sequence.\n");
4715 4719
@@ -5366,7 +5370,7 @@ ns_term_shutdown (int sig)
5366 [self allocateGState]; 5370 [self allocateGState];
5367 5371
5368 [NSApp registerServicesMenuSendTypes: ns_send_types 5372 [NSApp registerServicesMenuSendTypes: ns_send_types
5369 returnTypes: ns_return_types]; 5373 returnTypes: nil];
5370 5374
5371 ns_window_num++; 5375 ns_window_num++;
5372 return self; 5376 return self;
@@ -5744,8 +5748,7 @@ ns_term_shutdown (int sig)
5744{ 5748{
5745 NSTRACE (validRequestorForSendType); 5749 NSTRACE (validRequestorForSendType);
5746 if (typeSent != nil && [ns_send_types indexOfObject: typeSent] != NSNotFound 5750 if (typeSent != nil && [ns_send_types indexOfObject: typeSent] != NSNotFound
5747 && (typeReturned == nil 5751 && typeReturned == nil)
5748 || [ns_return_types indexOfObject: typeSent] != NSNotFound))
5749 { 5752 {
5750 if (! NILP (ns_get_local_selection (QPRIMARY, QUTF8_STRING))) 5753 if (! NILP (ns_get_local_selection (QPRIMARY, QUTF8_STRING)))
5751 return self; 5754 return self;
@@ -6066,14 +6069,26 @@ ns_term_shutdown (int sig)
6066 em_whole = whole; 6069 em_whole = whole;
6067 6070
6068 if (portion >= whole) 6071 if (portion >= whole)
6069 [self setFloatValue: 0.0 knobProportion: 1.0]; 6072 {
6073#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
6074 [self setKnobProportion: 1.0];
6075 [self setDoubleValue: 1.0];
6076#else
6077 [self setFloatValue: 0.0 knobProportion: 1.0];
6078#endif
6079 }
6070 else 6080 else
6071 { 6081 {
6072 float pos, por; 6082 float pos, por;
6073 portion = max ((float)whole*min_portion/pixel_height, portion); 6083 portion = max ((float)whole*min_portion/pixel_height, portion);
6074 pos = (float)position / (whole - portion); 6084 pos = (float)position / (whole - portion);
6075 por = (float)portion/whole; 6085 por = (float)portion/whole;
6086#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
6087 [self setKnobProportion: por];
6088 [self setDoubleValue: pos];
6089#else
6076 [self setFloatValue: pos knobProportion: por]; 6090 [self setFloatValue: pos knobProportion: por];
6091#endif
6077 } 6092 }
6078 return self; 6093 return self;
6079} 6094}
diff --git a/src/w32fns.c b/src/w32fns.c
index cba0b91e685..f48e5764b4c 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -3273,7 +3273,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
3273 { 3273 {
3274 /* Free memory used by owner-drawn and help-echo strings. */ 3274 /* Free memory used by owner-drawn and help-echo strings. */
3275 w32_free_menu_strings (hwnd); 3275 w32_free_menu_strings (hwnd);
3276 f->output_data.w32->menubar_active = 0; 3276 if (f)
3277 f->output_data.w32->menubar_active = 0;
3277 menubar_in_use = 0; 3278 menubar_in_use = 0;
3278 } 3279 }
3279 } 3280 }
@@ -3623,10 +3624,10 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
3623 if (LOWORD (lParam) == HTCLIENT) 3624 if (LOWORD (lParam) == HTCLIENT)
3624 { 3625 {
3625 f = x_window_to_frame (dpyinfo, hwnd); 3626 f = x_window_to_frame (dpyinfo, hwnd);
3626 if (f->output_data.w32->hourglass_p && !menubar_in_use 3627 if (f && f->output_data.w32->hourglass_p
3627 && !current_popup_menu) 3628 && !menubar_in_use && !current_popup_menu)
3628 SetCursor (f->output_data.w32->hourglass_cursor); 3629 SetCursor (f->output_data.w32->hourglass_cursor);
3629 else 3630 else if (f)
3630 SetCursor (f->output_data.w32->current_cursor); 3631 SetCursor (f->output_data.w32->current_cursor);
3631 return 0; 3632 return 0;
3632 } 3633 }