]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from emacs-24; up to 117656
authorGlenn Morris <rgm@gnu.org>
Sat, 1 Nov 2014 18:05:30 +0000 (11:05 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 1 Nov 2014 18:05:30 +0000 (11:05 -0700)
15 files changed:
1  2 
admin/ChangeLog
admin/notes/repo
lisp/ChangeLog
lisp/Makefile.in
lisp/emulation/cua-base.el
lisp/progmodes/compile.el
lisp/progmodes/vhdl-mode.el
lisp/simple.el
src/ChangeLog
src/emacs.c
src/macfont.m
src/nsfns.m
src/nsterm.h
src/nsterm.m
src/xdisp.c

diff --cc admin/ChangeLog
index 6bd5ceaca553ddc90ff965cdebafe19ba8c04bab,4fb8d47579b43ff9aa282fbed6ff4b32eec46266..5dcdc563e566821d9a55070014fe9165c1b0a1f6
@@@ -1,7 -1,13 +1,13 @@@
 -2014-10-31  Eli Zaretskii  <eliz@gnu.org>
++2014-11-01  Eli Zaretskii  <eliz@gnu.org>
+       * notes/repo (Notes): Reword the stylistic guidance for commit log
+       messages so that they are in line with Emacs development practices
+       and style guidance.
 -2014-10-31  Eric S. Raymond  <esr@thyrsus.com>
 +2014-10-27  Eric S. Raymond  <esr@thyrsus.com>
  
-       * notes/bzr: Renamed to notes/repo, reorganixed to separate
 -      * notes/bzr: Renamed to notes/repo, reorganized to separate
--      VCS-dependent from VCS-independent stuff.  Added guidance about
++      * notes/bzr: Rename to notes/repo, reorganize to separate
++      VCS-dependent from VCS-independent stuff.  Add guidance about
        commit-comment format under DVCSes.
  
        * notes/BRANCH: Merged into notes/repo.
Simple merge
diff --cc lisp/ChangeLog
index ba63ff7772a5f764b2e813739d85cb4d601e062b,0c0f003204ca9bcab1ab8ccd208e4b532419b2db..fc7e7392551e384cd64136406fb028fa8044d15d
 -      (tramp-set-file-property): Check, that `tramp-cache-get-count-*'
+ 2014-11-01  Michael Albinus  <michael.albinus@gmx.de>
+       * net/tramp-cache.el (tramp-get-file-property)
 -2014-11-01  Michael Albinus  <michael.albinus@gmx.de>
++      (tramp-set-file-property): Check that `tramp-cache-get-count-*'
+       and `tramp-cache-set-count-*' are bound.  Otherwise, there might
+       be compiler warnings.
+       * net/tramp-sh.el (tramp-get-remote-uid, tramp-get-remote-gid):
+       Return -1 respective "UNKNOWN", if uid or gid cannot be determined.
+ 2014-11-01  Eli Zaretskii  <eliz@gnu.org>
+       * progmodes/compile.el (compilation-mode): Turn off deferred
+       fontifications locally.  (Bug#18856)
+ 2014-11-01  Wolfgang Jenkner  <wjenkner@inode.at>
+       * net/tramp-sh.el (tramp-send-command): Fix the case where the
+       remote-echo connection property is non-nil (bug#18858).
 -      Backport Tramp changes from trunk.
++2014-11-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 -      * net/tramp.el (tramp-methods): Tweak docstring.
 -      (tramp-file-name-handler): Apply `cons' where appropriate.
 -      (tramp-handle-file-accessible-directory-p): Check for
 -      `file-readable-p' instead of `file-executable-p'.
 -      (tramp-handle-shell-command): Use `display-buffer'.  (Bug#18326)
 -      (tramp-handle-unhandled-file-name-directory): Return "/".
 -      (tramp-check-cached-permissions):
 -      Use `tramp-compat-file-attributes'.
 -      (tramp-call-process): Add new argument VEC.  Adapt callees in all
 -      tramp*.el files.
++      * simple.el (newline): Add assertions to try and help catch bug#18913.
 -      * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'.
 -      (tramp-adb-handle-write-region): Improve messages.
 -      (tramp-adb-maybe-open-connection): Don't set
 -      `tramp-current-*' variables.
++      * emulation/cua-base.el (cua-delete-region): Use delete-active-region
++      (bug#18886).
++      (cua--last-deleted-region-pos, cua--last-deleted-region-text): Remove.
 -      * net/tramp-cache.el (tramp-flush-file-function): Simplify check.
 -      Suppress debug messages.
++2014-11-01  Kim F. Storm  <storm@cua.dk>
 -      * net/tramp-ftp.el (top): Remove special handling for URL syntax.
 -      (tramp-ftp-file-name-handler):
++      Restore cua-delete-copy-to-register-0 and M-v command (bug#18886).
++      * delsel.el (delete-selection-save-to-register)
++      (delsel--replace-text-or-position): New vars.
++      (delete-active-region): Use them.
++      (delete-selection-repeat-replace-region): New command, moved from
++      cua-base.el.
++      * emulation/cua-base.el (cua--repeat-replace-text): Remove var.
++      (cua-repeat-replace-region): Move command to delsel.el.
++      (cua--init-keymaps): Update binding accordingly.
++      (cua-mode): Set delete-selection-save-to-register.
 +2014-11-01  Alan Mackenzie  <acm@muc.de>
  
 -      * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add.
 -      (tramp-gvfs-methods-mounttracker)
 -      (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled'
 -      during initialization.  (Bug#18774)
 -      (tramp-gvfs-handle-delete-file): Flush file properties, not
 -      directory properties.
 -      (tramp-gvfs-handle-file-attributes): Use `string-to-number' when
 -      reading "unix::mode".
 -      (tramp-gvfs-handle-file-name-all-completions):
 -      Use "-h" option for "gvfs-ls".
 -      (tramp-gvfs-url-file-name): Apply `cons' where appropriate.
 -      `user' and `localname' could be nil.
 -      (tramp-gvfs-send-command): Simplify traces.
 +      Make blink-parens work with a closing template delimiter.
 +      * progmodes/cc-cmds.el (c-electric-lt-gt): Cause a redisplay
 +      before calling blink-paren-function, so as to apply syntax-table
 +      properties to the ">".
  
 -      * net/tramp-sh.el (vc-handled-backends, vc-bzr-program)
 -      (vc-git-program, vc-hg-program): Declare.
 -      (tramp-methods) <sftp>: Remove.  It has never worked satisfactorily.
 -      (tramp-methods) <nc>: Add new method.
 -      (tramp-methods) <telnet>: Redirect stderr to "/dev/null".
 -      (tramp-methods) <plink, plinkx, pscp, psftp>: Improve
 -      `tramp-login-args'.
 -      (tramp-default-user-alist): Add "nc".
 -      (top): Remove completion function for "sftp".  Add completion
 -      functions for "nc" and "psftp".
 -      (tramp-sh-handle-set-visited-file-modtime):
 -      (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'.
 -      (tramp-do-copy-or-rename-file-out-of-band):
 -      Use cached "remote-copy-args" value, if available.  (Bug#18199)
 -      Tweak docstring.  Implement support for "nc" method.
 -      (tramp-sh-handle-expand-file-name, tramp-local-coding-commands)
 -      (tramp-remote-coding-commands, tramp-call-local-coding-command):
 -      Tweak docstring.
 -      (tramp-sh-handle-start-file-process): Expand `default-directory'.
 -      (tramp-sh-handle-write-region): Tweak error message.
 -      (tramp-sh-handle-vc-registered): Remove backends when the remote
 -      binary does not exist.
 -      (tramp-open-connection-setup-interactive-shell):
 -      Prefer utf-8 coding.  (Bug#17859)
 -      (tramp-find-inline-encoding): Do not raise an error.
 -      (tramp-make-copy-program-file-name): Tweak docstring.  Handle also
 -      the "nc" case.  Quote result also locally.
 -      (tramp-get-remote-id): Check also for "gid".
 -      (tramp-get-remote-python):
 +2014-11-01  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * net/tramp-smb.el (tramp-smb-handle-copy-directory)
 -      (tramp-smb-handle-set-file-acl): Use `start-process'.
 -      (tramp-smb-handle-insert-directory): Use progress reporter.
 -      (tramp-smb-handle-rename-file): Flush also file properties of
 -      FILENAME.
 +      * select.el (gui-get-selection): Comment: data-type ignored on NS.
  
 -      * net/trampver.el: Update release number.
 +2014-10-31  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2014-11-01  Reuben Thomas  <rrt@sc3d.org>
 +      * emacs-lisp/macroexp.el (macroexpand-1): New function (bug#18821).
 +      (macroexp--expand-all): Unrelated tweaks.
  
 -      * net/tramp.el (tramp-handle-file-symlink-p):
 -      * net/tramp-ftp.el (tramp-ftp-file-name-handler): Remove a comment
 -      about VMS, which we no longer support.
 +      * emacs-lisp/gv.el (gv-get): Use macroexpand-1.
  
 -2014-11-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2014-10-30  Glenn Morris  <rgm@gnu.org>
  
 -      * net/tramp-sh.el (tramp-sh-handle-vc-registered): Don't modify
 -      the global vc-handled-backends (bug#18535).
 +      * startup.el (command-line): Remove pointless attempt to avoid
 +      statting the file-system (which expand-file-name doesn't do).
  
 -2014-11-01  Jérémy Compostella  <jeremy.compostella@intel.com>
 -          Michael Albinus  <michael.albinus@gmx.de>
 +2014-10-30  Daniel Colascione  <dancol@dancol.org>
  
 -      * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
 -      Reduce the amount of set environment variable commands.
 +      Add "enum class" support to C++ mode.
 +      * progmodes/cc-langs.el (c-after-brace-list-decl-kwds)
 +      (c-after-brace-list-key): New language consts/variables.
 +      * progmodes/cc-engine.el (c-looking-at-decl-block):
 +      Exclude spurious match of "enum struct" from decl-block recognition.
 +      (c-backward-colon-prefixed-type): New function.
 +      (c-backward-over-enum-header): Call above function to extend
 +      recognition of enum structure.
  
 -2014-11-01  Paul Eggert  <eggert@cs.ucla.edu>
 -
 -      * net/tramp-sh.el (tramp-get-remote-touch): Omit unnecessary call to
 -      current-time.
 +2014-10-30  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2014-11-01  Emilio C. Lopes  <eclig@gmx.net>
 +      * progmodes/cc-defs.el (c--macroexpand-all): New function (bug#18845).
 +      (c-lang-defconst):
 +      * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Use it.
  
 -      * net/tramp-sh.el (tramp-get-remote-python): Also search for
 -      executables named "python2" or "python3".
 -      (tramp-get-remote-uid-with-python): Use parentheses around
 -      arguments to `print' to make it compatible with Python 3.
 -      (tramp-get-remote-gid-with-python): Ditto.  (Bug#18118)
 +2014-10-30  Eli Zaretskii  <eliz@gnu.org>
  
 -2014-10-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * progmodes/compile.el (compilation-start):
 +      If compilation-scroll-output is non-nil, don't force window-start of
 +      the compilation buffer to be at beginning of buffer.  (Bug#18874)
  
 -      * simple.el (newline): Add assertions to try and help catch bug#18913.
 +      * startup.el (fancy-about-text): Read the entire tutorial, not
 +      just its first 256 bytes.  (Bug#18760)
  
 -      * emulation/cua-base.el (cua-delete-region): Use delete-active-region
 -      (bug#18886).
 -      (cua--last-deleted-region-pos, cua--last-deleted-region-text): Remove.
 +2014-10-30  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2014-10-31  Eli Zaretskii  <eliz@gnu.org>
 +      * emacs-lisp/bytecomp.el: Require cl-extra (bug#18804).
 +      * emacs-lisp/cl-extra.el: Add missing provide.
  
 -      * Makefile.in (repo-update): Fix a typo and slightly reword
 -      commentary.
 +      * emacs-lisp/bytecomp.el (byte-compile-and-folded): Optimize case where
 +      all args are copyable (bug#18767).
 +      (=, <, >, <=, >=): Re-enable the optimization.
  
 -2014-10-31  Eric S. Raymond  <esr@thyrsus.com>
 +2014-10-29  Glenn Morris  <rgm@gnu.org>
 +
 +      * net/rcirc.el (rcirc-fill-column): Unbump :version.  Mark :risky.
 +
 +      * version.el (emacs-bzr-version, emacs-bzr-get-version):
 +      Revert 2014-10-26 change.
 +
 +2014-10-29  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Simplify use of current-time and friends.
 +      * allout-widgets.el (allout-widgets-hook-error-handler):
 +      * calendar/appt.el (appt-display-message):
 +      * calendar/icalendar.el (icalendar--convert-float-to-ical):
 +      * calendar/timeclock.el (timeclock-in, timeclock-when-to-leave)
 +      (timeclock-last-period, timeclock-day-base):
 +      * eshell/em-ls.el (eshell-ls-file):
 +      * eshell/esh-util.el (eshell-parse-ange-ls):
 +      * generic-x.el (named-database-print-serial):
 +      * net/newst-backend.el (newsticker--get-news-by-url-callback)
 +      (newsticker-get-news, newsticker--sentinel-work)
 +      (newsticker--image-get, newsticker--image-sentinel):
 +      * net/tramp-sh.el (tramp-get-remote-touch):
 +      * progmodes/opascal.el (opascal-debug-log):
 +      * textmodes/remember.el (remember-mail-date)
 +      (remember-store-in-files):
 +      * vc/vc-annotate.el (vc-annotate-display-autoscale)
 +      (vc-default-annotate-current-time):
 +      * vc/vc-bzr.el (vc-bzr-shelve-snapshot):
 +      * vc/vc-cvs.el (vc-cvs-annotate-current-time):
 +      * vc/vc-rcs.el (vc-rcs-annotate-current-time):
 +      Omit unnecessary call to current-time.
 +      * calendar/time-date.el (time-to-seconds) [!float-time]:
 +      * vc/vc-annotate.el (vc-annotate-convert-time):
 +      Use current time if arg is nil, to be compatible with float-time.
 +      (time-date--day-in-year): New function, with most of the guts of
 +      the old time-to-day-in-year.
 +      (time-to-day-in-year): Use it.
 +      (time-to-days): Use it, to avoid decoding the same time stamp twice.
 +      * calendar/timeclock.el (timeclock-time-to-date):
 +      Arg is now optional, like current-time-string.
 +      (timeclock-update-mode-line):
 +      Don't call current-time twice to get the current time stamp,
 +      as this can lead to inconsistent results.
 +      * completion.el (cmpl-hours-since-origin):
 +      * ido.el (ido-time-stamp):
 +      * vc/vc-annotate.el (vc-annotate-convert-time):
 +      Simplify by using float-time.
 +      * completion.el (save-completions-to-file):
 +      Rename local var to avoid confusion.
 +      * net/rcirc.el (rcirc-float-time): Simplify to an alias because
 +      time-to-seconds now behaves like float-time with respect to nil arg.
 +      * subr.el (progress-reporter-do-update):
 +      Don't call float-time unless needed.
 +
 +2014-10-29  Leo Liu  <sdl.web@gmail.com>
 +
 +      * net/rcirc.el (rcirc-fill-column): Use function.
 +      (rcirc-markup-fill): Remove adjustment.
 +
 +2014-10-28  Christopher Schmidt  <ch@ristopher.com>
 +
 +      * calc/calc.el (quick-calc):
 +      * calc/calc-aent.el (calc-do-quick-calc): New argument INSERT.
 +
 +2014-10-28  Sam Steingold  <sds@gnu.org>
 +
 +      * net/rcirc.el (rcirc-fill-column): Allow any symbolic value for
 +      the sake of `window-body-width' (in addition to `frame-width').
 +
 +2014-10-26  Eric S. Raymond  <esr@thyrsus.com>
 +
 +      * version.el: Fix some fallback values to conform to the actual
 +      release number.
 +
 +2014-10-25  Eric S. Raymond  <esr@thyrsus.com>
  
        * Makefile.in: Change some production names so they're neutral
        about the repository type.
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc lisp/simple.el
Simple merge
diff --cc src/ChangeLog
index d2cfa0dbfc3aa3ba6cb13e170be7a5b224e22d51,91bd0e1137cd5cf2f4e1577066d274e62e341983..4fb50118444d564f61b593886493ec21d32aacfb
@@@ -1,42 -1,40 +1,72 @@@
 -2014-10-31  Jan Djärv  <jan.h.d@swipnet.se>
++2014-11-01  Jan Djärv  <jan.h.d@swipnet.se>
 -      * macfont.m (macfont_glyph_extents): Turn off syntetic bold
++      * macfont.m (macfont_glyph_extents): Turn off synthetic bold
+       if force_integral_p (i.e. no antialias).
 -      (macfont_draw): Check ns_antialias_text, also turn off syntetic
++      (macfont_draw): Check ns_antialias_text, also turn off synthetic
+       bold if no antialias (Bug#18876).
+       * emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
+       was given (Bug#18846).
 -2014-10-30  Jan Djärv  <jan.h.d@swipnet.se>
 -
+       * nsterm.h (ns_set_doc_edited): Declare taking no args.
+       * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here
+       instead of in xdisp.c, function now takes void. (Bug#18884).
+       * xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
+       (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
+       * nsterm.h (EmacsScroller): Replace Lisp_Object win with
+       struct window* (Bug#18889).
+       Remove getMouseMotionPart.
+       (ns_output): Make icon_top/left int.
+       * nsfns.m (x_icon): icon_top/left is int.
+       * nsterm.m (ns_mouse_position): Remove unused code.
+       (initFrame:window:, dealloc): Use window instead of win.
+       (getMouseMotionPart:window:x:y:): Remove, unused.
+       (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window.
 -2014-10-30  Samuel Bronson  <naesten@gmail.com>
 +2014-11-01  Eli Zaretskii  <eliz@gnu.org>
  
 -      * unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
 +      * keyboard.c (readable_events): When FLAGS include
 +      READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events.
 +      This avoids returning non-nil from input-pending-p when only such
 +      events are in the queue.  (Bug#18856)
 +
 +2014-11-01  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
 +      (NXPrimaryPboard, NXSecondaryPboard): Declare static.
 +      (Qforeign_selection): Remove.
 +      (ns_get_local_selection): Identation fix.
 +      (syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks
 +
 +      * nsselect.m (ns_get_local_selection): Remove calling of
 +      functions in Vselection_converter_alist (Bug#18911).
 +      (syms_of_nsselect): Remove Vselection_converter_alist.
 +
 +(2014-10-31  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * font.c (copy_font_spec): Redesign to avoid Fcopy_alist
 +      and unnecessary initialization.  Adjust comments.
 +
 +2014-10-30  Eli Zaretskii  <eliz@gnu.org>
  
 -2014-10-28  Eli Zaretskii  <eliz@gnu.org>
 +      * bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by
 +      setting it to -1.
 +      (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative
 +      index, not an absolute one, as that's what the function expects.
 +
 +2014-10-30  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize
 +      font on an initial frame when running as a daemon (Bug#18869).
 +
 +      * fontset.c (toplevel): Adjust comment to match 2014-06-19 change.
 +
 +2014-10-30  Eli Zaretskii  <eliz@gnu.org>
  
        * fileio.c (Fexpand_file_name): Use make_unibyte_string, not
        build_string, when importing a home directory.  (Bug#18873)
diff --cc src/emacs.c
Simple merge
diff --cc src/macfont.m
index 366d087f8c208f6f5bb3949918624973fa4a7f78,9e3c7e05f3fc020cf5ad51403478ab2a676e7877..c29ecc03f236977b76958bb511ecf27c193c3cb3
@@@ -1073,52 -1088,52 +1073,52 @@@ macfont_glyph_extents (struct font *fon
    if (metrics)
      {
        if (METRICS_STATUS (cache) == METRICS_WIDTH_VALID)
 -      {
 -        CGRect bounds = mac_font_get_bounding_rect_for_glyph (macfont, glyph);
 -
 -        if (macfont_info->synthetic_italic_p)
 -          {
 -            /* We assume the members a, b, c, and d in
 -               synthetic_italic_atfm are non-negative.  */
 -            bounds.origin =
 -              CGPointApplyAffineTransform (bounds.origin,
 -                                           synthetic_italic_atfm);
 -            bounds.size =
 -              CGSizeApplyAffineTransform (bounds.size, synthetic_italic_atfm);
 -          }
 -        if (macfont_info->synthetic_bold_p && ! force_integral_p)
 -          {
 -            CGFloat d =
 -              - synthetic_bold_factor * mac_font_get_size (macfont) / 2;
 -
 -            bounds = CGRectInset (bounds, d, d);
 -          }
 -        switch (macfont_info->spacing)
 -          {
 -          case MACFONT_SPACING_PROPORTIONAL:
 -            bounds.origin.x += - (cache->width_frac
 -                                  / (CGFloat) (WIDTH_FRAC_SCALE * 2));
 -            break;
 -          case MACFONT_SPACING_MONO:
 -            break;
 -          case MACFONT_SPACING_SYNTHETIC_MONO:
 -            bounds.origin.x += (cache->width_int
 -                                + (cache->width_frac
 -                                   / (CGFloat) WIDTH_FRAC_SCALE));
 -            break;
 -          }
 -        if (bounds.size.width > 0)
 -          {
 -            bounds.origin.x -= LCD_FONT_SMOOTHING_LEFT_MARGIN;
 -            bounds.size.width += (LCD_FONT_SMOOTHING_LEFT_MARGIN
 -                                  + LCD_FONT_SMOOTHING_RIGHT_MARGIN);
 -          }
 -        bounds = CGRectIntegral (bounds);
 -        METRICS_SET_VALUE (cache, lbearing, CGRectGetMinX (bounds));
 -        METRICS_SET_VALUE (cache, rbearing, CGRectGetMaxX (bounds));
 -        METRICS_SET_VALUE (cache, ascent, CGRectGetMaxY (bounds));
 -        METRICS_SET_VALUE (cache, descent, -CGRectGetMinY (bounds));
 -      }
 +        {
 +          CGRect bounds = mac_font_get_bounding_rect_for_glyph (macfont, glyph);
 +
 +          if (macfont_info->synthetic_italic_p)
 +            {
 +              /* We assume the members a, b, c, and d in
 +                 synthetic_italic_atfm are non-negative.  */
 +              bounds.origin =
 +                CGPointApplyAffineTransform (bounds.origin,
 +                                             synthetic_italic_atfm);
 +              bounds.size =
 +                CGSizeApplyAffineTransform (bounds.size, synthetic_italic_atfm);
 +            }
-           if (macfont_info->synthetic_bold_p)
++          if (macfont_info->synthetic_bold_p && ! force_integral_p)
 +            {
 +              CGFloat d =
 +                - synthetic_bold_factor * mac_font_get_size (macfont) / 2;
 +
 +                bounds = CGRectInset (bounds, d, d);
 +            }
 +          switch (macfont_info->spacing)
 +            {
 +            case MACFONT_SPACING_PROPORTIONAL:
 +              bounds.origin.x += - (cache->width_frac
 +                                    / (CGFloat) (WIDTH_FRAC_SCALE * 2));
 +              break;
 +            case MACFONT_SPACING_MONO:
 +              break;
 +            case MACFONT_SPACING_SYNTHETIC_MONO:
 +              bounds.origin.x += (cache->width_int
 +                                  + (cache->width_frac
 +                                     / (CGFloat) WIDTH_FRAC_SCALE));
 +              break;
 +            }
 +          if (bounds.size.width > 0)
 +            {
 +              bounds.origin.x -= LCD_FONT_SMOOTHING_LEFT_MARGIN;
 +              bounds.size.width += (LCD_FONT_SMOOTHING_LEFT_MARGIN
 +                                    + LCD_FONT_SMOOTHING_RIGHT_MARGIN);
 +            }
 +          bounds = CGRectIntegral (bounds);
 +          METRICS_SET_VALUE (cache, lbearing, CGRectGetMinX (bounds));
 +          METRICS_SET_VALUE (cache, rbearing, CGRectGetMaxX (bounds));
 +          METRICS_SET_VALUE (cache, ascent, CGRectGetMaxY (bounds));
 +          METRICS_SET_VALUE (cache, descent, -CGRectGetMinY (bounds));
 +        }
        metrics->lbearing = METRICS_VALUE (cache, lbearing);
        metrics->rbearing = METRICS_VALUE (cache, rbearing);
        metrics->width = width;
@@@ -2686,18 -2717,13 +2686,19 @@@ macfont_draw (struct glyph_string *s, i
  {
    struct frame * f = s->f;
    struct macfont_info *macfont_info = (struct macfont_info *) s->font;
 -  FontRef macfont = macfont_info->macfont;
 -  CGContextRef context;
 -  BOOL isComposite = s->first_glyph->type == COMPOSITE_GLYPH;
 -  int end = isComposite ? s->cmp_to : s->nchars;
 -  int len = end - s->cmp_from;
 +  CGRect background_rect;
 +  CGPoint text_position;
 +  CGGlyph *glyphs;
 +  CGPoint *positions;
 +  CGFloat font_size = mac_font_get_size (macfont_info->macfont);
 +  bool no_antialias_p =
-     (macfont_info->antialias == MACFONT_ANTIALIAS_OFF
++    (NILP (ns_antialias_text)
++     || macfont_info->antialias == MACFONT_ANTIALIAS_OFF
 +     || (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT
 +         && font_size <= macfont_antialias_threshold));
 +  int len = to - from;
    struct face *face = s->face;
 -  int i;
 +  CGContextRef context;
  
    block_input ();
  
        CGContextScaleCTM (context, 1, -1);
        CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND (context, face, s->f);
        if (macfont_info->synthetic_italic_p)
 -      atfm = synthetic_italic_atfm;
 +        atfm = synthetic_italic_atfm;
        else
 -      atfm = CGAffineTransformIdentity;
 -      if (macfont_info->synthetic_bold_p && ! no_antialias_p)
 -      {
 -        CGContextSetTextDrawingMode (context, kCGTextFillStroke);
 -        CGContextSetLineWidth (context, synthetic_bold_factor * font_size);
 -        CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND (context, face, f);
 -      }
 +        atfm = CGAffineTransformIdentity;
-       if (macfont_info->synthetic_bold_p)
++      if (macfont_info->synthetic_bold_p && ! no_antialias_p))
 +        {
 +          CGContextSetTextDrawingMode (context, kCGTextFillStroke);
 +          CGContextSetLineWidth (context, synthetic_bold_factor * font_size);
 +          CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND (context, face, f);
 +        }
        if (no_antialias_p)
 -      CGContextSetShouldAntialias (context, false);
 +        CGContextSetShouldAntialias (context, false);
  
        CGContextSetTextMatrix (context, atfm);
 -      CGContextSetTextPosition (context, x, y_draw);
 +      CGContextSetTextPosition (context, text_position.x, text_position.y);
  
  #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
        if (macfont_info->color_bitmap_p
diff --cc src/nsfns.m
Simple merge
diff --cc src/nsterm.h
Simple merge
diff --cc src/nsterm.m
index 3ae4146dc207a8283fac645b2c6be9e2a21aa19f,45c6214f0d09db78ea99408ee3f796afdcc9553c..c814e63f12ed2e90eaa3e73715d91cad196a0a3c
@@@ -1892,50 -1902,37 +1892,72 @@@ ns_mouse_position (struct frame **fp, i
  
    block_input ();
  
-   if (dpyinfo->last_mouse_scroll_bar != nil && insist == 0)
+   /* Clear the mouse-moved flag for every frame on this display.  */
+   FOR_EACH_FRAME (tail, frame)
+     if (FRAME_NS_P (XFRAME (frame))
+         && FRAME_NS_DISPLAY (XFRAME (frame)) == FRAME_NS_DISPLAY (*fp))
+       XFRAME (frame)->mouse_moved = 0;
+   dpyinfo->last_mouse_scroll_bar = nil;
+   if (dpyinfo->last_mouse_frame
+       && FRAME_LIVE_P (dpyinfo->last_mouse_frame))
+     f = dpyinfo->last_mouse_frame;
+   else
+     f = dpyinfo->x_focus_frame ? dpyinfo->x_focus_frame : SELECTED_FRAME ();
+   if (f && FRAME_NS_P (f))
      {
-       /* TODO: we do not use this path at the moment because drag events will
-            go directly to the EmacsScroller.  Leaving code in for now. */
-       [dpyinfo->last_mouse_scroll_bar
-         getMouseMotionPart: (int *)part window: bar_window x: x y: y];
+       view = FRAME_NS_VIEW (*fp);
+       position = [[view window] mouseLocationOutsideOfEventStream];
+       position = [view convertPoint: position fromView: nil];
+       remember_mouse_glyph (f, position.x, position.y,
+                             &dpyinfo->last_mouse_glyph);
+ /*fprintf (stderr, "ns_mouse_position: %.0f, %.0f\n", position.x, position.y); */
+       if (bar_window) *bar_window = Qnil;
+       if (part) *part = 0; /*scroll_bar_handle; */
+       if (x) XSETINT (*x, lrint (position.x));
+       if (y) XSETINT (*y, lrint (position.y));
        if (time)
-       *time = dpyinfo->last_mouse_movement_time;
+         *time = dpyinfo->last_mouse_movement_time;
 -      *fp = f;
 +      dpyinfo->last_mouse_scroll_bar = nil;
 +    }
 +  else
 +    {
 +      /* Clear the mouse-moved flag for every frame on this display.  */
 +      FOR_EACH_FRAME (tail, frame)
 +        if (FRAME_NS_P (XFRAME (frame))
 +            && FRAME_NS_DISPLAY (XFRAME (frame)) == FRAME_NS_DISPLAY (*fp))
 +          XFRAME (frame)->mouse_moved = 0;
 +
 +      dpyinfo->last_mouse_scroll_bar = nil;
 +      if (dpyinfo->last_mouse_frame
 +        && FRAME_LIVE_P (dpyinfo->last_mouse_frame))
 +        f = dpyinfo->last_mouse_frame;
 +      else
 +        f = dpyinfo->x_focus_frame ? dpyinfo->x_focus_frame
 +                                    : SELECTED_FRAME ();
 +
 +      if (f && FRAME_NS_P (f))
 +        {
 +          view = FRAME_NS_VIEW (*fp);
 +
 +          position = [[view window] mouseLocationOutsideOfEventStream];
 +          position = [view convertPoint: position fromView: nil];
 +          remember_mouse_glyph (f, position.x, position.y,
 +                              &dpyinfo->last_mouse_glyph);
 +
 +          if (bar_window) *bar_window = Qnil;
 +          if (part) *part = scroll_bar_above_handle;
 +
 +          if (x) XSETINT (*x, lrint (position.x));
 +          if (y) XSETINT (*y, lrint (position.y));
 +          if (time)
 +          *time = dpyinfo->last_mouse_movement_time;
 +          *fp = f;
 +        }
      }
  
    unblock_input ();
diff --cc src/xdisp.c
Simple merge