summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-01-09 09:36:10 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-01-09 09:36:10 -0800
commit35cf62d95cdcd5323dcea4a5385942c342ff1d9c (patch)
tree90358cbb033a126c4d48793a80fd804b7baaca24 /src
parent59815c02506eb39b61e672528ed03885749ba529 (diff)
parent7655cb66d86564e792b825f1a0e1a4de7d6e6db5 (diff)
downloademacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.tar.gz
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit2
-rw-r--r--src/ChangeLog174
-rw-r--r--src/ChangeLog.12
-rw-r--r--src/ChangeLog.102
-rw-r--r--src/ChangeLog.116
-rw-r--r--src/ChangeLog.22
-rw-r--r--src/ChangeLog.32
-rw-r--r--src/ChangeLog.42
-rw-r--r--src/ChangeLog.52
-rw-r--r--src/ChangeLog.62
-rw-r--r--src/ChangeLog.74
-rw-r--r--src/ChangeLog.86
-rw-r--r--src/ChangeLog.92
-rw-r--r--src/Makefile.in2
-rw-r--r--src/README2
-rw-r--r--src/alloc.c2
-rw-r--r--src/atimer.c2
-rw-r--r--src/atimer.h2
-rw-r--r--src/bidi.c4
-rw-r--r--src/blockinput.h2
-rw-r--r--src/buffer.c2
-rw-r--r--src/buffer.h2
-rw-r--r--src/bytecode.c2
-rw-r--r--src/callint.c13
-rw-r--r--src/callproc.c2
-rw-r--r--src/casefiddle.c2
-rw-r--r--src/casetab.c2
-rw-r--r--src/category.c2
-rw-r--r--src/ccl.c6
-rw-r--r--src/character.c2
-rw-r--r--src/charset.c4
-rw-r--r--src/charset.h6
-rw-r--r--src/cm.c2
-rw-r--r--src/cm.h2
-rw-r--r--src/cmds.c2
-rw-r--r--src/coding.c6
-rw-r--r--src/coding.h4
-rw-r--r--src/commands.h2
-rw-r--r--src/composite.c2
-rw-r--r--src/composite.h2
-rw-r--r--src/data.c2
-rw-r--r--src/dbusbind.c4
-rw-r--r--src/deps.mk2
-rw-r--r--src/dired.c2
-rw-r--r--src/dispextern.h2
-rw-r--r--src/dispnew.c2
-rw-r--r--src/disptab.h2
-rw-r--r--src/doc.c2
-rw-r--r--src/doprnt.c2
-rw-r--r--src/dosfns.c2
-rw-r--r--src/dosfns.h2
-rw-r--r--src/editfns.c2
-rw-r--r--src/emacs-icon.h2
-rw-r--r--src/emacs.c16
-rw-r--r--src/emacsgtkfixed.c2
-rw-r--r--src/emacsgtkfixed.h2
-rw-r--r--src/epaths.in2
-rw-r--r--src/eval.c2
-rw-r--r--src/fileio.c37
-rw-r--r--src/filelock.c2
-rw-r--r--src/firstfile.c2
-rw-r--r--src/floatfns.c2
-rw-r--r--src/fns.c4
-rw-r--r--src/font.c2
-rw-r--r--src/font.h6
-rw-r--r--src/fontset.c2
-rw-r--r--src/fontset.h2
-rw-r--r--src/frame.c2
-rw-r--r--src/frame.h2
-rw-r--r--src/fringe.c2
-rw-r--r--src/ftfont.c2
-rw-r--r--src/ftxfont.c2
-rw-r--r--src/getpagesize.h2
-rw-r--r--src/gnutls.c16
-rw-r--r--src/gnutls.h2
-rw-r--r--src/gtkutil.c4
-rw-r--r--src/gtkutil.h2
-rw-r--r--src/image.c35
-rw-r--r--src/indent.c2
-rw-r--r--src/indent.h2
-rw-r--r--src/insdel.c2
-rw-r--r--src/intervals.c2
-rw-r--r--src/intervals.h2
-rw-r--r--src/keyboard.c2
-rw-r--r--src/keyboard.h2
-rw-r--r--src/keymap.c2
-rw-r--r--src/keymap.h2
-rw-r--r--src/lastfile.c2
-rw-r--r--src/lisp.h2
-rw-r--r--src/lisp.mk2
-rw-r--r--src/lread.c4
-rw-r--r--src/m/alpha.h2
-rw-r--r--src/m/amdx86-64.h2
-rw-r--r--src/m/ia64.h2
-rw-r--r--src/m/ibmrs6000.h2
-rw-r--r--src/m/ibms390x.h2
-rw-r--r--src/m/intel386.h2
-rw-r--r--src/m/m68k.h2
-rw-r--r--src/m/macppc.h2
-rw-r--r--src/m/sparc.h2
-rw-r--r--src/m/template.h2
-rw-r--r--src/m/vax.h2
-rw-r--r--src/macros.c2
-rw-r--r--src/macros.h2
-rw-r--r--src/makefile.w32-in2
-rw-r--r--src/marker.c2
-rw-r--r--src/mem-limits.h2
-rw-r--r--src/menu.c2
-rw-r--r--src/menu.h2
-rw-r--r--src/minibuf.c2
-rw-r--r--src/msdos.c2
-rw-r--r--src/msdos.h2
-rw-r--r--src/ns.mk2
-rw-r--r--src/nsfns.m13
-rw-r--r--src/nsfont.m30
-rw-r--r--src/nsgui.h2
-rw-r--r--src/nsimage.m2
-rw-r--r--src/nsmenu.m48
-rw-r--r--src/nsselect.m170
-rw-r--r--src/nsterm.h2
-rw-r--r--src/nsterm.m38
-rw-r--r--src/print.c4
-rw-r--r--src/process.c4
-rw-r--r--src/process.h2
-rw-r--r--src/puresize.h2
-rw-r--r--src/ralloc.c2
-rw-r--r--src/regex.c2
-rw-r--r--src/regex.h2
-rw-r--r--src/region-cache.c2
-rw-r--r--src/region-cache.h2
-rw-r--r--src/s/aix4-2.h2
-rw-r--r--src/s/bsd-common.h2
-rw-r--r--src/s/cygwin.h2
-rw-r--r--src/s/darwin.h2
-rw-r--r--src/s/freebsd.h2
-rw-r--r--src/s/gnu-linux.h4
-rw-r--r--src/s/gnu.h2
-rw-r--r--src/s/hpux10-20.h2
-rw-r--r--src/s/irix6-5.h2
-rw-r--r--src/s/ms-w32.h2
-rw-r--r--src/s/msdos.h2
-rw-r--r--src/s/netbsd.h2
-rw-r--r--src/s/sol2-6.h2
-rw-r--r--src/s/template.h2
-rw-r--r--src/s/unixware.h2
-rw-r--r--src/s/usg5-4-common.h2
-rw-r--r--src/scroll.c2
-rw-r--r--src/search.c12
-rw-r--r--src/sheap.c2
-rw-r--r--src/sound.c2
-rw-r--r--src/syntax.c2
-rw-r--r--src/syntax.h2
-rw-r--r--src/sysdep.c2
-rw-r--r--src/sysselect.h2
-rw-r--r--src/syssignal.h2
-rw-r--r--src/systime.h2
-rw-r--r--src/systty.h2
-rw-r--r--src/syswait.h2
-rw-r--r--src/term.c4
-rw-r--r--src/termchar.h2
-rw-r--r--src/termhooks.h2
-rw-r--r--src/terminal.c2
-rw-r--r--src/terminfo.c2
-rw-r--r--src/termopts.h2
-rw-r--r--src/textprop.c4
-rw-r--r--src/tparam.h2
-rw-r--r--src/undo.c2
-rw-r--r--src/unexaix.c2
-rw-r--r--src/unexcoff.c2
-rw-r--r--src/unexcw.c2
-rw-r--r--src/unexelf.c2
-rw-r--r--src/unexmacosx.c2
-rw-r--r--src/unexw32.c2
-rw-r--r--src/vm-limit.c2
-rw-r--r--src/w16select.c11
-rw-r--r--src/w32.c42
-rw-r--r--src/w32.h2
-rw-r--r--src/w32console.c2
-rw-r--r--src/w32fns.c2
-rw-r--r--src/w32font.c4
-rw-r--r--src/w32font.h2
-rw-r--r--src/w32gui.h2
-rw-r--r--src/w32heap.c2
-rw-r--r--src/w32heap.h2
-rw-r--r--src/w32inevt.c2
-rw-r--r--src/w32inevt.h2
-rw-r--r--src/w32menu.c2
-rw-r--r--src/w32proc.c2
-rw-r--r--src/w32reg.c2
-rw-r--r--src/w32select.c2
-rw-r--r--src/w32term.c8
-rw-r--r--src/w32term.h2
-rw-r--r--src/w32uniscribe.c2
-rw-r--r--src/w32xfns.c2
-rw-r--r--src/widget.c2
-rw-r--r--src/widget.h2
-rw-r--r--src/widgetprv.h2
-rw-r--r--src/window.c2
-rw-r--r--src/window.h2
-rw-r--r--src/xdisp.c23
-rw-r--r--src/xfaces.c2
-rw-r--r--src/xfns.c20
-rw-r--r--src/xfont.c2
-rw-r--r--src/xftfont.c4
-rw-r--r--src/xgselect.c2
-rw-r--r--src/xgselect.h2
-rw-r--r--src/xmenu.c25
-rw-r--r--src/xml.c2
-rw-r--r--src/xrdb.c2
-rw-r--r--src/xselect.c4
-rw-r--r--src/xsettings.c2
-rw-r--r--src/xsettings.h2
-rw-r--r--src/xsmfns.c2
-rw-r--r--src/xterm.c16
-rw-r--r--src/xterm.h3
215 files changed, 745 insertions, 451 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 2051475bea0..b60c14fe289 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-1998, 2000-2011 Free Software Foundation, Inc.
+# Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/src/ChangeLog b/src/ChangeLog
index e2c579459a2..00202258d02 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
-2011-12-14 Paul Eggert <eggert@cs.ucla.edu>
+2012-01-09 Paul Eggert <eggert@cs.ucla.edu>
Fix integer width and related bugs (Bug#9874).
* alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
@@ -788,6 +788,174 @@
rather than rolling our own approximation.
(SCROLL_BAR_VEC_SIZE): Remove; not used.
+2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ emacs: fix an auto-save permissions race condition (Bug#10400)
+ * fileio.c (auto_saving_dir_umask): New static var.
+ (Fmake_directory_internal): Use it.
+ (do_auto_save_make_dir): Set it, instead of invoking chmod after
+ creating the directory. The old code temporarily assigns
+ too-generous permissions to the directory.
+ (do_auto_save_eh): Clear it.
+ (Fdo_auto_save): Catch all errors, not just file errors, so
+ that the var is always cleared.
+
+2012-01-07 Eli Zaretskii <eliz@gnu.org>
+
+ * search.c (scan_buffer): Pass character positions to
+ know_region_cache, not byte positions. (Bug#6540)
+
+2012-01-07 LynX <_LynX@bk.ru> (tiny change)
+
+ * w32.c (sys_rename): Report EXDEV when rename of a directory
+ fails because the target is on another logical disk. (Bug#10284)
+
+2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
+
+ * xterm.c (x_embed_request_focus): New function.
+
+ * xterm.h: Add prototype.
+
+ * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
+
+2012-01-05 Glenn Morris <rgm@gnu.org>
+
+ * emacs.c (emacs_copyright): Update short copyright year to 2012.
+
+2012-01-01 Eli Zaretskii <eliz@gnu.org>
+
+ * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
+ Load gnutls_transport_set_lowat only if GnuTLS version is below
+ 2.11.1.
+ (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
+ GnuTLS versions below 2.11.1.
+
+2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
+
+ * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
+ to the doc string advising against its use for altering the way
+ windows are scrolled.
+
+2011-12-28 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
+ coding-system ASCII compatible only when it does not produce BOM
+ on encoding (Bug#10383).
+
+2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
+
+ * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
+ can scroll.
+ (create_and_show_popup_menu): Always use menu_position_func for
+ Gtk3 (Bug#10361).
+
+2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
+
+ * callint.c (Fcall_interactively): Don't truncate prompt string.
+
+2011-12-23 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (handle_invisible_prop): Handle correctly an invisible
+ property that ends at ZV, so that the bidi iteration could be
+ resumed from there (after widening). (Bug#10360)
+
+2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
+
+2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsterm.m (x_free_frame_resources):
+ Release f->output_data.ns->miniimage.
+ (ns_index_color): Fix indentation. Do not retain
+ color_table->colors[i].
+
+ * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
+ before returning.
+
+ * nsfns.m (x_set_background_color): Assign return value from
+ ns_index_color to face-background instead of NSColor*.
+ (ns_implicitly_set_icon_type): Fix indentation.
+ Change assignment in for loop to comparison.
+
+ * emacs.c (ns_pool): New variable.
+ (main): Assign ns_pool.
+ (Fkill_emacs): Call ns_release_autorelease_pool.
+
+ * nsfont.m (ns_spec_to_descriptor): Fix indentation,
+ autorelease fdesc, release fdAttrs and tdict.
+ (ns_get_covering_families): Release charset.
+ (ns_findfonts): Release NSFontDescriptor created with new.
+ (ns_uni_to_glyphs): Fix indentation.
+ (setString): Release attrStr before assigning new value.
+
+2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
+ and NS_IMPL_COCOA.
+ (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
+ (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
+
+2011-12-18 David Reitter <reitter@cmu.edu>
+
+ * nsterm.m (ns_term_init): Subscribe for notifications
+ NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
+ to method trackingNotification in EmacsMenu.
+
+ * nsmenu.m (trackingMenu): New variable.
+ (trackingNotification): New method (from Aquamacs).
+ (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
+ from Aquamacs (Bug#7030).
+
+2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
+ (symbol_to_nsstring): Fix indentation.
+ (ns_symbol_to_pb): New function.
+ (Fns_get_selection_internal): Renamed from Fns_get_cut_buffer_internal.
+ (Fns_rotate_cut_buffers_internal): Removed.
+ (Fns_store_selection_internal): Renamed from
+ Fns_store_cut_buffer_internal.
+ (ns_get_foreign_selection, Fx_own_selection_internal)
+ (Fx_disown_selection_internal, Fx_selection_exists_p)
+ (Fns_get_selection_internal, Fns_store_selection_internal):
+ Use ns_symbol_to_pb and check if return value is nil.
+ (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
+ Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
+ renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
+ renamed to Sns_store_selection_internal.
+ (ns_handle_selection_request): Move code to Fx_own_selection_internal
+ and remove this function.
+ (ns_handle_selection_clear): Remove, never used.
+ (Fx_own_selection_internal): Move code from ns_handle_selection_request
+ here.
+
+2011-12-17 Ken Brown <kbrown@cornell.edu>
+
+ * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
+ GID is unknown (Bug#10257).
+
+2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
+ (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
+ which caused a build failure on GNU/Linux IA-64. This problem was
+ introduced by my 2011-10-07 patch.
+
+2011-12-15 Juri Linkov <juri@jurta.org>
+
+ * image.c (imagemagick_error): New function. (Bug#10112)
+ (imagemagick_load_image): Comment out `MagickSetResolution' call.
+ Use `imagemagick_error' where ImageMagick functions return
+ `MagickFalse'.
+ (Fimagemagick_types): Add `Fnreverse' to return the list in the
+ proper order.
+
+2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * xftfont.c (xftfont_draw): Use the font metrics of s->font to
+ fill background (Bug#8992).
+
2011-12-13 Martin Rudalics <rudalics@gmx.at>
* window.c (Vwindow_combination_resize)
@@ -5097,7 +5265,7 @@
2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
- Integer overflow and signedness fixes (Bug#8873).
+ Integer overflow and signedness fixes (Bug#8873, Bug#8828).
* ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
(GET_CCL_RANGE, IN_INT_RANGE): Use it.
@@ -9692,7 +9860,7 @@ See ChangeLog.11 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.1 b/src/ChangeLog.1
index 7fef45f36da..5265d6fdf59 100644
--- a/src/ChangeLog.1
+++ b/src/ChangeLog.1
@@ -3521,7 +3521,7 @@
* minibuf.c: Don't allow entry to minibuffer
while minibuffer is selected.
- Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index 53f7a016654..5baeb877939 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -27912,7 +27912,7 @@ See ChangeLog.9 for earlier changes.
;; add-log-time-zone-rule: t
;; End:
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index f9fd442da3f..6c361399535 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -12897,7 +12897,7 @@
* font.c (font_update_drivers): Sanity fallback to avoid disabling
all drivers.
- * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUStep.
+ * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUstep.
2009-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
@@ -30657,7 +30657,7 @@
(display_buffer): Do not set split_height_threshold to twice the
value of window_min_height to avoid changing the value of a
customizable variable. Rather explicitly check whether the
- height of the window that shall be splitted is at least as large
+ height of the window that shall be split is at least as large
as split_height_threshold.
(Fwindow_full_width_p): New defun.
(syms_of_window): Defsubr it.
@@ -31383,7 +31383,7 @@ See ChangeLog.10 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.2 b/src/ChangeLog.2
index d3be0064610..1a9728f6896 100644
--- a/src/ChangeLog.2
+++ b/src/ChangeLog.2
@@ -4771,7 +4771,7 @@
See ChangeLog.1 for earlier changes.
- Copyright (C) 1986-1988, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1986-1988, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3
index 34906e505da..6c580fe4b52 100644
--- a/src/ChangeLog.3
+++ b/src/ChangeLog.3
@@ -16507,7 +16507,7 @@ See ChangeLog.2 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.4 b/src/ChangeLog.4
index 88c9e3dbf71..d7ef7d8779a 100644
--- a/src/ChangeLog.4
+++ b/src/ChangeLog.4
@@ -6906,7 +6906,7 @@ See ChangeLog.3 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5
index ee79917a34d..c6dfde7496b 100644
--- a/src/ChangeLog.5
+++ b/src/ChangeLog.5
@@ -7148,7 +7148,7 @@ See ChangeLog.4 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1994-1995, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1994-1995, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6
index 74141f6813a..91c20681157 100644
--- a/src/ChangeLog.6
+++ b/src/ChangeLog.6
@@ -5354,7 +5354,7 @@
See ChangeLog.5 for earlier changes.
- Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.7 b/src/ChangeLog.7
index fc97acdeb1e..891c1ca081a 100644
--- a/src/ChangeLog.7
+++ b/src/ChangeLog.7
@@ -3968,7 +3968,7 @@
1998-01-12 Kenichi Handa <handa@etl.go.jp>
- * minibuf.c (Fminibuffer_complete_word): Fix a bug of refering
+ * minibuf.c (Fminibuffer_complete_word): Fix a bug of referring
`i'. We must refer `i_byte' instead.
* insdel.c (insert_from_string_1): Decrement GAP_SIZE by
@@ -11092,7 +11092,7 @@ See ChangeLog.6 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.8 b/src/ChangeLog.8
index 6a48b09e64b..d3ce1eb2a45 100644
--- a/src/ChangeLog.8
+++ b/src/ChangeLog.8
@@ -4027,7 +4027,7 @@
* dispextern.h (struct glyph_row): Flag internal_border_p removed.
* xfns.c (x_create_tip_frame): Don't set bitmapIcon resource
- because this will try to access a nonexisting widget.
+ because this will try to access a nonexistent widget.
1999-07-26 Markus Rost <rost@gnu.org>
@@ -11485,7 +11485,7 @@
Substitute homedir by `~' also in default_filename.
* xdisp.c (try_window_id): Fix computation of tab_offset when
- backing up over a character that is splitted across lines.
+ backing up over a character that is split across lines.
1999-05-08 Kenichi HANDA <handa@etl.go.jp>
@@ -13979,7 +13979,7 @@
See ChangeLog.7 for earlier changes.
- Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.9 b/src/ChangeLog.9
index 6e3a8d8ab3b..d6d772c5f95 100644
--- a/src/ChangeLog.9
+++ b/src/ChangeLog.9
@@ -13294,7 +13294,7 @@ See ChangeLog.8 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/Makefile.in b/src/Makefile.in
index 3be10c388c7..035ea277454 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,6 +1,6 @@
# src/Makefile for GNU Emacs.
-# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2011
+# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2012
# Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/src/README b/src/README
index f568797a1ea..558710627a7 100644
--- a/src/README
+++ b/src/README
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 2001-2012 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/src/alloc.c b/src/alloc.c
index 05b681cdafb..c4db234aba5 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1,5 +1,5 @@
/* Storage allocation and gc for GNU Emacs Lisp interpreter.
- Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2011
+ Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/atimer.c b/src/atimer.c
index a54b397f52e..48f22fe0e3e 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -1,5 +1,5 @@
/* Asynchronous timers.
- Copyright (C) 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/atimer.h b/src/atimer.h
index 8035681b225..4282bab49ba 100644
--- a/src/atimer.h
+++ b/src/atimer.h
@@ -1,5 +1,5 @@
/* Asynchronous timers.
- Copyright (C) 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/bidi.c b/src/bidi.c
index bd78a5eff29..a2d857469cc 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1,5 +1,5 @@
/* Low-level bidirectional buffer/string-scanning functions for GNU Emacs.
- Copyright (C) 2000-2001, 2004-2005, 2009-2011
+ Copyright (C) 2000-2001, 2004-2005, 2009-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1132,7 +1132,7 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t pos_byte)
Note that this function gives the paragraph separator the same
direction as the preceding paragraph, even though Emacs generally
- views the separartor as not belonging to any paragraph. */
+ views the separator as not belonging to any paragraph. */
void
bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
{
diff --git a/src/blockinput.h b/src/blockinput.h
index aa46d67ee56..dc02919cf4f 100644
--- a/src/blockinput.h
+++ b/src/blockinput.h
@@ -1,5 +1,5 @@
/* blockinput.h - interface to blocking complicated interrupt-driven input.
- Copyright (C) 1989, 1993, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1993, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/buffer.c b/src/buffer.c
index afa7e915429..b176bfed3fe 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,6 +1,6 @@
/* Buffer manipulation primitives for GNU Emacs.
-Copyright (C) 1985-1989, 1993-1995, 1997-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1989, 1993-1995, 1997-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/buffer.h b/src/buffer.h
index e2d4b555e11..c75a09c5579 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1,6 +1,6 @@
/* Header file for the buffer manipulation primitives.
-Copyright (C) 1985-1986, 1993-1995, 1997-2011
+Copyright (C) 1985-1986, 1993-1995, 1997-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/bytecode.c b/src/bytecode.c
index fdefe39a69d..e2370254f36 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1,5 +1,5 @@
/* Execution of byte code produced by bytecomp.el.
- Copyright (C) 1985-1988, 1993, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1988, 1993, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/callint.c b/src/callint.c
index 444892ef9cb..78daa8f8fce 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -1,5 +1,5 @@
/* Call a Lisp function interactively.
- Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2011
+ Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -274,8 +274,6 @@ invoke it. If KEYS is omitted or nil, the return value of
ptrdiff_t i, nargs;
int foo;
- char prompt1[100];
- char *tem1;
int arg_from_tty = 0;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
ptrdiff_t key_count;
@@ -491,13 +489,8 @@ invoke it. If KEYS is omitted or nil, the return value of
tem = string;
for (i = 1; *tem; i++)
{
- strncpy (prompt1, tem + 1, sizeof prompt1 - 1);
- prompt1[sizeof prompt1 - 1] = 0;
- tem1 = strchr (prompt1, '\n');
- if (tem1) *tem1 = 0;
-
- visargs[0] = build_string (prompt1);
- if (strchr (prompt1, '%'))
+ visargs[0] = make_string (tem + 1, strcspn (tem + 1, "\n"));
+ if (strchr (SSDATA (visargs[0]), '%'))
callint_message = Fformat (i, visargs);
else
callint_message = visargs[0];
diff --git a/src/callproc.c b/src/callproc.c
index d8f50e21ee5..22245f2d688 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1,5 +1,5 @@
/* Synchronous subprocess invocation for GNU Emacs.
- Copyright (C) 1985-1988, 1993-1995, 1999-2011
+ Copyright (C) 1985-1988, 1993-1995, 1999-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 05d689a9eef..278806b3030 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -1,6 +1,6 @@
/* GNU Emacs case conversion functions.
-Copyright (C) 1985, 1994, 1997-1999, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1985, 1994, 1997-1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/casetab.c b/src/casetab.c
index 8778048072c..c28f0c08d5e 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -1,5 +1,5 @@
/* GNU Emacs routines to deal with case tables.
- Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2001-2012 Free Software Foundation, Inc.
Author: Howard Gayle
diff --git a/src/category.c b/src/category.c
index 0ab2a70f8a4..a59ad3da53e 100644
--- a/src/category.c
+++ b/src/category.c
@@ -1,6 +1,6 @@
/* GNU Emacs routines to deal with category tables.
-Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/src/ccl.c b/src/ccl.c
index 1c6f444920c..5da90ad4f04 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -1,5 +1,5 @@
/* CCL (Code Conversion Language) interpreter.
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
@@ -210,8 +210,8 @@ static Lisp_Object Vccl_program_table;
#define CCL_WriteArrayReadJump 0x0B /* Write an array element, read, and jump:
1:A--D--D--R--E--S--S-rrrXXXXX
2:LENGTH
- 3:ELEMENET[0]
- 4:ELEMENET[1]
+ 3:ELEMENT[0]
+ 4:ELEMENT[1]
...
N:A--D--D--R--E--S--S-rrrYYYYY
------------------------------
diff --git a/src/character.c b/src/character.c
index 5e2a7b9461c..f15a20f6999 100644
--- a/src/character.c
+++ b/src/character.c
@@ -1,6 +1,6 @@
/* Basic character support.
-Copyright (C) 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1995, 1997, 1998, 2001 Electrotechnical Laboratory, JAPAN.
Licensed to the Free Software Foundation.
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
diff --git a/src/charset.c b/src/charset.c
index ec90a64341e..688247de1b0 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1,5 +1,5 @@
/* Basic character set support.
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
@@ -1652,7 +1652,7 @@ maybe_unify_char (int c, Lisp_Object val)
}
-/* Return a character correponding to the code-point CODE of
+/* Return a character corresponding to the code-point CODE of
CHARSET. */
int
diff --git a/src/charset.h b/src/charset.h
index 6d9079291c7..516582a3f3d 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -1,5 +1,5 @@
/* Header for charset handler.
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
@@ -238,7 +238,7 @@ struct charset
int unified_p;
};
-/* Hash table of charset symbols vs. the correponding attribute
+/* Hash table of charset symbols vs. the corresponding attribute
vectors. */
extern Lisp_Object Vcharset_hash_table;
@@ -389,7 +389,7 @@ extern Lisp_Object Vchar_charset_set;
#endif
-/* Return a character correponding to the code-point CODE of CHARSET.
+/* Return a character corresponding to the code-point CODE of CHARSET.
Try some optimization before calling decode_char. */
#define DECODE_CHAR(charset, code) \
diff --git a/src/cm.c b/src/cm.c
index 609632eba11..1922cd8140a 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -1,5 +1,5 @@
/* Cursor motion subroutines for GNU Emacs.
- Copyright (C) 1985, 1995, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1995, 2001-2012 Free Software Foundation, Inc.
based primarily on public domain code written by Chris Torek
This file is part of GNU Emacs.
diff --git a/src/cm.h b/src/cm.h
index a8c7e0d7c4b..e3e2b71dba6 100644
--- a/src/cm.h
+++ b/src/cm.h
@@ -1,5 +1,5 @@
/* Cursor motion calculation definitions for GNU Emacs
- Copyright (C) 1985, 1989, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/cmds.c b/src/cmds.c
index 3d43c2447ad..225c26b082c 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -1,6 +1,6 @@
/* Simple built-in editing commands.
-Copyright (C) 1985, 1993-1998, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1985, 1993-1998, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/coding.c b/src/coding.c
index a2ea9b302cf..be7166e8a14 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1,5 +1,5 @@
/* Coding system handler (conversion, detection, etc).
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
@@ -10003,8 +10003,6 @@ usage: (define-coding-system-internal ...) */)
{
Lisp_Object bom;
- CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
-
if (nargs < coding_arg_utf8_max)
goto short_args;
@@ -10018,6 +10016,8 @@ usage: (define-coding-system-internal ...) */)
CHECK_CODING_SYSTEM (val);
}
ASET (attrs, coding_attr_utf_bom, bom);
+ if (NILP (bom))
+ CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
category = (CONSP (bom) ? coding_category_utf_8_auto
: NILP (bom) ? coding_category_utf_8_nosig
diff --git a/src/coding.h b/src/coding.h
index 711e41ed5b8..50435282229 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -1,5 +1,5 @@
/* Header for coding system handler.
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
@@ -485,7 +485,7 @@ struct coding_system
element. The following elements are OFFSET, ANNOTATION-TYPE, and
a sequence of actual data for the annotation. OFFSET is a
character position offset from dst_pos or src_pos,
- ANNOTATION-TYPE specfies the meaning of the annotation and how to
+ ANNOTATION-TYPE specifies the meaning of the annotation and how to
handle the following data.. */
int *charbuf;
int charbuf_size, charbuf_used;
diff --git a/src/commands.h b/src/commands.h
index bcd5de44180..36f600cee01 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -1,5 +1,5 @@
/* Definitions needed by most editing commands.
- Copyright (C) 1985, 1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/composite.c b/src/composite.c
index 0a9bdcffc99..0d1ab266309 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1,5 +1,5 @@
/* Composite sequence support.
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
diff --git a/src/composite.h b/src/composite.h
index 39e82ad74ad..845411f5cde 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -1,5 +1,5 @@
/* Header for composite sequence handler.
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
diff --git a/src/data.c b/src/data.c
index 2337b0a4952..7c0d1830344 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,5 +1,5 @@
/* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter.
- Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2011
+ Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 7801ec259bb..6af499ecafd 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -1,5 +1,5 @@
/* Elisp bindings for D-Bus.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -968,7 +968,7 @@ DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0,
connection = xd_initialize (bus, TRUE);
/* Add the watch functions. We pass also the bus as data, in order
- to distinguish between the busses in xd_remove_watch. */
+ to distinguish between the buses in xd_remove_watch. */
if (!dbus_connection_set_watch_functions (connection,
xd_add_watch,
xd_remove_watch,
diff --git a/src/deps.mk b/src/deps.mk
index c61b01a95c4..c7316a24dad 100644
--- a/src/deps.mk
+++ b/src/deps.mk
@@ -1,6 +1,6 @@
### deps.mk --- src/Makefile fragment for GNU Emacs
-## Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2011
+## Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2012
## Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/src/dired.c b/src/dired.c
index 1d112db8a93..6eedc824231 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1,5 +1,5 @@
/* Lisp functions for making directory listings.
- Copyright (C) 1985-1986, 1993-1994, 1999-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 1993-1994, 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dispextern.h b/src/dispextern.h
index 9d5feea6024..82ad1d265a5 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1,6 +1,6 @@
/* Interface definitions for display code.
-Copyright (C) 1985, 1993-1994, 1997-2011 Free Software Foundation, Inc.
+Copyright (C) 1985, 1993-1994, 1997-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dispnew.c b/src/dispnew.c
index e53e3fdf80d..5290b60972a 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1,5 +1,5 @@
/* Updating of data structures for redisplay.
- Copyright (C) 1985-1988, 1993-1995, 1997-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1988, 1993-1995, 1997-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/disptab.h b/src/disptab.h
index e70079d2098..2e041707eea 100644
--- a/src/disptab.h
+++ b/src/disptab.h
@@ -1,5 +1,5 @@
/* Things for GLYPHS and glyph tables.
- Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/doc.c b/src/doc.c
index b5a57d7d6f2..1a7b307816d 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -1,5 +1,5 @@
/* Record indices of function doc strings stored in a file.
- Copyright (C) 1985-1986, 1993-1995, 1997-2011
+ Copyright (C) 1985-1986, 1993-1995, 1997-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/doprnt.c b/src/doprnt.c
index 166d396851a..df9ebc11f9c 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -1,7 +1,7 @@
/* Output like sprintf to a buffer of specified size.
Also takes args differently: pass one pointer to the end
of the format string in addition to the format string itself.
- Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dosfns.c b/src/dosfns.c
index ab3433b7902..8ef672fb8bb 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -1,6 +1,6 @@
/* MS-DOS specific Lisp utilities. Coded by Manabu Higashida, 1991.
Major changes May-July 1993 Morten Welinder (only 10% original code left)
- Copyright (C) 1991, 1993, 1996-1998, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1993, 1996-1998, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dosfns.h b/src/dosfns.h
index 89800598d28..9747c364d71 100644
--- a/src/dosfns.h
+++ b/src/dosfns.h
@@ -2,7 +2,7 @@
Coded by Manabu Higashida, 1991.
Modified by Morten Welinder, 1993-1994.
-Copyright (C) 1991, 1994-1995, 1997, 1999, 2001-2011
+Copyright (C) 1991, 1994-1995, 1997, 1999, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/editfns.c b/src/editfns.c
index 2a096db727d..afd4ed48333 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1,6 +1,6 @@
/* Lisp functions pertaining to editing.
-Copyright (C) 1985-1987, 1989, 1993-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1987, 1989, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/emacs-icon.h b/src/emacs-icon.h
index 292d1a023d6..590d874ca82 100644
--- a/src/emacs-icon.h
+++ b/src/emacs-icon.h
@@ -1,7 +1,7 @@
/* XPM */
/* Emacs icon
-Copyright (C) 2008-2011 Free Software Foundation, Inc.
+Copyright (C) 2008-2012 Free Software Foundation, Inc.
Author: Kentaro Ohkouchi <nanasess@fsm.ne.jp>
diff --git a/src/emacs.c b/src/emacs.c
index 6c96f7eb5e3..b8abcef6cbd 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1,6 +1,6 @@
/* Fully extensible Emacs, running on Unix, intended for GNU.
-Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2011
+Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -98,7 +98,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif
static const char emacs_version[] = VERSION;
-static const char emacs_copyright[] = "Copyright (C) 2011 Free Software Foundation, Inc.";
+static const char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc.";
/* Make these values available in GDB, which doesn't see macros. */
@@ -321,6 +321,12 @@ static void (*fatal_error_signal_hook) (void);
pthread_t main_thread;
#endif
+#ifdef HAVE_NS
+/* NS autrelease pool, for memory management. */
+static void *ns_pool;
+#endif
+
+
/* Handle bus errors, invalid instruction, etc. */
#ifndef FLOAT_CATCH_SIGILL
@@ -1318,7 +1324,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
= argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args);
#ifdef HAVE_NS
- ns_alloc_autorelease_pool ();
+ ns_pool = ns_alloc_autorelease_pool ();
if (!noninteractive)
{
#ifdef NS_IMPL_COCOA
@@ -2015,6 +2021,10 @@ all of which are called before Emacs is actually killed. */)
shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil);
+#ifdef HAVE_NS
+ ns_release_autorelease_pool (ns_pool);
+#endif
+
/* If we have an auto-save list file,
kill it because we are exiting Emacs deliberately (not crashing).
Do it after shut_down_emacs, which does an auto-save. */
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index d9084bf9a98..fba672ff74d 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -1,7 +1,7 @@
/* A Gtk Widget that inherits GtkFixed, but can be shrunk.
This file is only use when compiling with Gtk+ 3.
-Copyright (C) 2011 Free Software Foundation, Inc.
+Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h
index c70e9a3efe3..90fb37e521b 100644
--- a/src/emacsgtkfixed.h
+++ b/src/emacsgtkfixed.h
@@ -1,7 +1,7 @@
/* A Gtk Widget that inherits GtkFixed, but can be shrunk.
This file is only use when compiling with Gtk+ 3.
-Copyright (C) 2011 Free Software Foundation, Inc.
+Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/epaths.in b/src/epaths.in
index 54131f0e179..9ce1cefd211 100644
--- a/src/epaths.in
+++ b/src/epaths.in
@@ -1,6 +1,6 @@
/* Hey Emacs, this is -*- C -*- code! */
/*
-Copyright (C) 1993, 1995, 1997, 1999, 2001-2011
+Copyright (C) 1993, 1995, 1997, 1999, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/eval.c b/src/eval.c
index b604df8f35b..2730fc9f3d7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1,5 +1,5 @@
/* Evaluator for GNU Emacs Lisp interpreter.
- Copyright (C) 1985-1987, 1993-1995, 1999-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1987, 1993-1995, 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/fileio.c b/src/fileio.c
index 3139e634c80..5216135f000 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1,6 +1,6 @@
/* File IO for GNU Emacs.
-Copyright (C) 1985-1988, 1993-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1988, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -90,6 +90,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Nonzero during writing of auto-save files */
static int auto_saving;
+/* Nonzero umask during creation of auto-save directories */
+static int auto_saving_dir_umask;
+
/* Set by auto_save_1 to mode of original file so Fwrite_region will create
a new file with the same mode as the original */
static int auto_save_mode_bits;
@@ -2062,7 +2065,7 @@ DEFUN ("make-directory-internal", Fmake_directory_internal,
#ifdef WINDOWSNT
if (mkdir (dir) != 0)
#else
- if (mkdir (dir, 0777) != 0)
+ if (mkdir (dir, 0777 & ~auto_saving_dir_umask) != 0)
#endif
report_file_error ("Creating directory", list1 (directory));
@@ -2416,15 +2419,27 @@ check_writable (const char *filename)
return (st.st_mode & S_IWRITE || S_ISDIR (st.st_mode));
#else /* not MSDOS */
#ifdef HAVE_EUIDACCESS
- return (euidaccess (filename, 2) >= 0);
-#else
+ int res = (euidaccess (filename, 2) >= 0);
+#ifdef CYGWIN
+ /* euidaccess may have returned failure because Cygwin couldn't
+ determine the file's UID or GID; if so, we return success. */
+ if (!res)
+ {
+ struct stat st;
+ if (stat (filename, &st) < 0)
+ return 0;
+ res = (st.st_uid == -1 || st.st_gid == -1);
+ }
+#endif /* CYGWIN */
+ return res;
+#else /* not HAVE_EUIDACCESS */
/* Access isn't quite right because it uses the real uid
and we really want to test with the effective uid.
But Unix doesn't give us a right way to do it.
Opening with O_WRONLY could work for an ordinary file,
but would lose for directories. */
return (access (filename, 2) >= 0);
-#endif
+#endif /* not HAVE_EUIDACCESS */
#endif /* not MSDOS */
}
@@ -5200,16 +5215,18 @@ do_auto_save_unwind_1 (Lisp_Object value) /* used as unwind-protect function */
static Lisp_Object
do_auto_save_make_dir (Lisp_Object dir)
{
- Lisp_Object mode;
+ Lisp_Object result;
- call2 (Qmake_directory, dir, Qt);
- XSETFASTINT (mode, 0700);
- return Fset_file_modes (dir, mode);
+ auto_saving_dir_umask = 077;
+ result = call2 (Qmake_directory, dir, Qt);
+ auto_saving_dir_umask = 0;
+ return result;
}
static Lisp_Object
do_auto_save_eh (Lisp_Object ignore)
{
+ auto_saving_dir_umask = 0;
return Qnil;
}
@@ -5277,7 +5294,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
dir = Ffile_name_directory (listfile);
if (NILP (Ffile_directory_p (dir)))
internal_condition_case_1 (do_auto_save_make_dir,
- dir, Fcons (Fcons (Qfile_error, Qnil), Qnil),
+ dir, Qt,
do_auto_save_eh);
UNGCPRO;
}
diff --git a/src/filelock.c b/src/filelock.c
index 5ee2c039b81..2613eec4aca 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -1,5 +1,5 @@
/* Lock files for editing.
- Copyright (C) 1985-1987, 1993-1994, 1996, 1998-2011
+ Copyright (C) 1985-1987, 1993-1994, 1996, 1998-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/firstfile.c b/src/firstfile.c
index 98933b26c7e..84511cfe0ad 100644
--- a/src/firstfile.c
+++ b/src/firstfile.c
@@ -1,5 +1,5 @@
/* Mark beginning of data space to dump as pure, for GNU Emacs.
- Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/floatfns.c b/src/floatfns.c
index f8b775011ae..87fa19acb1f 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -1,6 +1,6 @@
/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
-Copyright (C) 1988, 1993-1994, 1999, 2001-2011
+Copyright (C) 1988, 1993-1994, 1999, 2001-2012
Free Software Foundation, Inc.
Author: Wolfgang Rupprecht
diff --git a/src/fns.c b/src/fns.c
index 121143439e0..b4430292c75 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1,5 +1,5 @@
/* Random utility Lisp functions.
- Copyright (C) 1985-1987, 1993-1995, 1997-2011
+ Copyright (C) 1985-1987, 1993-1995, 1997-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -3247,7 +3247,7 @@ DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string,
/* Base64-decode the data at FROM of LENGTH bytes into TO. If
MULTIBYTE is nonzero, the decoded result should be in multibyte
- form. If NCHARS_RETRUN is not NULL, store the number of produced
+ form. If NCHARS_RETURN is not NULL, store the number of produced
characters in *NCHARS_RETURN. */
static ptrdiff_t
diff --git a/src/font.c b/src/font.c
index 64ac36d364c..16d09af01b3 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1,6 +1,6 @@
/* font.c -- "Font" primitives.
-Copyright (C) 2006-2011 Free Software Foundation, Inc.
+Copyright (C) 2006-2012 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/src/font.h b/src/font.h
index 72ee15c5e00..89f6b29ca9d 100644
--- a/src/font.h
+++ b/src/font.h
@@ -1,5 +1,5 @@
/* font.h -- Interface definition for font handling.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
@@ -506,7 +506,7 @@ struct font_driver
Lisp_Object type;
/* 1 iff the font's foundry, family, and adstyle names are case
- sensitve. */
+ sensitive. */
int case_sensitive;
/* Return a cache of font-entities on frame F. The cache must be a
@@ -621,7 +621,7 @@ struct font_driver
/* Optional.
Get coordinates of the INDEXth anchor point of the glyph whose
code is CODE. Store the coordinates in *X and *Y. Return 0 if
- the operations was successfull. Otherwise return -1. */
+ the operations was successful. Otherwise return -1. */
int (*anchor_point) (struct font *font, unsigned code, int index,
int *x, int *y);
diff --git a/src/fontset.c b/src/fontset.c
index 7d2cbcafa70..7057167cfd4 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1,6 +1,6 @@
/* Fontset handler.
-Copyright (C) 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/src/fontset.h b/src/fontset.h
index 8831f4ce0b7..6d6ad5dbfc6 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -1,5 +1,5 @@
/* Header for fontset handler.
- Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/src/frame.c b/src/frame.c
index 00653af74d6..8b285437288 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1,6 +1,6 @@
/* Generic frame functions.
-Copyright (C) 1993-1995, 1997, 1999-2011 Free Software Foundation, Inc.
+Copyright (C) 1993-1995, 1997, 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/frame.h b/src/frame.h
index 598d9adc491..e058a101462 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1,5 +1,5 @@
/* Define frame-object for GNU Emacs.
- Copyright (C) 1993-1994, 1999-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/fringe.c b/src/fringe.c
index edc254fa3f2..4bc2f8806f3 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1,5 +1,5 @@
/* Fringe handling (split from xdisp.c).
- Copyright (C) 1985-1988, 1993-1995, 1997-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1988, 1993-1995, 1997-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ftfont.c b/src/ftfont.c
index 31f3372af5c..3c0b09b7f74 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -1,5 +1,5 @@
/* ftfont.c -- FreeType font driver.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/src/ftxfont.c b/src/ftxfont.c
index e04e802a3db..9fe4d41dcc5 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -1,5 +1,5 @@
/* ftxfont.c -- FreeType font driver on X (without using XFT).
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/src/getpagesize.h b/src/getpagesize.h
index c0c4e504f0a..545082b2e78 100644
--- a/src/getpagesize.h
+++ b/src/getpagesize.h
@@ -1,5 +1,5 @@
/* Emulate getpagesize on systems that lack it.
- Copyright (C) 1986, 1992, 1995, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1986, 1992, 1995, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/gnutls.c b/src/gnutls.c
index 9dda184d251..99992e06cdc 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1,5 +1,5 @@
/* GnuTLS glue for GNU Emacs.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -125,6 +125,7 @@ DEF_GNUTLS_FN (ssize_t, gnutls_record_send,
(gnutls_session_t, const void *, size_t));
DEF_GNUTLS_FN (const char *, gnutls_strerror, (int));
DEF_GNUTLS_FN (void, gnutls_transport_set_errno, (gnutls_session_t, int));
+DEF_GNUTLS_FN (const char *, gnutls_check_version, (const char *));
DEF_GNUTLS_FN (void, gnutls_transport_set_lowat, (gnutls_session_t, int));
DEF_GNUTLS_FN (void, gnutls_transport_set_ptr2,
(gnutls_session_t, gnutls_transport_ptr_t,
@@ -184,7 +185,11 @@ init_gnutls_functions (Lisp_Object libraries)
LOAD_GNUTLS_FN (library, gnutls_record_send);
LOAD_GNUTLS_FN (library, gnutls_strerror);
LOAD_GNUTLS_FN (library, gnutls_transport_set_errno);
- LOAD_GNUTLS_FN (library, gnutls_transport_set_lowat);
+ LOAD_GNUTLS_FN (library, gnutls_check_version);
+ /* We don't need to call gnutls_transport_set_lowat in GnuTLS 2.11.1
+ and later, and the function was removed entirely in 3.0.0. */
+ if (!fn_gnutls_check_version ("2.11.1"))
+ LOAD_GNUTLS_FN (library, gnutls_transport_set_lowat);
LOAD_GNUTLS_FN (library, gnutls_transport_set_ptr2);
LOAD_GNUTLS_FN (library, gnutls_transport_set_pull_function);
LOAD_GNUTLS_FN (library, gnutls_transport_set_push_function);
@@ -282,7 +287,12 @@ emacs_gnutls_handshake (struct Lisp_Process *proc)
(Note: this is probably not strictly necessary as the lowat
value is only used when no custom pull/push functions are
set.) */
- fn_gnutls_transport_set_lowat (state, 0);
+ /* According to GnuTLS NEWS file, lowat level has been set to
+ zero by default in version 2.11.1, and the function
+ gnutls_transport_set_lowat was removed from the library in
+ version 2.99.0. */
+ if (!fn_gnutls_check_version ("2.11.1"))
+ fn_gnutls_transport_set_lowat (state, 0);
#else
/* This is how GnuTLS takes sockets: as file descriptors passed
in. For an Emacs process socket, infd and outfd are the
diff --git a/src/gnutls.h b/src/gnutls.h
index ddb47137e6e..b6afba25355 100644
--- a/src/gnutls.h
+++ b/src/gnutls.h
@@ -1,5 +1,5 @@
/* GnuTLS glue for GNU Emacs.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 43cdb38c640..d5e890d7207 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1,6 +1,6 @@
/* Functions for creating and updating GTK widgets.
-Copyright (C) 2003-2011 Free Software Foundation, Inc.
+Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -3052,7 +3052,7 @@ xg_update_submenu (GtkWidget *submenu,
}
}
- /* Remove widgets from first structual change. */
+ /* Remove widgets from first structural change. */
if (iter)
{
/* If we are adding new menu items below, we must remove from
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 7cc2d21f9c4..2c6ca066719 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -1,6 +1,6 @@
/* Definitions and headers for GTK widgets.
-Copyright (C) 2003-2011 Free Software Foundation, Inc.
+Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/image.c b/src/image.c
index 736c1b3472f..92cd75f99f4 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1,5 +1,5 @@
/* Functions for image support on window system.
- Copyright (C) 1989, 1992-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -7565,6 +7565,22 @@ extern WandExport void PixelGetMagickColor (const PixelWand *,
MagickPixelPacket *);
#endif
+/* Log ImageMagick error message.
+ Useful when a ImageMagick function returns the status `MagickFalse'. */
+
+static void
+imagemagick_error (MagickWand *wand)
+{
+ char *description;
+ ExceptionType severity;
+
+ description = MagickGetException (wand, &severity);
+ image_error ("ImageMagick error: %s",
+ make_string (description, strlen (description)),
+ Qnil);
+ description = (char *) MagickRelinquishMemory (description);
+}
+
/* Helper function for imagemagick_load, which does the actual loading
given contents and size, apart from frame and image structures,
passed from imagemagick_load. Uses librimagemagick to do most of
@@ -7619,6 +7635,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
image = image_spec_value (img->spec, QCindex, NULL);
ino = INTEGERP (image) ? XFASTINT (image) : 0;
ping_wand = NewMagickWand ();
+ /* MagickSetResolution (ping_wand, 2, 2); (Bug#10112) */
if (filename != NULL)
{
@@ -7629,7 +7646,12 @@ imagemagick_load_image (struct frame *f, struct image *img,
status = MagickPingImageBlob (ping_wand, contents, size);
}
- MagickSetResolution (ping_wand, 2, 2);
+ if (status == MagickFalse)
+ {
+ imagemagick_error (ping_wand);
+ DestroyMagickWand (ping_wand);
+ return 0;
+ }
if (! (0 <= ino && ino < MagickGetNumberImages (ping_wand)))
{
@@ -7670,7 +7692,10 @@ imagemagick_load_image (struct frame *f, struct image *img,
{
image_wand = NewMagickWand ();
if (MagickReadImageBlob (image_wand, contents, size) == MagickFalse)
- goto imagemagick_error;
+ {
+ imagemagick_error (image_wand);
+ goto imagemagick_error;
+ }
}
/* If width and/or height is set in the display spec assume we want
@@ -7698,6 +7723,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
if (status == MagickFalse)
{
image_error ("Imagemagick scale failed", Qnil, Qnil);
+ imagemagick_error (image_wand);
goto imagemagick_error;
}
}
@@ -7752,6 +7778,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
if (status == MagickFalse)
{
image_error ("Imagemagick image rotate failed", Qnil, Qnil);
+ imagemagick_error (image_wand);
goto imagemagick_error;
}
}
@@ -7976,7 +8003,7 @@ recognize as images, such as C. See `imagemagick-types-inhibit'. */)
Qimagemagicktype = intern (imtypes[i]);
typelist = Fcons (Qimagemagicktype, typelist);
}
- return typelist;
+ return Fnreverse (typelist);
}
#endif /* defined (HAVE_IMAGEMAGICK) */
diff --git a/src/indent.c b/src/indent.c
index 7e2edc8713b..b1c86c3ab13 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1,5 +1,5 @@
/* Indentation functions.
- Copyright (C) 1985-1988, 1993-1995, 1998, 2000-2011
+ Copyright (C) 1985-1988, 1993-1995, 1998, 2000-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/indent.h b/src/indent.h
index fe5f60b0df5..e198137a756 100644
--- a/src/indent.h
+++ b/src/indent.h
@@ -1,5 +1,5 @@
/* Definitions for interface to indent.c
- Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/insdel.c b/src/insdel.c
index 10d37c42592..748e2d54109 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1,5 +1,5 @@
/* Buffer insertion/deletion and gap motion for GNU Emacs.
- Copyright (C) 1985-1986, 1993-1995, 1997-2011
+ Copyright (C) 1985-1986, 1993-1995, 1997-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/intervals.c b/src/intervals.c
index ecb37495a04..e6c1b4d60d2 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1,5 +1,5 @@
/* Code for doing intervals.
- Copyright (C) 1993-1995, 1997-1998, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1995, 1997-1998, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/intervals.h b/src/intervals.h
index be0cc43d032..6a2a8c9d83d 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -1,5 +1,5 @@
/* Definitions and global variables for intervals.
- Copyright (C) 1993-1994, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/keyboard.c b/src/keyboard.c
index aa8a9908f3b..177034f91ca 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1,6 +1,6 @@
/* Keyboard and mouse input; editor command loop.
-Copyright (C) 1985-1989, 1993-1997, 1999-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1989, 1993-1997, 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/keyboard.h b/src/keyboard.h
index 9f2be5b531b..202972ffbd8 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -1,5 +1,5 @@
/* Declarations useful when processing input.
- Copyright (C) 1985-1987, 1993, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1987, 1993, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/keymap.c b/src/keymap.c
index 2a0f162a0e0..cc4419a4d2f 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1,5 +1,5 @@
/* Manipulation of keymaps
- Copyright (C) 1985-1988, 1993-1995, 1998-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1988, 1993-1995, 1998-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/keymap.h b/src/keymap.h
index a989f124b14..234ffce471d 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -1,5 +1,5 @@
/* Functions to manipulate keymaps.
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/lastfile.c b/src/lastfile.c
index ab07e748930..f8a64797362 100644
--- a/src/lastfile.c
+++ b/src/lastfile.c
@@ -1,5 +1,5 @@
/* Mark end of data space to dump as pure, for GNU Emacs.
- Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/lisp.h b/src/lisp.h
index ecc2fd16267..cc82edb2f5f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1,5 +1,5 @@
/* Fundamental definitions for GNU Emacs Lisp interpreter.
- Copyright (C) 1985-1987, 1993-1995, 1997-2011
+ Copyright (C) 1985-1987, 1993-1995, 1997-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/lisp.mk b/src/lisp.mk
index 68748b27f28..c082630f717 100644
--- a/src/lisp.mk
+++ b/src/lisp.mk
@@ -1,6 +1,6 @@
### lisp.mk --- src/Makefile fragment for GNU Emacs
-## Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2011
+## Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2012
## Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/src/lread.c b/src/lread.c
index d38fb515bff..2a7b7a8585d 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1,6 +1,6 @@
/* Lisp parsing and input streams.
-Copyright (C) 1985-1989, 1993-1995, 1997-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1989, 1993-1995, 1997-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -3119,7 +3119,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
if (uninterned_symbol && ! NILP (Vpurify_flag))
name = make_pure_string (read_buffer, nchars, nbytes, multibyte);
else
- name = make_specified_string (read_buffer, nchars, nbytes,multibyte);
+ name = make_specified_string (read_buffer, nchars, nbytes, multibyte);
result = (uninterned_symbol ? Fmake_symbol (name)
: Fintern (name, Qnil));
diff --git a/src/m/alpha.h b/src/m/alpha.h
index 713598fa8b6..2a97a3d5b0c 100644
--- a/src/m/alpha.h
+++ b/src/m/alpha.h
@@ -1,6 +1,6 @@
/* Machine description file for the alpha chip.
-Copyright (C) 1994, 1997, 1999, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1994, 1997, 1999, 2001-2012 Free Software Foundation, Inc.
Author: Rainer Schoepf
(according to authors.el)
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 50fcf8e7872..f0482c733f9 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -1,6 +1,6 @@
/* machine description file for AMD x86-64.
-Copyright (C) 2002-2011 Free Software Foundation, Inc.
+Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/m/ia64.h b/src/m/ia64.h
index 7a8866a9503..2ddc2fdfb17 100644
--- a/src/m/ia64.h
+++ b/src/m/ia64.h
@@ -1,6 +1,6 @@
/* machine description file for the IA-64 architecture.
-Copyright (C) 2000-2011 Free Software Foundation, Inc.
+Copyright (C) 2000-2012 Free Software Foundation, Inc.
Contributed by David Mosberger <davidm@hpl.hp.com>
diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h
index ca2188bc068..9798ad2d3d7 100644
--- a/src/m/ibmrs6000.h
+++ b/src/m/ibmrs6000.h
@@ -1,6 +1,6 @@
/* R2 AIX machine/system dependent defines
-Copyright (C) 1988, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1988, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h
index 5ea7974b052..aa652a8206a 100644
--- a/src/m/ibms390x.h
+++ b/src/m/ibms390x.h
@@ -1,6 +1,6 @@
/* Machine description file for IBM S390 in 64-bit mode
-Copyright (C) 2002-2011 Free Software Foundation, Inc.
+Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/m/intel386.h b/src/m/intel386.h
index 114b7fef963..78a43e92c21 100644
--- a/src/m/intel386.h
+++ b/src/m/intel386.h
@@ -1,6 +1,6 @@
/* Machine description file for intel 386.
-Copyright (C) 1987, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1987, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/m/m68k.h b/src/m/m68k.h
index 16e0b9f0bef..120a2bad293 100644
--- a/src/m/m68k.h
+++ b/src/m/m68k.h
@@ -1,6 +1,6 @@
/* Machine description file for generic Motorola 68k.
-Copyright (C) 1985, 1995, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1985, 1995, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/m/macppc.h b/src/m/macppc.h
index aef781e2c39..0303ead25d6 100644
--- a/src/m/macppc.h
+++ b/src/m/macppc.h
@@ -1,6 +1,6 @@
/* machine description file For the powerpc Macintosh.
-Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/m/sparc.h b/src/m/sparc.h
index 99668043f30..27b6070ba87 100644
--- a/src/m/sparc.h
+++ b/src/m/sparc.h
@@ -1,6 +1,6 @@
/* machine description file for Sun 4 SPARC.
-Copyright (C) 1987, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1987, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/m/template.h b/src/m/template.h
index 38649e8ac6d..5f1a46c86e1 100644
--- a/src/m/template.h
+++ b/src/m/template.h
@@ -1,6 +1,6 @@
/* machine description file template.
-Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/m/vax.h b/src/m/vax.h
index a375600cead..e4bed4090b9 100644
--- a/src/m/vax.h
+++ b/src/m/vax.h
@@ -1,6 +1,6 @@
/* machine description file for vax.
-Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/macros.c b/src/macros.c
index 4860308367d..3f4f8624479 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -1,6 +1,6 @@
/* Keyboard macros.
-Copyright (C) 1985-1986, 1993, 2000-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1993, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/macros.h b/src/macros.h
index 7a5d532fbb7..d66784a0246 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -1,5 +1,5 @@
/* Definitions for keyboard macro interpretation in GNU Emacs.
- Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 36e4511d845..d7ca325e223 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -1,5 +1,5 @@
# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
-# Copyright (C) 2000-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/src/marker.c b/src/marker.c
index 2b78282e693..37953494459 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -1,5 +1,5 @@
/* Markers: examining, setting and deleting.
- Copyright (C) 1985, 1997-1998, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1997-1998, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/mem-limits.h b/src/mem-limits.h
index 86b2f44846d..472e591b38d 100644
--- a/src/mem-limits.h
+++ b/src/mem-limits.h
@@ -1,5 +1,5 @@
/* Includes for memory limit warnings.
- Copyright (C) 1990, 1993-1996, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1993-1996, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/menu.c b/src/menu.c
index 90423be5973..9ccfffd768c 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1,6 +1,6 @@
/* Platform-independent code for terminal communications.
-Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2011
+Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/menu.h b/src/menu.h
index 451401b42d5..cb22a5255d6 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -1,5 +1,5 @@
/* Functions to manipulate menus.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/minibuf.c b/src/minibuf.c
index 9a4df333788..cf860847d59 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1,6 +1,6 @@
/* Minibuffer input and completion.
-Copyright (C) 1985-1986, 1993-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/msdos.c b/src/msdos.c
index 64e9d72c784..885cedd3df0 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1,6 +1,6 @@
/* MS-DOS specific C utilities. -*- coding: raw-text -*-
-Copyright (C) 1993-1997, 1999-2011 Free Software Foundation, Inc.
+Copyright (C) 1993-1997, 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/msdos.h b/src/msdos.h
index 3048b5f7e35..a73c1f2901f 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -1,5 +1,5 @@
/* MS-DOS specific C utilities, interface.
- Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ns.mk b/src/ns.mk
index c364dae7086..d3b5afeb99e 100644
--- a/src/ns.mk
+++ b/src/ns.mk
@@ -1,6 +1,6 @@
### autodeps.mk --- src/Makefile fragment for GNU Emacs
-## Copyright (C) 2008-2011 Free Software Foundation, Inc.
+## Copyright (C) 2008-2012 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/src/nsfns.m b/src/nsfns.m
index ccefec1e34f..5cea73c39ca 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1,6 +1,6 @@
/* Functions for the NeXT/Open/GNUstep and MacOSX window system.
-Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2011
+Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -394,9 +394,8 @@ x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
if (face)
{
col = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f);
- face->background
- = (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain];
- [col release];
+ face->background = ns_index_color
+ ([col colorWithAlphaComponent: alpha], f);
update_face_from_frame_parameter (f, Qbackground_color, arg);
}
@@ -770,7 +769,7 @@ ns_implicitly_set_icon_type (struct frame *f)
{
Lisp_Object tem;
EmacsView *view = FRAME_NS_VIEW (f);
- id image =nil;
+ id image = nil;
Lisp_Object chain, elt;
NSAutoreleasePool *pool;
BOOL setMini = YES;
@@ -797,7 +796,7 @@ ns_implicitly_set_icon_type (struct frame *f)
}
for (chain = Vns_icon_type_alist;
- (image = nil) && CONSP (chain);
+ image == nil && CONSP (chain);
chain = XCDR (chain))
{
elt = XCAR (chain);
@@ -1287,7 +1286,7 @@ This function is an internal primitive--use `make-frame' instead. */)
"foreground", "Foreground", RES_TYPE_STRING);
x_default_parameter (f, parms, Qbackground_color, build_string ("White"),
"background", "Background", RES_TYPE_STRING);
- /* FIXME: not suppported yet in Nextstep */
+ /* FIXME: not supported yet in Nextstep */
x_default_parameter (f, parms, Qline_spacing, Qnil,
"lineSpacing", "LineSpacing", RES_TYPE_NUMBER);
x_default_parameter (f, parms, Qleft_fringe, Qnil,
diff --git a/src/nsfont.m b/src/nsfont.m
index 44c427ce0cc..556102b6f44 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1,6 +1,6 @@
/* Font back-end driver for the NeXT/Open/GNUstep and MacOSX window system.
See font.h
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -126,8 +126,8 @@ ns_attribute_fvalue (NSFontDescriptor *fdesc, NSString *trait)
/* Converts FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, plus family and script/lang
to NSFont descriptor. Information under extra only needed for matching. */
#define STYLE_REF 100
-static NSFontDescriptor
-*ns_spec_to_descriptor(Lisp_Object font_spec)
+static NSFontDescriptor *
+ns_spec_to_descriptor (Lisp_Object font_spec)
{
NSFontDescriptor *fdesc;
NSMutableDictionary *fdAttrs = [NSMutableDictionary new];
@@ -152,8 +152,13 @@ static NSFontDescriptor
[fdAttrs setObject: tdict forKey: NSFontTraitsAttribute];
fdesc = [NSFontDescriptor fontDescriptorWithFontAttributes: fdAttrs];
- if (family != nil)
+ if (family != nil)
+ {
fdesc = [fdesc fontDescriptorWithFamily: family];
+ }
+
+ [fdAttrs release];
+ [tdict release];
return fdesc;
}
@@ -469,6 +474,7 @@ static NSSet
if ([families count] > 0 || pct < 0.05)
break;
}
+ [charset release];
}
#ifdef NS_IMPL_COCOA
if ([families count] == 0)
@@ -536,12 +542,14 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
family = [fdesc objectForKey: NSFontFamilyAttribute];
if (family != nil && !foundItal && XINT (Flength (list)) > 0)
{
- NSFontDescriptor *sDesc = [[[NSFontDescriptor new]
- fontDescriptorWithSymbolicTraits: NSFontItalicTrait]
- fontDescriptorWithFamily: family];
+ NSFontDescriptor *s1 = [NSFontDescriptor new];
+ NSFontDescriptor *sDesc
+ = [[s1 fontDescriptorWithSymbolicTraits: NSFontItalicTrait]
+ fontDescriptorWithFamily: family];
list = Fcons (ns_descriptor_to_entity (sDesc,
AREF (font_spec, FONT_EXTRA_INDEX),
"synthItal"), list);
+ [s1 release];
}
/* Return something if was a match and nothing found. */
@@ -1293,7 +1301,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
abort ();
/* create a string containing all Unicode characters in this block */
- for (idx = block<<8, i =0; i<0x100; idx++, i++)
+ for (idx = block<<8, i = 0; i < 0x100; idx++, i++)
if (idx < 0xD800 || idx > 0xDFFF)
unichars[i] = idx;
else
@@ -1309,7 +1317,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
NSGlyphGenerator *glyphGenerator = [NSGlyphGenerator sharedGlyphGenerator];
/*NSCharacterSet *coveredChars = [nsfont coveredCharacterSet]; */
unsigned int numGlyphs = [font_info->nsfont numberOfGlyphs];
- NSUInteger gInd =0, cInd =0;
+ NSUInteger gInd = 0, cInd = 0;
[glyphStorage setString: allChars font: font_info->nsfont];
[glyphGenerator generateGlyphsForGlyphStorage: glyphStorage
@@ -1317,7 +1325,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
glyphIndex: &gInd characterIndex: &cInd];
#endif
glyphs = font_info->glyphs[block];
- for (i =0; i<0x100; i++, glyphs++)
+ for (i = 0; i < 0x100; i++, glyphs++)
{
#ifdef NS_IMPL_GNUSTEP
g = unichars[i];
@@ -1425,6 +1433,8 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block)
- (void) setString: (NSString *)str font: (NSFont *)font
{
[dict setObject: font forKey: NSFontAttributeName];
+ if (attrStr != nil)
+ [attrStr release];
attrStr = [[NSAttributedString alloc] initWithString: str attributes: dict];
maxChar = [str length];
maxGlyph = 0;
diff --git a/src/nsgui.h b/src/nsgui.h
index 99c64cd4cde..0c9a8a01e69 100644
--- a/src/nsgui.h
+++ b/src/nsgui.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication on the NeXT/Open/GNUstep API.
- Copyright (C) 1995, 2005, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2005, 2008-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/nsimage.m b/src/nsimage.m
index 2cb0c3bff76..82a176975ff 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -1,5 +1,5 @@
/* Image support for the NeXT/Open/GNUstep and MacOSX window system.
- Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2011
+ Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 644576ae559..4bfe0cc003a 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1,5 +1,5 @@
/* NeXT/Open/GNUstep and MacOSX Cocoa menu and toolbar module.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -74,6 +74,10 @@ EmacsMenu *mainMenu, *svcsMenu, *dockMenu;
static int popup_activated_flag;
static NSModalSession popupSession;
+/* Nonzero means we are tracking and updating menus. */
+static int trackingMenu;
+
+
/* NOTE: toolbar implementation is at end,
following complete menu implementation. */
@@ -400,6 +404,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
items = FRAME_MENU_BAR_ITEMS (f);
if (NILP (items))
{
+ free_menubar_widget_value_tree (first_wv);
[pool release];
UNBLOCK_INPUT;
return;
@@ -427,6 +432,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
if (i == n)
{
+ free_menubar_widget_value_tree (first_wv);
[pool release];
UNBLOCK_INPUT;
return;
@@ -543,21 +549,44 @@ set_frame_menubar (struct frame *f, int first_time, int deep_p)
frame = f;
}
+#ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
+extern NSString *NSMenuDidBeginTrackingNotification;
+#endif
+#endif
+
+#ifdef NS_IMPL_COCOA
+-(void)trackingNotification:(NSNotification *)notification
+{
+ /* Update menu in menuNeedsUpdate only while tracking menus. */
+ trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification
+ ? 1 : 0);
+}
+#endif
/* delegate method called when a submenu is being opened: run a 'deep' call
to set_frame_menubar */
- (void)menuNeedsUpdate: (NSMenu *)menu
{
- NSEvent *event;
if (!FRAME_LIVE_P (frame))
return;
- event = [[FRAME_NS_VIEW (frame) window] currentEvent];
- /* HACK: Cocoa/Carbon will request update on every keystroke
+
+ /* Cocoa/Carbon will request update on every keystroke
via IsMenuKeyEvent -> CheckMenusForKeyEvent. These are not needed
since key equivalents are handled through emacs.
- On Leopard, even keystroke events generate SystemDefined events, but
- their subtype is 8. */
- if ([event type] != NSSystemDefined || [event subtype] == 8
+ On Leopard, even keystroke events generate SystemDefined event.
+ Third-party applications that enhance mouse / trackpad
+ interaction, or also VNC/Remote Desktop will send events
+ of type AppDefined rather than SysDefined.
+ Menus will fail to show up if they haven't been initialized.
+ AppDefined events may lack timing data.
+
+ Thus, we rely on the didBeginTrackingNotification notification
+ as above to indicate the need for updates.
+ From 10.6 on, we could also use -[NSMenu propertiesToUpdate]: In the
+ key press case, NSMenuPropertyItemImage (e.g.) won't be set.
+ */
+ if (trackingMenu == 0
/* Also, don't try this if from an event picked up asynchronously,
as lots of lisp evaluation happens in ns_update_menubar. */
|| handling_signal != 0)
@@ -1795,6 +1824,11 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_
void
syms_of_nsmenu (void)
{
+#ifndef NS_IMPL_COCOA
+ /* Don't know how to keep track of this in Next/Open/Gnustep. Always
+ update menus there. */
+ trackingMenu = 1;
+#endif
defsubr (&Sx_popup_dialog);
defsubr (&Sns_reset_menu);
defsubr (&Smenu_or_popup_active_p);
diff --git a/src/nsselect.m b/src/nsselect.m
index 9f6f35968f5..5741236c987 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -1,5 +1,5 @@
/* NeXT/Open/GNUstep / MacOSX Cocoa selection processing for emacs.
- Copyright (C) 1993-1994, 2005-2006, 2008-2011
+ Copyright (C) 1993-1994, 2005-2006, 2008-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -35,8 +35,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
#include "termhooks.h"
#include "keyboard.h"
-#define CUT_BUFFER_SUPPORT
-
Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME;
static Lisp_Object Vselection_alist;
@@ -60,13 +58,18 @@ static NSString *
symbol_to_nsstring (Lisp_Object sym)
{
CHECK_SYMBOL (sym);
- if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard;
+ if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard;
if (EQ (sym, QPRIMARY)) return NXPrimaryPboard;
if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
if (EQ (sym, QTEXT)) return NSStringPboardType;
return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)];
}
+static NSPasteboard *
+ns_symbol_to_pb (Lisp_Object symbol)
+{
+ return [NSPasteboard pasteboardWithName: symbol_to_nsstring (symbol)];
+}
static Lisp_Object
ns_string_to_symbol (NSString *t)
@@ -230,70 +233,11 @@ static Lisp_Object
ns_get_foreign_selection (Lisp_Object symbol, Lisp_Object target)
{
id pb;
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (symbol)];
- return ns_string_from_pasteboard (pb);
-}
-
-
-static void
-ns_handle_selection_request (struct input_event *event)
-{
- // FIXME: BIG UGLY HACK!!!
- id pb = (id)*(EMACS_INT*)&(event->x);
- NSString *type = (NSString *)*(EMACS_INT*)&(event->y);
- Lisp_Object selection_name, selection_data, target_symbol, data;
- Lisp_Object successful_p, rest;
-
- selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]);
- target_symbol = ns_string_to_symbol (type);
- selection_data = assq_no_quit (selection_name, Vselection_alist);
- successful_p = Qnil;
-
- if (!NILP (selection_data))
- {
- data = ns_get_local_selection (selection_name, target_symbol);
- if (!NILP (data))
- {
- if (STRINGP (data))
- ns_string_to_pasteboard_internal (pb, data, type);
- successful_p = Qt;
- }
- }
-
- if (!EQ (Vns_sent_selection_hooks, Qunbound))
- {
- for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest))
- call3 (Fcar (rest), selection_name, target_symbol, successful_p);
- }
+ pb = ns_symbol_to_pb (symbol);
+ return pb != nil ? ns_string_from_pasteboard (pb) : Qnil;
}
-static void
-ns_handle_selection_clear (struct input_event *event)
-{
- id pb = (id)*(EMACS_INT*)&(event->x);
- Lisp_Object selection_name, selection_data, rest;
-
- selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]);
- selection_data = assq_no_quit (selection_name, Vselection_alist);
- if (NILP (selection_data)) return;
-
- if (EQ (selection_data, Fcar (Vselection_alist)))
- Vselection_alist = Fcdr (Vselection_alist);
- else
- {
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
- if (EQ (selection_data, Fcar (Fcdr (rest))))
- Fsetcdr (rest, Fcdr (Fcdr (rest)));
- }
-
- if (!EQ (Vns_lost_selection_hooks, Qunbound))
- {
- for (rest = Vns_lost_selection_hooks;CONSP (rest); rest = Fcdr (rest))
- call1 (Fcar (rest), selection_name);
- }
-}
-
/* ==========================================================================
@@ -401,29 +345,44 @@ anything that the functions on `selection-converter-alist' know about. */)
{
id pb;
Lisp_Object old_value, new_value;
+ NSString *type;
+ Lisp_Object successful_p = Qnil, rest;
+ Lisp_Object target_symbol, data;
+
check_ns ();
CHECK_SYMBOL (selection_name);
if (NILP (selection_value))
error ("selection-value may not be nil.");
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)];
+ pb = ns_symbol_to_pb (selection_name);
+ if (pb == nil) return Qnil;
+
ns_declare_pasteboard (pb);
old_value = assq_no_quit (selection_name, Vselection_alist);
new_value = Fcons (selection_name, Fcons (selection_value, Qnil));
+
if (NILP (old_value))
Vselection_alist = Fcons (new_value, Vselection_alist);
else
Fsetcdr (old_value, Fcdr (new_value));
- /* XXX An evil hack, but a necessary one I fear XXX */
- {
- struct input_event ev;
- ev.kind = SELECTION_REQUEST_EVENT;
- ev.modifiers = 0;
- ev.code = 0;
- *(EMACS_INT*)(&(ev.x)) = (EMACS_INT)pb; // FIXME: BIG UGLY HACK!!
- *(EMACS_INT*)(&(ev.y)) = (EMACS_INT)NSStringPboardType;
- ns_handle_selection_request (&ev);
- }
+
+ /* We only support copy of text. */
+ type = NSStringPboardType;
+ target_symbol = ns_string_to_symbol (type);
+ data = ns_get_local_selection (selection_name, target_symbol);
+ if (!NILP (data))
+ {
+ if (STRINGP (data))
+ ns_string_to_pasteboard_internal (pb, data, type);
+ successful_p = Qt;
+ }
+
+ if (!EQ (Vns_sent_selection_hooks, Qunbound))
+ {
+ for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest))
+ call3 (Fcar (rest), selection_name, target_symbol, successful_p);
+ }
+
return selection_value;
}
@@ -438,8 +397,8 @@ DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal,
CHECK_SYMBOL (selection_name);
if (NILP (assq_no_quit (selection_name, Vselection_alist))) return Qnil;
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)];
- ns_undeclare_pasteboard (pb);
+ pb = ns_symbol_to_pb (selection_name);
+ if (pb != nil) ns_undeclare_pasteboard (pb);
return Qt;
}
@@ -460,8 +419,10 @@ and t is the same as `SECONDARY'.) */)
CHECK_SYMBOL (selection);
if (EQ (selection, Qnil)) selection = QPRIMARY;
if (EQ (selection, Qt)) selection = QSECONDARY;
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection)];
- types =[pb types];
+ pb = ns_symbol_to_pb (selection);
+ if (pb == nil) return Qnil;
+
+ types = [pb types];
return ([types count] == 0) ? Qnil : Qt;
}
@@ -511,45 +472,31 @@ TYPE is the type of data desired, typically `STRING'. */)
}
-#ifdef CUT_BUFFER_SUPPORT
-DEFUN ("ns-get-cut-buffer-internal", Fns_get_cut_buffer_internal,
- Sns_get_cut_buffer_internal, 1, 1, 0,
- doc: /* Returns the value of the named cut buffer. */)
- (Lisp_Object buffer)
+DEFUN ("ns-get-selection-internal", Fns_get_selection_internal,
+ Sns_get_selection_internal, 1, 1, 0,
+ doc: /* Returns the value of SELECTION as a string.
+SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
+ (Lisp_Object selection)
{
id pb;
check_ns ();
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (buffer)];
- return ns_string_from_pasteboard (pb);
+ pb = ns_symbol_to_pb (selection);
+ return pb != nil ? ns_string_from_pasteboard (pb) : Qnil;
}
-DEFUN ("ns-rotate-cut-buffers-internal", Fns_rotate_cut_buffers_internal,
- Sns_rotate_cut_buffers_internal, 1, 1, 0,
- doc: /* Rotate the values of the cut buffers by N steps.
-Positive N means move values forward, negative means
-backward. CURRENTLY NOT IMPLEMENTED UNDER NEXTSTEP. */ )
- (Lisp_Object n)
-{
- /* XXX This function is unimplemented under NeXTstep XXX */
- Fsignal (Qquit, Fcons (build_string (
- "Warning: ns-rotate-cut-buffers-internal not implemented\n"), Qnil));
- return Qnil;
-}
-
-
-DEFUN ("ns-store-cut-buffer-internal", Fns_store_cut_buffer_internal,
- Sns_store_cut_buffer_internal, 2, 2, 0,
- doc: /* Sets the value of the named cut buffer (typically CUT_BUFFER0). */)
- (Lisp_Object buffer, Lisp_Object string)
+DEFUN ("ns-store-selection-internal", Fns_store_selection_internal,
+ Sns_store_selection_internal, 2, 2, 0,
+ doc: /* Sets the string value of SELECTION.
+SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
+ (Lisp_Object selection, Lisp_Object string)
{
id pb;
check_ns ();
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (buffer)];
- ns_string_to_pasteboard (pb, string);
+ pb = ns_symbol_to_pb (selection);
+ if (pb != nil) ns_string_to_pasteboard (pb, string);
return Qnil;
}
-#endif
void
@@ -572,11 +519,8 @@ syms_of_nsselect (void)
defsubr (&Sx_own_selection_internal);
defsubr (&Sx_selection_exists_p);
defsubr (&Sx_selection_owner_p);
-#ifdef CUT_BUFFER_SUPPORT
- defsubr (&Sns_get_cut_buffer_internal);
- defsubr (&Sns_rotate_cut_buffers_internal);
- defsubr (&Sns_store_cut_buffer_internal);
-#endif
+ defsubr (&Sns_get_selection_internal);
+ defsubr (&Sns_store_selection_internal);
Vselection_alist = Qnil;
staticpro (&Vselection_alist);
diff --git a/src/nsterm.h b/src/nsterm.h
index 14918cca90d..bc535b47d97 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication with NeXT/Open/GNUstep API.
- Copyright (C) 1989, 1993, 2005, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1993, 2005, 2008-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/nsterm.m b/src/nsterm.m
index 1d645943065..70d3cc0e8b8 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1,5 +1,5 @@
/* NeXT/Open/GNUstep / MacOSX communication module.
- Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2011
+ Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1158,6 +1158,9 @@ x_free_frame_resources (struct frame *f)
xfree (f->output_data.ns);
+ if (f->output_data.ns->miniimage != nil)
+ [f->output_data.ns->miniimage release];
+
[[view window] close];
[view release];
@@ -1351,7 +1354,7 @@ ns_index_color (NSColor *color, struct frame *f)
{
struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
ptrdiff_t idx;
- NSNumber *index;
+ ptrdiff_t i;
if (!color_table->colors)
{
@@ -1364,21 +1367,13 @@ ns_index_color (NSColor *color, struct frame *f)
}
/* do we already have this color ? */
- {
- ptrdiff_t i;
- for (i = 1; i < color_table->avail; i++)
- {
- if (color_table->colors[i] && [color_table->colors[i] isEqual: color])
- {
- [color_table->colors[i] retain];
- return i;
- }
- }
- }
+ for (i = 1; i < color_table->avail; i++)
+ if (color_table->colors[i] && [color_table->colors[i] isEqual: color])
+ return i;
if ([color_table->empty_indices count] > 0)
{
- index = [color_table->empty_indices anyObject];
+ NSNumber *index = [color_table->empty_indices anyObject];
[color_table->empty_indices removeObject: index];
idx = [index unsignedLongValue];
}
@@ -1411,20 +1406,20 @@ ns_free_indexed_color (unsigned long idx, struct frame *f)
color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
if (idx <= 0 || idx >= color_table->size) {
- message1("ns_free_indexed_color: Color index out of range.\n");
+ message1 ("ns_free_indexed_color: Color index out of range.\n");
return;
}
index = [NSNumber numberWithUnsignedInt: idx];
if ([color_table->empty_indices containsObject: index]) {
- message1("ns_free_indexed_color: attempt to free already freed color.\n");
+ message1 ("ns_free_indexed_color: attempt to free already freed color.\n");
return;
}
color = color_table->colors[idx];
[color release];
color_table->colors[idx] = nil;
- [color_table->empty_indices addObject: [NSNumber numberWithUnsignedInt: idx]];
+ [color_table->empty_indices addObject: index];
/*fprintf(stderr, "color_table: FREED %d\n",idx);*/
}
@@ -4203,6 +4198,15 @@ ns_term_init (Lisp_Object display_name)
[NSApp setServicesMenu: svcsMenu];
/* Needed at least on Cocoa, to get dock menu to show windows */
[NSApp setWindowsMenu: [[NSMenu alloc] init]];
+
+ [[NSNotificationCenter defaultCenter]
+ addObserver: mainMenu
+ selector: @selector (trackingNotification:)
+ name: NSMenuDidBeginTrackingNotification object: mainMenu];
+ [[NSNotificationCenter defaultCenter]
+ addObserver: mainMenu
+ selector: @selector (trackingNotification:)
+ name: NSMenuDidEndTrackingNotification object: mainMenu];
}
#endif /* MAC OS X menu setup */
diff --git a/src/print.c b/src/print.c
index b8b7ab371f6..443869b6fd0 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1,6 +1,6 @@
/* Lisp object printing and output streams.
-Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2011
+Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -609,7 +609,7 @@ A printed representation of an object is text which describes that object. */)
printcharfun = Vprin1_to_string_buffer;
PRINTPREPARE;
print (object, printcharfun, NILP (noescape));
- /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */
+ /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINISH */
PRINTFINISH;
}
diff --git a/src/process.c b/src/process.c
index 206af7059fb..b4fca389d0d 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1,6 +1,6 @@
/* Asynchronous subprocess control for GNU Emacs.
-Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2011
+Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -3488,7 +3488,7 @@ usage: (make-network-process &rest ARGS) */)
|| (NILP (buffer) && NILP (BVAR (&buffer_defaults, enable_multibyte_characters))))
/* We dare not decode end-of-line format by setting VAL to
Qraw_text, because the existing Emacs Lisp libraries
- assume that they receive bare code including a sequene of
+ assume that they receive bare code including a sequence of
CR LF. */
val = Qnil;
else
diff --git a/src/process.h b/src/process.h
index aff9e970f63..9efde261386 100644
--- a/src/process.h
+++ b/src/process.h
@@ -1,5 +1,5 @@
/* Definitions for asynchronous process control in GNU Emacs.
- Copyright (C) 1985, 1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/puresize.h b/src/puresize.h
index 889d836af78..bca36b2a562 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -1,5 +1,5 @@
/* How much read-only Lisp storage a dumped Emacs needs.
- Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ralloc.c b/src/ralloc.c
index 62189ad8fc7..13587b9ffd4 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -1,5 +1,5 @@
/* Block-relocating memory allocator.
- Copyright (C) 1993, 1995, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/regex.c b/src/regex.c
index 0ba05a95fdb..0f9150193ec 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -2,7 +2,7 @@
0.12. (Implements POSIX draft P1003.2/D11.2, except for some of the
internationalization features.)
- Copyright (C) 1993-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/regex.h b/src/regex.h
index 32ccfb7ddef..643d0b7b5ab 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -1,7 +1,7 @@
/* Definitions for data structures and routines for the regular
expression library, version 0.12.
- Copyright (C) 1985, 1989-1993, 1995, 2000-2011
+ Copyright (C) 1985, 1989-1993, 1995, 2000-2012
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/src/region-cache.c b/src/region-cache.c
index 054374eb688..9f4e5921877 100644
--- a/src/region-cache.c
+++ b/src/region-cache.c
@@ -1,6 +1,6 @@
/* Caching facts about regions of the buffer, for optimization.
-Copyright (C) 1985-1989, 1993, 1995, 2001-2011
+Copyright (C) 1985-1989, 1993, 1995, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/region-cache.h b/src/region-cache.h
index 6758f8bcd08..7aebdbec262 100644
--- a/src/region-cache.h
+++ b/src/region-cache.h
@@ -1,6 +1,6 @@
/* Header file: Caching facts about regions of the buffer, for optimization.
-Copyright (C) 1985-1986, 1993, 1995, 2001-2011
+Copyright (C) 1985-1986, 1993, 1995, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index b44bd0308a3..37b041396f9 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -1,5 +1,5 @@
/*
-Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h
index 0cca005b423..c2dbdb9a109 100644
--- a/src/s/bsd-common.h
+++ b/src/s/bsd-common.h
@@ -1,6 +1,6 @@
/* Definitions file for GNU Emacs running on bsd 4.3
-Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/cygwin.h b/src/s/cygwin.h
index 8f5a0ab1fc7..9a371829eaa 100644
--- a/src/s/cygwin.h
+++ b/src/s/cygwin.h
@@ -1,6 +1,6 @@
/* System description header file for Cygwin.
-Copyright (C) 1985-1986, 1992, 1999, 2002-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1992, 1999, 2002-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/darwin.h b/src/s/darwin.h
index dd0d0c34021..9ac9e91fd9d 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -1,6 +1,6 @@
/* System description header file for Darwin (Mac OS X).
-Copyright (C) 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/freebsd.h b/src/s/freebsd.h
index 24b34e02f69..c74605fe366 100644
--- a/src/s/freebsd.h
+++ b/src/s/freebsd.h
@@ -1,6 +1,6 @@
/* System description header for FreeBSD systems.
-Copyright (C) 1994-2011 Free Software Foundation, Inc.
+Copyright (C) 1994-2012 Free Software Foundation, Inc.
Author: Shawn M. Carey
(according to authors.el)
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 3d78bf695bc..b54bd985e6b 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -1,6 +1,6 @@
/* This file is the configuration file for Linux-based GNU systems
-Copyright (C) 1985-1986, 1992, 1994, 1996, 1999, 2001-2011
+Copyright (C) 1985-1986, 1992, 1994, 1996, 1999, 2001-2012
Free Software Foundation, Inc.
This file was put together by Michael K. Johnson and Rik Faith.
@@ -155,7 +155,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
extern void *__libc_ia64_register_backing_store_base; \
__builtin_ia64_flushrs (); \
mark_memory (__libc_ia64_register_backing_store_base, \
- __builtin_ia64_bsp (), 0); \
+ __builtin_ia64_bsp ()); \
} while (0)
#endif
#endif
diff --git a/src/s/gnu.h b/src/s/gnu.h
index b40f7b0a95b..be831a833a5 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -1,6 +1,6 @@
/* Definitions file for GNU Emacs running on the GNU Hurd.
-Copyright (C) 1994-1996, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1994-1996, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h
index be457498add..becb5d3464e 100644
--- a/src/s/hpux10-20.h
+++ b/src/s/hpux10-20.h
@@ -1,6 +1,6 @@
/* System description file for hpux version 10.20.
-Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h
index 26eb7dcde77..32374498fe7 100644
--- a/src/s/irix6-5.h
+++ b/src/s/irix6-5.h
@@ -1,6 +1,6 @@
/* Definitions file for GNU Emacs running on Silicon Graphics Irix system 6.5.
-Copyright (C) 1999-2011 Free Software Foundation, Inc.
+Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index cc19765aba6..d533ae34ac3 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -1,6 +1,6 @@
/* System description file for Windows NT.
-Copyright (C) 1993-1995, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1993-1995, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/msdos.h b/src/s/msdos.h
index 9ee13d12867..cde24147c57 100644
--- a/src/s/msdos.h
+++ b/src/s/msdos.h
@@ -1,6 +1,6 @@
/* System description file for MS-DOS
-Copyright (C) 1993, 1996-1997, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1993, 1996-1997, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/netbsd.h b/src/s/netbsd.h
index 52cda717a2d..f25023fb615 100644
--- a/src/s/netbsd.h
+++ b/src/s/netbsd.h
@@ -1,6 +1,6 @@
/* s/ file for netbsd system.
-Copyright (C) 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h
index 3d9bd6ddafc..a9fefcb1992 100644
--- a/src/s/sol2-6.h
+++ b/src/s/sol2-6.h
@@ -1,6 +1,6 @@
/* Definitions file for GNU Emacs running on Solaris 2.6.
-Copyright (C) 1999-2011 Free Software Foundation, Inc.
+Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/template.h b/src/s/template.h
index 4e0400e99e3..527694bd4bb 100644
--- a/src/s/template.h
+++ b/src/s/template.h
@@ -2,7 +2,7 @@
This file describes the parameters that system description files
should define or not.
-Copyright (C) 1985-1986, 1992, 1999, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1992, 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/unixware.h b/src/s/unixware.h
index 8fe28625dd4..22c396a060e 100644
--- a/src/s/unixware.h
+++ b/src/s/unixware.h
@@ -1,6 +1,6 @@
/* s/ file for Unixware.
-Copyright (C) 1999-2011 Free Software Foundation, Inc.
+Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h
index e6d992d8f9c..fabdd66f3bb 100644
--- a/src/s/usg5-4-common.h
+++ b/src/s/usg5-4-common.h
@@ -1,6 +1,6 @@
/* Definitions file for GNU Emacs running on AT&T's System V Release 4
-Copyright (C) 1987, 1990, 1999-2011 Free Software Foundation, Inc.
+Copyright (C) 1987, 1990, 1999-2012 Free Software Foundation, Inc.
Written by James Van Artsdalen of Dell Computer Corp. james@bigtex.cactus.org.
Subsequently improved for Dell 2.2 by Eric S. Raymond <esr@snark.thyrsus.com>.
diff --git a/src/scroll.c b/src/scroll.c
index 4e0801f092f..abc5c17400a 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -1,6 +1,6 @@
/* Calculate what line insertion or deletion to do, and do it
-Copyright (C) 1985-1986, 1990, 1993-1994, 2001-2011
+Copyright (C) 1985-1986, 1990, 1993-1994, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/search.c b/src/search.c
index 160d08e3c8c..0d451bd11c3 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1,5 +1,5 @@
/* String search routines for GNU Emacs.
- Copyright (C) 1985-1987, 1993-1994, 1997-1999, 2001-2011
+ Copyright (C) 1985-1987, 1993-1994, 1997-1999, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -725,8 +725,8 @@ scan_buffer (register int target, ptrdiff_t start, ptrdiff_t end,
the region from start to cursor is free of them. */
if (target == '\n' && newline_cache)
know_region_cache (current_buffer, newline_cache,
- start_byte + scan_start - base,
- start_byte + cursor - base);
+ BYTE_TO_CHAR (start_byte + scan_start - base),
+ BYTE_TO_CHAR (start_byte + cursor - base));
/* Did we find the target character? */
if (cursor < ceiling_addr)
@@ -791,8 +791,8 @@ scan_buffer (register int target, ptrdiff_t start, ptrdiff_t end,
the region from after the cursor to start is free of them. */
if (target == '\n' && newline_cache)
know_region_cache (current_buffer, newline_cache,
- start_byte + cursor - base,
- start_byte + scan_start - base);
+ BYTE_TO_CHAR (start_byte + cursor - base),
+ BYTE_TO_CHAR (start_byte + scan_start - base));
/* Did we find the target character? */
if (cursor >= ceiling_addr)
@@ -1303,7 +1303,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
checking if we can use boyer-moore search. If TRT is
non-nil, we can use boyer-moore search only if TRT can be
represented by the byte array of 256 elements. For that,
- all non-ASCII case-equivalents of all case-senstive
+ all non-ASCII case-equivalents of all case-sensitive
characters in STRING must belong to the same charset and
row. */
diff --git a/src/sheap.c b/src/sheap.c
index 31414fbe5c6..3ae14b5daec 100644
--- a/src/sheap.c
+++ b/src/sheap.c
@@ -1,7 +1,7 @@
/* simulate `sbrk' with an array in .bss, for `unexec' support for Cygwin;
complete rewrite of xemacs Cygwin `unexec' code
- Copyright (C) 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sound.c b/src/sound.c
index af9dc98c3d3..bd34628767b 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1,5 +1,5 @@
/* sound.c -- sound support.
- Copyright (C) 1998-1999, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/syntax.c b/src/syntax.c
index 7108016f99c..a802360582b 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1,5 +1,5 @@
/* GNU Emacs routines to deal with syntax tables; also word and list parsing.
- Copyright (C) 1985, 1987, 1993-1995, 1997-1999, 2001-2011
+ Copyright (C) 1985, 1987, 1993-1995, 1997-1999, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/syntax.h b/src/syntax.h
index 1ea37ac5d5f..3f5e6a63e25 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -1,6 +1,6 @@
/* Declarations having to do with GNU Emacs syntax tables.
-Copyright (C) 1985, 1993-1994, 1997-1998, 2001-2011
+Copyright (C) 1985, 1993-1994, 1997-1998, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sysdep.c b/src/sysdep.c
index bd8a1020441..426c6832347 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1,5 +1,5 @@
/* Interfaces to system-dependent kernel and library entries.
- Copyright (C) 1985-1988, 1993-1995, 1999-2011
+ Copyright (C) 1985-1988, 1993-1995, 1999-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sysselect.h b/src/sysselect.h
index 20eade8d07a..f9b9fc00b35 100644
--- a/src/sysselect.h
+++ b/src/sysselect.h
@@ -1,5 +1,5 @@
/* sysselect.h - System-dependent definitions for the select function.
- Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/syssignal.h b/src/syssignal.h
index 315400d8498..86135d71215 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -1,5 +1,5 @@
/* syssignal.h - System-dependent definitions for signals.
- Copyright (C) 1993, 1999, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/systime.h b/src/systime.h
index b90372dbe20..9e7a1173a20 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -1,5 +1,5 @@
/* systime.h - System-dependent definitions for time manipulations.
- Copyright (C) 1993-1994, 2002-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2002-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/systty.h b/src/systty.h
index 647cfa23cee..a258635ac09 100644
--- a/src/systty.h
+++ b/src/systty.h
@@ -1,5 +1,5 @@
/* systty.h - System-dependent definitions for terminals.
- Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/syswait.h b/src/syswait.h
index 44a824abadb..aea9ea6e588 100644
--- a/src/syswait.h
+++ b/src/syswait.h
@@ -1,5 +1,5 @@
/* Define wait system call interface for Emacs.
- Copyright (C) 1993-1995, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/term.c b/src/term.c
index 036f5797e48..09888bc6dda 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1,5 +1,5 @@
/* Terminal control module for terminals described by TERMCAP
- Copyright (C) 1985-1987, 1993-1995, 1998, 2000-2011
+ Copyright (C) 1985-1987, 1993-1995, 1998, 2000-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1809,7 +1809,7 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str)
glyphless_display_method in dispextern.h for the details.
FOR_NO_FONT is nonzero if and only if this is for a character that
- is not supproted by the coding system of the terminal. ACRONYM, if
+ is not supported by the coding system of the terminal. ACRONYM, if
non-nil, is an acronym string for the character.
The glyphs actually produced are of type CHAR_GLYPH. */
diff --git a/src/termchar.h b/src/termchar.h
index 5ca3cf305c1..d50ee805e03 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -1,5 +1,5 @@
/* Flags and parameters describing terminal's characteristics.
- Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/termhooks.h b/src/termhooks.h
index c8e3f4566cd..4cad4825cdd 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -1,6 +1,6 @@
/* Parameters and display hooks for terminal devices.
-Copyright (C) 1985-1986, 1993-1994, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1993-1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/terminal.c b/src/terminal.c
index 67577adf3b4..9579d1dbd66 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -1,5 +1,5 @@
/* Functions related to terminal devices.
- Copyright (C) 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/terminfo.c b/src/terminfo.c
index c0418984efa..dce7af77bcf 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -1,5 +1,5 @@
/* Interface from Emacs to terminfo.
- Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/termopts.h b/src/termopts.h
index 86b7cf782c4..7bf71aeefe7 100644
--- a/src/termopts.h
+++ b/src/termopts.h
@@ -1,5 +1,5 @@
/* Flags and parameters describing user options for handling the terminal.
- Copyright (C) 1985-1986, 1990, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 1990, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/textprop.c b/src/textprop.c
index 1a635444b00..f9339c66893 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1,5 +1,5 @@
/* Interface code for dealing with text properties.
- Copyright (C) 1993-1995, 1997, 1999-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1995, 1997, 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -2230,7 +2230,7 @@ This also inhibits the use of the `intangible' text property. */);
DEFVAR_LISP ("text-property-default-nonsticky",
Vtext_property_default_nonsticky,
- doc: /* Alist of properties vs the corresponding non-stickinesses.
+ doc: /* Alist of properties vs the corresponding non-stickiness.
Each element has the form (PROPERTY . NONSTICKINESS).
If a character in a buffer has PROPERTY, new text inserted adjacent to
diff --git a/src/tparam.h b/src/tparam.h
index dc4cdfaa28c..e845f3e8202 100644
--- a/src/tparam.h
+++ b/src/tparam.h
@@ -1,6 +1,6 @@
/* Interface definitions for termcap entries.
-Copyright (C) 2011 Free Software Foundation, Inc.
+Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/undo.c b/src/undo.c
index 7e999fe5120..929955ffcf5 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1,5 +1,5 @@
/* undo handling for GNU Emacs.
- Copyright (C) 1990, 1993-1994, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1993-1994, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/unexaix.c b/src/unexaix.c
index 22120b0ea03..1bf65b68518 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -1,5 +1,5 @@
/* Dump an executable image.
- Copyright (C) 1985-1988, 1999, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1985-1988, 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/unexcoff.c b/src/unexcoff.c
index ef86a400239..5b269737839 100644
--- a/src/unexcoff.c
+++ b/src/unexcoff.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1985-1988, 1992-1994, 2001-2011 Free Software Foundation, Inc.
+/* Copyright (C) 1985-1988, 1992-1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/unexcw.c b/src/unexcw.c
index 62df82ec3bc..eae534cf4dd 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -1,7 +1,7 @@
/* unexec() support for Cygwin;
complete rewrite of xemacs Cygwin unexec() code
- Copyright (C) 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/unexelf.c b/src/unexelf.c
index 1715c3670ca..ac9c9e75764 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1985-1988, 1990, 1992, 1999-2011
+/* Copyright (C) 1985-1988, 1990, 1992, 1999-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index a4c2f241c9f..2e77d3e17bc 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -1,5 +1,5 @@
/* Dump Emacs in Mach-O format for use on Mac OS X.
- Copyright (C) 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/unexw32.c b/src/unexw32.c
index e5440c2f500..52b2ec4bf2b 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -1,5 +1,5 @@
/* unexec for GNU Emacs on Windows NT.
- Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/vm-limit.c b/src/vm-limit.c
index fc847a295dd..94725044048 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -1,5 +1,5 @@
/* Functions for memory limit warnings.
- Copyright (C) 1990, 1992, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1992, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w16select.c b/src/w16select.c
index cae7a6f82dd..185bf252895 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -1,6 +1,6 @@
/* 16-bit Windows Selection processing for emacs on MS-Windows
-Copyright (C) 1996-1997, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1996-1997, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -114,7 +114,7 @@ identify_winoldap_version (void)
return regs.x.ax;
}
-/* Open the clipboard, return non-zero if successfull. */
+/* Open the clipboard, return non-zero if successful. */
unsigned
open_clipboard (void)
{
@@ -137,7 +137,7 @@ open_clipboard (void)
return regs.x.ax;
}
-/* Empty clipboard, return non-zero if successfull. */
+/* Empty clipboard, return non-zero if successful. */
unsigned
empty_clipboard (void)
{
@@ -207,7 +207,7 @@ free_xfer_buf (void)
}
}
-/* Copy data into the clipboard, return zero if successfull. */
+/* Copy data into the clipboard, return zero if successful. */
unsigned
set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
{
@@ -405,7 +405,7 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
return (unsigned) (dp - (unsigned char *)Data - 1);
}
-/* Close clipboard, return non-zero if successfull. */
+/* Close clipboard, return non-zero if successful. */
unsigned
close_clipboard (void)
{
@@ -730,4 +730,3 @@ After the communication, this variable is set to nil. */);
}
#endif /* MSDOS */
-
diff --git a/src/w32.c b/src/w32.c
index b26327462d8..f610a36ecf4 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1,5 +1,5 @@
/* Utility and Unix shadow routines for GNU Emacs on the Microsoft W32 API.
- Copyright (C) 1994-1995, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1994-1995, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -2894,6 +2894,8 @@ sys_rename (const char * oldname, const char * newname)
{
BOOL result;
char temp[MAX_PATH];
+ int newname_dev;
+ int oldname_dev;
/* MoveFile on Windows 95 doesn't correctly change the short file name
alias in a number of circumstances (it is not easy to predict when
@@ -2910,6 +2912,9 @@ sys_rename (const char * oldname, const char * newname)
strcpy (temp, map_w32_filename (oldname, NULL));
+ /* volume_info is set indirectly by map_w32_filename. */
+ oldname_dev = volume_info.serialnum;
+
if (os_subtype == OS_WIN95)
{
char * o;
@@ -2953,13 +2958,38 @@ sys_rename (const char * oldname, const char * newname)
all the permutations of shared or subst'd drives, etc.) */
newname = map_w32_filename (newname, NULL);
+
+ /* volume_info is set indirectly by map_w32_filename. */
+ newname_dev = volume_info.serialnum;
+
result = rename (temp, newname);
- if (result < 0
- && errno == EEXIST
- && _chmod (newname, 0666) == 0
- && _unlink (newname) == 0)
- result = rename (temp, newname);
+ if (result < 0)
+ {
+
+ if (errno == EACCES
+ && newname_dev != oldname_dev)
+ {
+ /* The implementation of `rename' on Windows does not return
+ errno = EXDEV when you are moving a directory to a
+ different storage device (ex. logical disk). It returns
+ EACCES instead. So here we handle such situations and
+ return EXDEV. */
+ DWORD attributes;
+
+ if ((attributes = GetFileAttributes (temp)) != -1
+ && attributes & FILE_ATTRIBUTE_DIRECTORY)
+ errno = EXDEV;
+ }
+ else if (errno == EEXIST)
+ {
+ if (_chmod (newname, 0666) != 0)
+ return result;
+ if (_unlink (newname) != 0)
+ return result;
+ result = rename (temp, newname);
+ }
+ }
return result;
}
diff --git a/src/w32.h b/src/w32.h
index a3ca1130ce6..2866cb2f34a 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -2,7 +2,7 @@
#define EMACS_W32_H
/* Support routines for the NT version of Emacs.
- Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32console.c b/src/w32console.c
index 30c71f1c276..e8b0f621b4f 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -1,5 +1,5 @@
/* Terminal hooks for GNU Emacs on the Microsoft W32 API.
- Copyright (C) 1992, 1999, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32fns.c b/src/w32fns.c
index 20284108185..d7a6eefab67 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1,6 +1,6 @@
/* Graphical user interface functions for the Microsoft W32 API.
-Copyright (C) 1989, 1992-2011 Free Software Foundation, Inc.
+Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32font.c b/src/w32font.c
index 5cc37c0e74f..dab9f4c61b4 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1,5 +1,5 @@
/* Font backend for the Microsoft W32 API.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -786,7 +786,7 @@ w32font_free_outline (struct font *font, void *outline);
Optional.
Get coordinates of the INDEXth anchor point of the glyph whose
code is CODE. Store the coordinates in *X and *Y. Return 0 if
- the operations was successfull. Otherwise return -1.
+ the operations was successful. Otherwise return -1.
static int
w32font_anchor_point (struct font *font, unsigned code,
int index, int *x, int *y);
diff --git a/src/w32font.h b/src/w32font.h
index f77866b869f..40edafa146d 100644
--- a/src/w32font.h
+++ b/src/w32font.h
@@ -1,5 +1,5 @@
/* Shared GDI and Uniscribe Font backend declarations for the W32 API.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32gui.h b/src/w32gui.h
index 2ba9cb53e22..1e800e3cf3a 100644
--- a/src/w32gui.h
+++ b/src/w32gui.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication on the Microsoft W32 API.
- Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32heap.c b/src/w32heap.c
index 477c11a5160..35ac4cbf31f 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -1,5 +1,5 @@
/* Heap management routines for GNU Emacs on the Microsoft W32 API.
- Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32heap.h b/src/w32heap.h
index e75bfcf36ec..b2d51655098 100644
--- a/src/w32heap.h
+++ b/src/w32heap.h
@@ -1,5 +1,5 @@
/* Heap management routines (including unexec) for GNU Emacs on Windows NT.
- Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32inevt.c b/src/w32inevt.c
index fddde61663f..e7a8bf629d6 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -1,5 +1,5 @@
/* Input event support for Emacs on the Microsoft W32 API.
- Copyright (C) 1992-1993, 1995, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1992-1993, 1995, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32inevt.h b/src/w32inevt.h
index 9ca52508151..d228637abfb 100644
--- a/src/w32inevt.h
+++ b/src/w32inevt.h
@@ -1,5 +1,5 @@
/* Input routines for GNU Emacs on the Microsoft W32 API.
- Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32menu.c b/src/w32menu.c
index 369b75877e8..4b3aa4f8047 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -1,5 +1,5 @@
/* Menu support for GNU Emacs on the Microsoft W32 API.
- Copyright (C) 1986, 1988, 1993-1994, 1996, 1998-1999, 2001-2011
+ Copyright (C) 1986, 1988, 1993-1994, 1996, 1998-1999, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32proc.c b/src/w32proc.c
index 254a32503c4..f7982f36913 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1,5 +1,5 @@
/* Process support for GNU Emacs on the Microsoft W32 API.
- Copyright (C) 1992, 1995, 1999-2011 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1995, 1999-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32reg.c b/src/w32reg.c
index 18374431062..ec251cfd837 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -1,5 +1,5 @@
/* Emulate the X Resource Manager through the registry.
- Copyright (C) 1990, 1993-1994, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1993-1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32select.c b/src/w32select.c
index 392cb07a96d..c60376b3a91 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -1,6 +1,6 @@
/* Selection processing for Emacs on the Microsoft W32 API.
-Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1993-1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32term.c b/src/w32term.c
index 6df218326d1..f764ad9d218 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1,6 +1,6 @@
/* Implementation of GUI terminal on the Microsoft W32 API.
-Copyright (C) 1989, 1993-2011 Free Software Foundation, Inc.
+Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -3286,7 +3286,7 @@ w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window,
***********************************************************************/
/* Handle mouse button event on the tool-bar of frame F, at
- frame-relative coordinates X/Y. EVENT_TYPE is either ButtionPress
+ frame-relative coordinates X/Y. EVENT_TYPE is either ButtonPress
or ButtonRelease. */
static void
@@ -3388,7 +3388,7 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar,
if (whole)
{
/* Position scroll bar at rock bottom if the bottom of the
- buffer is visible. This avoids shinking the thumb away
+ buffer is visible. This avoids shrinking the thumb away
to nothing if it is held at the bottom of the buffer. */
if (position + portion >= whole && !draggingp)
{
@@ -3556,7 +3556,7 @@ x_scroll_bar_remove (struct scroll_bar *bar)
/* Destroy the window. */
my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar));
- /* Disassociate this scroll bar from its window. */
+ /* Dissociate this scroll bar from its window. */
XWINDOW (bar->window)->vertical_scroll_bar = Qnil;
UNBLOCK_INPUT;
diff --git a/src/w32term.h b/src/w32term.h
index f587ee11af9..4528bbd5c0a 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication on the Microsoft W32 API.
- Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index 63da3b9e962..5e5c8e88b2b 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -1,5 +1,5 @@
/* Font backend for the Microsoft W32 Uniscribe API.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32xfns.c b/src/w32xfns.c
index fc2d5904d67..0b0fc26fb6a 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -1,5 +1,5 @@
/* Functions taken directly from X sources for use with the Microsoft W32 API.
- Copyright (C) 1989, 1992-1995, 1999, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1992-1995, 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/widget.c b/src/widget.c
index 96bfd4787e9..0cb1013b971 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -1,5 +1,5 @@
/* The emacs frame widget.
- Copyright (C) 1992-1993, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1992-1993, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/widget.h b/src/widget.h
index 11041d54ad0..03838a01415 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -1,5 +1,5 @@
/* The emacs frame widget public header file.
- Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/widgetprv.h b/src/widgetprv.h
index 997a70e026c..00e3eeb1ee1 100644
--- a/src/widgetprv.h
+++ b/src/widgetprv.h
@@ -1,5 +1,5 @@
/* The emacs frame widget private header file.
- Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/window.c b/src/window.c
index 8337ede50d1..27e4914ad1a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1,6 +1,6 @@
/* Window creation, deletion and examination for GNU Emacs.
Does not include redisplay.
- Copyright (C) 1985-1987, 1993-1998, 2000-2011
+ Copyright (C) 1985-1987, 1993-1998, 2000-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/window.h b/src/window.h
index b4e268b1a34..ea127ca95a8 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1,5 +1,5 @@
/* Window definitions for GNU Emacs.
- Copyright (C) 1985-1986, 1993, 1995, 1997-2011
+ Copyright (C) 1985-1986, 1993, 1995, 1997-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xdisp.c b/src/xdisp.c
index 4eef9e05231..d3a1dfc4b20 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1,6 +1,6 @@
/* Display generation from window structure and buffer text.
-Copyright (C) 1985-1988, 1993-1995, 1997-2011 Free Software Foundation, Inc.
+Copyright (C) 1985-1988, 1993-1995, 1997-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -4093,10 +4093,11 @@ handle_invisible_prop (struct it *it)
while (invis_p);
/* The position newpos is now either ZV or on visible text. */
- if (it->bidi_p && newpos < ZV)
+ if (it->bidi_p)
{
ptrdiff_t bpos = CHAR_TO_BYTE (newpos);
- int on_newline = FETCH_BYTE (bpos) == '\n';
+ int on_newline =
+ bpos == ZV_BYTE || FETCH_BYTE (bpos) == '\n';
int after_newline =
newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n';
@@ -4114,16 +4115,16 @@ handle_invisible_prop (struct it *it)
SET_TEXT_POS (tpos, newpos, bpos);
reseat_1 (it, tpos, 0);
- /* If we reseat on a newline, we need to prep the
+ /* If we reseat on a newline/ZV, we need to prep the
bidi iterator for advancing to the next character
- after the newline, keeping the current paragraph
+ after the newline/EOB, keeping the current paragraph
direction (so that PRODUCE_GLYPHS does TRT wrt
prepending/appending glyphs to a glyph row). */
if (on_newline)
{
it->bidi_it.first_elt = 0;
it->bidi_it.paragraph_dir = pdir;
- it->bidi_it.ch = '\n';
+ it->bidi_it.ch = (bpos == ZV_BYTE) ? -1 : '\n';
it->bidi_it.nchars = 1;
it->bidi_it.ch_len = 1;
}
@@ -4341,7 +4342,7 @@ handle_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
int rv;
if (CONSP (spec)
- /* Simple specerties. */
+ /* Simple specifications. */
&& !EQ (XCAR (spec), Qimage)
&& !EQ (XCAR (spec), Qspace)
&& !EQ (XCAR (spec), Qwhen)
@@ -13651,7 +13652,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
/* Non-zero means we've seen at least one glyph that came from a
display string. */
int string_seen = 0;
- /* Largest and smalles buffer positions seen so far during scan of
+ /* Largest and smallest buffer positions seen so far during scan of
glyph row. */
ptrdiff_t bpos_max = pos_before;
ptrdiff_t bpos_min = pos_after;
@@ -28331,7 +28332,11 @@ all the functions in the list are called, with the frame as argument. */);
Each function is called with two arguments, the window and its new
display-start position. Note that these functions are also called by
`set-window-buffer'. Also note that the value of `window-end' is not
-valid when these functions are called. */);
+valid when these functions are called.
+
+Warning: Do not use this feature to alter the way the window
+is scrolled. It is not designed for that, and such use probably won't
+work. */);
Vwindow_scroll_functions = Qnil;
DEFVAR_LISP ("window-text-change-functions",
diff --git a/src/xfaces.c b/src/xfaces.c
index 5a7b39fcca5..151da1e032b 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1,6 +1,6 @@
/* xfaces.c -- "Face" primitives.
-Copyright (C) 1993-1994, 1998-2011 Free Software Foundation, Inc.
+Copyright (C) 1993-1994, 1998-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xfns.c b/src/xfns.c
index 642b3602833..b0cef7221f8 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1,6 +1,6 @@
/* Functions for the X window system.
-Copyright (C) 1989, 1992-2011 Free Software Foundation, Inc.
+Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -3519,9 +3519,21 @@ FRAME nil means use the selected frame. */)
BLOCK_INPUT;
x_catch_errors (dpy);
- XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- RevertToParent, CurrentTime);
- x_ewmh_activate_frame (f);
+
+ if (FRAME_X_EMBEDDED_P (f))
+ {
+ /* For Xembedded frames, normally the embedder forwards key
+ events. See XEmbed Protocol Specification at
+ http://freedesktop.org/wiki/Specifications/xembed-spec */
+ xembed_request_focus (f);
+ }
+ else
+ {
+ XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ RevertToParent, CurrentTime);
+ x_ewmh_activate_frame (f);
+ }
+
x_uncatch_errors ();
UNBLOCK_INPUT;
diff --git a/src/xfont.c b/src/xfont.c
index 73f1e130be0..bde76c0ba3c 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -1,5 +1,5 @@
/* xfont.c -- X core font driver.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/src/xftfont.c b/src/xftfont.c
index c27a4fcf91a..bc0c56a0fe0 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -1,5 +1,5 @@
/* xftfont.c -- XFT font driver.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
@@ -654,7 +654,7 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
if (with_background)
XftDrawRect (xft_draw, &bg,
- x, y - face->font->ascent, s->width, face->font->height);
+ x, y - s->font->ascent, s->width, s->font->height);
code = alloca (sizeof (FT_UInt) * len);
for (i = 0; i < len; i++)
code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
diff --git a/src/xgselect.c b/src/xgselect.c
index 339ec475117..80dbfc32aee 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -1,6 +1,6 @@
/* Function for handling the GLib event loop.
-Copyright (C) 2009-2011 Free Software Foundation, Inc.
+Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xgselect.h b/src/xgselect.h
index 1d3a8508b9c..15d7cd5fdd3 100644
--- a/src/xgselect.h
+++ b/src/xgselect.h
@@ -1,6 +1,6 @@
/* Header for xg_select.
-Copyright (C) 2009-2011 Free Software Foundation, Inc.
+Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xmenu.c b/src/xmenu.c
index b766f142e2d..79ead5f598c 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1,6 +1,6 @@
/* X Communication module for terminals which understand the X protocol.
-Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2011
+Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -102,6 +102,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef USE_GTK
#include "gtkutil.h"
+#ifdef HAVE_GTK3
+#include "xgselect.h"
+#endif
#endif
#include "menu.h"
@@ -408,7 +411,15 @@ x_menu_wait_for_event (void *data)
else
ntp = &next_time;
+#ifdef HAVE_GTK3
+ /* Gtk3 have arrows on menus when they don't fit. When the pointer is
+ over an arrow, a timeout scrolls it a bit. Use xg_select so that
+ timeout gets triggered. */
+
+ xg_select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp);
+#else
select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp);
+#endif
}
}
#endif /* ! MSDOS */
@@ -1435,6 +1446,13 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
GtkMenuPositionFunc pos_func = 0; /* Pop up at pointer. */
struct next_popup_x_y popup_x_y;
ptrdiff_t specpdl_count = SPECPDL_INDEX ();
+ int use_pos_func = ! for_click;
+
+#ifdef HAVE_GTK3
+ /* Always use position function for Gtk3. Otherwise menus may become
+ too small to show anything. */
+ use_pos_func = 1;
+#endif
if (! FRAME_X_P (f))
abort ();
@@ -1446,7 +1464,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
G_CALLBACK (menu_highlight_callback));
xg_crazy_callback_abort = 0;
- if (! for_click)
+ if (use_pos_func)
{
/* Not invoked by a click. pop up at x/y. */
pos_func = menu_position_func;
@@ -1461,7 +1479,8 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
i = 0; /* gtk_menu_popup needs this to be 0 for a non-button popup. */
}
- else
+
+ if (for_click)
{
for (i = 0; i < 5; i++)
if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
diff --git a/src/xml.c b/src/xml.c
index 0b39f3e6031..8c88226b505 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -1,5 +1,5 @@
/* Interface to libxml2.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xrdb.c b/src/xrdb.c
index 0c916da9ff8..58ca682c757 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -1,5 +1,5 @@
/* Deal with the X Resource Manager.
- Copyright (C) 1990, 1993-1994, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1993-1994, 2000-2012 Free Software Foundation, Inc.
Author: Joseph Arceneaux
Created: 4/90
diff --git a/src/xselect.c b/src/xselect.c
index 099b1670e4d..f7b65809443 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1,5 +1,5 @@
/* X Selection processing for Emacs.
- Copyright (C) 1993-1997, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1993-1997, 2000-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -756,7 +756,7 @@ x_reply_selection_request (struct input_event *event,
/* The window we're communicating with may have been deleted
in the meantime (that's a real situation from a bug report).
In this case, there may be events in the event queue still
- refering to the deleted window, and we'll get a BadWindow error
+ referring to the deleted window, and we'll get a BadWindow error
in XTread_socket when processing the events. I don't have
an idea how to fix that. gerd, 2001-01-98. */
/* 2004-09-10: XSync and UNBLOCK so that possible protocol errors are
diff --git a/src/xsettings.c b/src/xsettings.c
index a8604ac5897..066c6e795e9 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -1,6 +1,6 @@
/* Functions for handling font and other changes dynamically.
-Copyright (C) 2009-2011 Free Software Foundation, Inc.
+Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xsettings.h b/src/xsettings.h
index 38448eb88f5..d6b0c0945df 100644
--- a/src/xsettings.h
+++ b/src/xsettings.h
@@ -1,6 +1,6 @@
/* Functions for handle font changes dynamically.
-Copyright (C) 2009-2011 Free Software Foundation, Inc.
+Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 7deac7b14e4..1f6eb84260e 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -1,7 +1,7 @@
/* Session management module for systems which understand the X Session
management protocol.
-Copyright (C) 2002-2011 Free Software Foundation, Inc.
+Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xterm.c b/src/xterm.c
index 4bc12c06b34..2a2ae105e2e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1,6 +1,6 @@
/* X Communication module for terminals which understand the X protocol.
-Copyright (C) 1989, 1993-2011 Free Software Foundation, Inc.
+Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -5150,7 +5150,7 @@ x_scroll_bar_remove (struct scroll_bar *bar)
XDestroyWindow (FRAME_X_DISPLAY (f), bar->x_window);
#endif
- /* Disassociate this scroll bar from its window. */
+ /* Dissociate this scroll bar from its window. */
XWINDOW (bar->window)->vertical_scroll_bar = Qnil;
UNBLOCK_INPUT;
@@ -8981,6 +8981,18 @@ x_lower_frame (struct frame *f)
}
}
+/* Request focus with XEmbed */
+
+void
+xembed_request_focus (FRAME_PTR f)
+{
+ /* See XEmbed Protocol Specification at
+ http://freedesktop.org/wiki/Specifications/xembed-spec */
+ if (f->async_visible)
+ xembed_send_message (f, CurrentTime,
+ XEMBED_REQUEST_FOCUS, 0, 0, 0);
+}
+
/* Activate frame with Extended Window Manager Hints */
void
diff --git a/src/xterm.h b/src/xterm.h
index 1242bf64d77..b498261a805 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication with X protocol.
- Copyright (C) 1989, 1993-1994, 1998-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1993-1994, 1998-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -960,6 +960,7 @@ extern void x_clear_errors (Display *);
extern void x_set_window_size (struct frame *, int, int, int);
extern void x_set_mouse_position (struct frame *, int, int);
extern void x_set_mouse_pixel_position (struct frame *, int, int);
+extern void xembed_request_focus (struct frame *);
extern void x_ewmh_activate_frame (struct frame *);
extern void x_make_frame_visible (struct frame *);
extern void x_make_frame_invisible (struct frame *);