1. 10 Nov, 2015 1 commit
    • Paul Eggert's avatar
      Spelling fixes · c92dbd6d
      Paul Eggert authored
      * lisp/net/soap-inspect.el (soap-inspect-xs-simple-type):
      Fix misspelling in output.
      c92dbd6d
  2. 28 Oct, 2015 1 commit
    • Anders Lindgren's avatar
      Fix incorrect NextStep tool-bar-mode -- wrong number of rows in frame. · 590449f3
      Anders Lindgren authored
      * nsterm.h (struct ns_output): New flag, in_animation.
      * nsfns.m (Fx_create_frame): Initialize in_animation flag.
      * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar): Set
      in_animation flag around call to "setVisible". Set new tool bar
      height before call to setVisible.
      * nsterm.m (x_set_window_size): Don't call [view setRow:
      andColumns:] as this fools the subsequent call to updateFrameSize
      from performing the real resize.
      (windowDidResize): Don't update anything when in_animation is
      non-zero.
      
      Trace output.
      
      * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar)
      (EmacsToolbar):
      * nsterm.m (x_set_window_size, updateFrameSize)
      ([EmacsView setRows: andColumns:])
      590449f3
  3. 23 Oct, 2015 1 commit
    • Anders Lindgren's avatar
      NextSten maximization and NSTRACE rewrite. · ba24d35a
      Anders Lindgren authored
      Full-height, full-width, and maximized windows now cover the
      entire screen (except the menu bar), including the part where the
      system dock is placed.  The system zoom animation is no longer
      used.
      
      Made NonMaximized->FullWidth->FullHeight->NonMaximized restore the
      original size.
      
      * nsterm.m (ns_menu_bar_height): New function, return height of
      the menu bar, or 0 when it's hidden.
      * nsterm.m (constrain_frame_rect): New function for constraining a
      frame.
      * nsterm.m (ns_constrain_all_frames): Set frame size explicitly
      rather than relying on the system doing it for us by writing back
      the current frame size.
      * nsterm.m (windowWillUseStandardFrame): Register non-maximized
      width or height as new user size.  When entering full width or
      height, the other size component is taken from the user size.
      * nsterm.m (fullscreenState): New method for accessing the
      fullscreen state.
      * nsterm.m (constrainFrameRect): Restrict frame to be placed under
      the menu bar, if present.  The old version, sometimes, restricted
      the height of a frame to the screen, this version never does this.
      * nsterm.m (zoom): Perform zoom by setting the frame to the full
      size of the screen (minus the menu bar).  The default system
      function, with the zoom animation, is no longer used, as the final
      frame size doesn't cover the entire screen.
      
      Rework how to constrain resizing to the character grid.  The old
      system used "resizeIncrements" in NSWindows.  However, once a frame
      was resized so that it was not aligned to the text grid, it
      remained unaligned even after a resize.  In addition, it conflicted
      when resizing a fullheight window.
      
      * nsterm.m (windowWillResize): Restrict frame size to text grid,
      unless when pixelwise frame resizing is enabled.
      * nsterm.m (updateFrameSize, initFrameFromEmacs)
      (toggleFullScreen, handleFS): Don't set resizeIncrements.
      
      Redesign the NS trace system.  The call structure is represented
      using indentations and vertical lines.  The NSTRACE macro accepts
      printf-style arguments.  New macros for printing various
      information.
      
      * nsterm.h (NSTRACE_ENABLED): Macro to enable trace system.
      * nsterm.h (NSTRACE, NSTRACE_WHEN, NSTRACE_UNLESS): Macros to
      start a new block (typically a function), accept printf-style
      arguments.
      * nsterm.h (NSTRACE_MSG): Macro for extra information, accepts
      printf-style arguments.
      * nsterm.h (NSTRACE_what): Macros for printing various types.
      * nsterm.h (NSTRACE_FMT_what): Macro with printf format string
      snippets.
      * nsterm.h (NSTRACE_ARG_what): Macros for passing printf-style
      arguments, corresponds to NSTRACE_FMT_what.
      * nsterm.h (NSTRACE_RETURN): Macro to print return value, accept
      printf-style arguments.
      * nsterm.h (NSTRACE_RETURN_what): Macros to print return value for
      various types.
      
      * nsterm.m: Remove old NSTRACE macro.
      * nsterm.m (nstrace_num): Trace counter.
      * nsterm.m (nstrace_depth): Current call depth.
      * nsterm.m (nstrace_leave): NSTRACE support function, called when
      the local variable "nstrace_enabled" goes out of scope using the
      "cleanup" extension.
      * nsterm.m (ns_print_fullscreen_type_name): NSTRACE_FSTYPE support
      function.
      * nsterm.m (constrain_frame_rect, ns_constrain_all_frames)
      (ns_update_auto_hide_menu_bar, ns_update_begin)
      (ns_update_window_begin, update_window_end, ns_update_end)
      (ns_focus, ns_unfocus, ns_ring_bell, ns_frame_raise_lower)
      (ns_frame_rehighlight, x_make_frame_visible)
      (x_make_frame_invisible, x_iconify_frame, x_free_frame_resources)
      (x_destroy_window, x_set_offset, x_set_window_size)
      (ns_fullscreen_hook, ns_lisp_to_color, ns_color_to_lisp)
      (ns_defined_color, frame_set_mouse_pixel_position)
      (note_mouse_movement, ns_mouse_position, ns_frame_up_to_date)
      (ns_define_frame_cursor, x_get_keysym_name, ns_redraw_scroll_bars)
      (ns_clear_frame, ns_clear_frame_area, ns_scroll_run)
      (ns_after_update_window_line, ns_shift_glyphs_for_insert)
      (dumpcursor, ns_draw_vertical_window_border)
      (ns_draw_window_divider, ns_draw_relief)
      (ns_dumpglyphs_box_or_relief, ns_maybe_dumpglyphs_background)
      (ns_dumpglyphs_image, ns_draw_glyph_string, ns_send_appdefined)
      (ns_read_socket, ns_select, ns_set_vertical_scroll_bar)
      (ns_set_horizontal_scroll_bar, ns_condemn_scroll_bars)
      (ns_redeem_scroll_bar, ns_judge_scroll_bars, ns_delete_terminal)
      (ns_create_terminal, ns_term_init, sendEvent)
      (applicationDidFinishLaunching, applicationDidBecomeActive)
      (timeout_handler, fd_handler, EmacsView_dealloc, changeFont)
      (acceptsFirstResponder, resetCursorRects, keyDown, mouseDown)
      (deltaIsZero, rightMouseDown, otherMouseDown, mouseUp)
      (rightMouseUp, otherMouseUp, scrollWheel, mouseMoved)
      (mouse_autoselect_window, in_window, mouseDragged)
      (rightMouseDragged, otherMouseDragged, windowShouldClose)
      (updateFrameSize, windowWillResize, windowDidResize)
      (windowDidBecomeKey, windowDidResignKey, windowWillMiniaturize)
      (initFrameFromEmacs, windowDidMove, windowDidDeminiaturize)
      (windowDidExpose, windowDidMiniaturize, windowWillEnterFullScreen)
      (windowDidEnterFullScreen, windowWillExitFullScreen)
      (windowDidExitFullScreen, toggleFullScreen, handleFS, setFSValue)
      (mouseEntered, mouseExited, menuDown, toolbarClicked, drawRect)
      (draggingEntered, performDragOperation, validRequestorForSendType)
      (setMiniwindowImage, constrainFrameRect, performZoom, zoom)
      (EmacsScroller_initFrame, EmacsScroller_setFrame)
      (EmacsScroller_dealloc, condemn, reprieve, judge)
      (resetCursorRects, setPosition, EmacsScroller_mouseDown)
      (EmacsScroller_mouseDragged, syms_of_nsterm): Use new trace system.
      
      * nsfns.m: Remove old NSTRACE macro.
      * nsfns.m (x_set_icon_name, ns_set_name, x_explicitly_set_name)
      (x_implicitly_set_name, x_set_title, ns_set_name_as_filename)
      (ns_implicitly_set_icon_type, x_set_icon_type): Use new trace system.
      
      * nsimage.m: Remove old NSTRACE macro.
      * nsimage.m (ns_image_from_XBM, ns_image_for_XPM)
      (ns_image_from_bitmap_file, ns_load_image): Use new trace system.
      
      * nsmenu.m: Remove old NSTRACE macro.
      * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
      Use new trace system.
      ba24d35a
  4. 15 May, 2015 2 commits
    • Jan Djärv's avatar
      Fix warnings on OSX 10.10. · e0e07535
      Jan Djärv authored
      * nsfns.m (MODAL_OK_RESPONSE): New define for different OSX versions.
      (Fns_read_file_name): Check against MODAL_OK_RESPONSE.
      (compute_tip_xy): Use convertRectToScreen for OSX >= 10.7
      
      * nsmenu.m (initWithContentRect:styleMask:backing:defer:)
      * nsimage.m (allocInitFromFile, setPixmapData): Only call
      setScalesWhenResized for OSX < 10.6.
      
      * nsterm.h (EmacsScroller): Declare scrollerWidth.
      
      * nsterm.m (ns_copy_bits): New function that does not use deprecated
      NSCopyBits.
      (ns_scroll_run, ns_shift_glyphs_for_insert): Call ns_copy_bits.
      (runAlertPanel): New function.
      (applicationShouldTerminate:): Call runAlertPanel.
      (initFrameFromEmacs, toggleFullScreen:): Only call useOptimizedDrawing
      for OSX < 10.10.
      (initFrameFromEmacs:): Only call allocateGState for OSX < 10.10.
      (windowWillUseStandardFrame:defaultFrame:): Cast arg to abs to int.
      (draggingEntered:): Returns NSDragOperation.
      (scrollerWidth): Use scrollerWidthForControlSize for OSX >= 10.7.
      e0e07535
    • Jan Djärv's avatar
      Honor :fore/background for XBM on NS (Bug#14969). · 67a878f7
      Jan Djärv authored
      * nsterm.h (EmacsImage): Add xbm_fg, remove initFromSkipXBM,
      initFromXBM takes bg, fg args, remove flip arg.
      (ns_image_from_XBM): Add bg, fg args.
      * image.c (x_create_bitmap_from_data)
      (Create_Pixmap_From_Bitmap_Data): ns_image_from_XBM takes bg, fg args.
      
      * nsimage.m (ns_image_from_XBM): Add fg, bg args, pass to initFromXBM.
      Remove flip arg.
      (initFromSkipXBM): Move code to initFromXBM.
      (initFromXBM): Actually set fg and bg, instead of playing alpha games.
      Use fg, bg from args (Bug#14969).  Remove if (length) section, was always
      false.
      Remove bit flipping (bitPat, swt), generated incorrect images when
      width/height wasn't a multiple of 8.
      (setXBMColor:): Modify planes by comparing to saved xbm_fg.
      
      * nsterm.m (ns_draw_fringe_bitmap): initFromXBM takes fg, bg args, remove
      flip arg.
      67a878f7
  5. 05 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Compute C decls for DEFSYMs automatically · 58f2d6ef
      Paul Eggert authored
      Fixes Bug#15880.
      This patch also makes Q constants (e.g., Qnil) constant addresses
      from the C point of view.
      * make-docfile.c: Revamp to generate table of symbols, too.
      Include <stdbool.h>.
      (xstrdup): New function.
      (main): Don't process the same file twice.
      (SYMBOL): New constant in enum global_type.
      (struct symbol): Turn 'value' member into a union, either v.value
      for int or v.svalue for string.  All uses changed.
      (add_global): New arg svalue, which overrides value, so that globals
      can have a string value.
      (close_emacs_global): New arg num_symbols; all uses changed.
      Output lispsym decl.
      (write_globals): Output symbol globals too.  Output more
      ATTRIBUTE_CONST, now that Qnil etc. are C constants.
      Output defsym_name table.
      (scan_c_file): Move most of guts into ...
      (scan_c_stream): ... new function.  Scan for DEFSYMs and
      record symbols found.  Don't read past EOF if file doesn't
      end in newline.
      * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle:
      * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
      * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
      * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
      * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
      * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
      * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
      * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
      * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
      * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
      * xselect.c, xsettings.c, xterm.c:
      Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
      These names are now defined automatically by make-docfile.
      * alloc.c (init_symbol): New function.
      (Fmake_symbol): Use it.
      (c_symbol_p): New function.
      (valid_lisp_object_p, purecopy): Use it.
      * alloc.c (marked_pinned_symbols):
      Use make_lisp_symbol instead of make_lisp_ptr.
      (garbage_collect_1): Mark lispsym symbols.
      (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
      (mark_object): Use it.
      (sweep_symbols): Sweep lispsym symbols.
      (symbol_uses_obj): New function.
      (which_symbols): Use it.  Work for lispsym symbols, too.
      (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
      since Qt's address is already known now.
      (syms_of_alloc): Add lispsym count to symbols_consed.
      * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
      when testing whether storage is all bits zero.
      * dispextern (struct image_type):
      * font.c (font_property_table):
      * frame.c (struct frame_parm_table, frame_parms):
      * keyboard.c (scroll_bar_parts, struct event_head):
      * xdisp.c (struct props):
      Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
      Lisp_Object *, since Qfoo is no longer an object whose address can be
      taken.  All uses changed.
      * eval.c (run_hook): New function.  Most uses of Frun_hooks changed to
      use it, so that they no longer need to take the address of a Lisp sym.
      (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
      * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
      * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
      DEFSYM Qdeactivate_mark before the corresponding var.
      * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
      instead of interning their symbols; this avoids duplicates.
      (LISP_INITIALLY, TAG_PTR)
      (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
      New macros.
      (LISP_INITIALLY_ZERO): Use it.
      (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
      (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
      Move decls up, to avoid forward uses.  Include globals.h earlier, too.
      (make_lisp_symbol): New function.
      (XSETSYMBOL): Use it.
      (DEFSYM): Now just a placeholder for make-docfile.
      * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
      (intern_sym): New function, with body taken from old intern_driver.
      (intern_driver): Use it.  Last arg is now Lisp integer, not ptrdiff_t.
      All uses changed.
      (define_symbol): New function.
      (init_obarray): Define the C symbols taken from lispsym.
      Use plain DEFSYM for Qt and Qnil.
      * syntax.c (init_syntax_once): No need to worry about
      Qchar_table_extra_slots.
      58f2d6ef
  6. 01 Jan, 2015 2 commits
  7. 24 Dec, 2014 1 commit
    • Jan D's avatar
      Backport: Don't cache images in nsimage.m (Bug#18918). · 2566f386
      Jan D authored
      Fixes: Bug#18918
      
      * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
      imageListSetNext, imageListNext.
      
      * nsimage.m (ImageList, imageListNext, imageListSetNext:)
      (reference): Remove.
      (allocInitFromFile:): Remove searching ImageList and calling
      reference (Bug#18918).
      (dealloc): Remove handling if ImageList.
      2566f386
  8. 02 Dec, 2014 1 commit
    • Jan Djärv's avatar
      More flicker fixes for OSX, related to bug 18757. · d9d38314
      Jan Djärv authored
      * nsfns.m (ns_set_name_as_filename): Don't set represented filename
      at once, call ns_set_represented_filename instead.
      
      * nsterm.h: Declare ns_set_represented_filename.
      
      * nsterm.m (represented_filename, represented_frame): New variables.
      (ns_set_represented_filename): New function.
      (sendEvent:): Set represented filename here to avoid flicker,
      related to Bug#18757.
      d9d38314
  9. 09 Nov, 2014 1 commit
    • Jan Djärv's avatar
      * nsterm.h (EmacsScroller): judge returns bool. · d2965875
      Jan Djärv authored
      * nsterm.m (ns_set_vertical_scroll_bar): Release bar.
      (ns_judge_scroll_bars): Only set removed if judge returns true.
      (judge): Returns bool == condemned.  Remove self from window.
      (setPosition:portion:whole:): Remove raise SIGIO.
      
      Fixes: debbugs:18757
      d2965875
  10. 08 Nov, 2014 1 commit
  11. 02 Nov, 2014 1 commit
    • Jan Djärv's avatar
      * nsimage.m (ImageList, imageListNext, imageListSetNext:) · 65bb8d05
      Jan Djärv authored
      (reference): Remove.
      (allocInitFromFile:): Remove searching ImageList and calling
      reference.
      (dealloc): Remove handling if ImageList.
      
      * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
      imageListSetNext, imageListNext.
      
      Fixes: debbugs:18918
      65bb8d05
  12. 30 Oct, 2014 2 commits
    • Jan Djärv's avatar
      * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here · c465f1c2
      Jan Djärv authored
      instead of in xdisp.c, function now takes void.
      
      * nsterm.h (ns_set_doc_edited): Declare taking no args.
      
      * xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
      (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
      c465f1c2
    • Jan Djärv's avatar
      * nsfns.m (x_icon): icon_top/left is int. · b7bf631c
      Jan Djärv authored
      * nsterm.h (EmacsScroller): Replace Lisp_Object win with
      struct window*.
      Remove getMouseMotionPart.
      (ns_output): Make icon_top/left 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.
      
      Fixes: debbugs:18889
      b7bf631c
  13. 12 Oct, 2014 1 commit
    • Jan Djärv's avatar
      Require OSX >= 10.6. Remove PowerPC unexec code. · 9a265587
      Jan Djärv authored
      * configure.ac: Require OSX 10.6.  Remove NSInteger test,
      use nsfont for Gnustep, macfont for OSX.
      
      * etc/NEWS: OSX required is 10.6 or newer.
      
      * src/Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
      comment.
      
      * src/macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
      (mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6
      
      * src/nsfns.m: Always include src/macfont.h on COCOA.
      (ns_filename_from_panel, ns_directory_from_panel)
      (Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
      (Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6
      
      * src/nsterm.m: Always include src/macfont.h on COCOA.
      (ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
      (ns_dumpglyphs_image, ns_check_menu_open)
      (applicationDidFinishLaunching)
      (antialiasThresholdDidChange:)
      (keyDown:, toggleFullScreen:, setPosition:portion:whole:): Remove
      checks for OSX <= 10.5/10.6.
      (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
      (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
      GNUSTEP.
      
      * src/macfont.m: Remove >= 1050 check.
      (macfont_create_family_with_symbol)
      (macfont_get_glyph_for_character)
      (mac_font_get_glyphs_for_variants)
      (mac_ctfont_create_available_families, syms_of_macfont): Remove
      code for OSX < 10.6.
      (mac_font_family_group, mac_font_family_compare): Remove, only used
      for OSX < 10.6.
      
      * src/nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.
      
      * src/nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
      (x_activate_menubar, trackingNotification:): Remove check for
      OSX >= 10.5.
      (menuNeedsUpdate:): Remove check for OSX < 10.5.
      
      * src/nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
      (NS_HAVE_NSINTEGER): Remove block.
      Remove >= OSX 10.6 tests.
      
      * src/unexmacosx.c: Remove include ppc/reloc.h.
      (unrelocate, copy_dysymtab): Remove PPC code.
      (rebase_reloc_address): Remove, only used for PPC:
      9a265587
  14. 24 Sep, 2014 1 commit
    • Dmitry Antipov's avatar
      * termhooks.h (enum scroll_bar_part): Begin from 0 to allow... · 4b930ccb
      Dmitry Antipov authored
      (struct input_event): ...unsigned bitfields.  Likewise for
      `event_kind' member.  Prefer unsigned for `code' and 'modifiers'.
      Use `timestamp' for HELP_EVENT position.  Add compile-time assert.
      * keyboard.c (gen_help_event, kbd_buffer_store_help_event)
      (kbd_buffer_get_event): Adjust users.
      (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
      (make_scroll_bar_position): New function, refactored out of...
      (make_lispy_event): ...adjusted user.
      * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
      * nsterm.m (ns_mouse_position, mouseUp):
      * term.c (term_mouse_position):
      * w32inevt.c (w32_console_mouse_position):
      * w32term.c (w32_mouse_position):
      * xterm.c (XTmouse_position): Use scroll_bar_above_handle.
      (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
      Prefer enum and explicit enum members to integers and numeric values.
      4b930ccb
  15. 27 Jul, 2014 1 commit
    • Martin Rudalics's avatar
      Complete pixelwise frame/window resizing, add horizontal scrollbar support. · 3477e270
      Martin Rudalics authored
      * frame.el (frame-notice-user-settings): Rewrite using
      frame-initial-frame-tool-bar-height.
      * menu-bar.el (menu-bar-horizontal-scroll-bar)
      (menu-bar-no-horizontal-scroll-bar): New functions.
      (menu-bar-showhide-scroll-bar-menu): Add bindings for horizontal
      scroll bars.
      * scroll-bar.el (scroll-bar-lines)
      (set-horizontal-scroll-bar-mode)
      (get-horizontal-scroll-bar-mode, horizontal-scroll-bar-mode)
      (scroll-bar-horizontal-drag-1, scroll-bar-horizontal-drag)
      (scroll-bar-toolkit-horizontal-scroll): New functions.
      (horizontal-scroll-bar-mode)
      (previous-horizontal-scroll-bar-mode)
      (horizontal-scroll-bar-mode-explicit): New variables.
      (horizontal-scroll-bar-mode): New option.
      (toggle-horizontal-scroll-bar): Do something.
      (top-level): Bind horizontal-scroll-bar mouse-1.
      * startup.el (tool-bar-originally-present): Remove variable.
      (command-line): Don't set tool-bar-originally-present.
      * window.el (window-min-height): Update doc-string.
      (window--dump-frame): Dump horizontal scroll bar values.
      (window--min-size-1): Handle minibuffer window separately.
      Count in margins and horizontal scroll bar.  Return safe value
      iff IGNORE equals 'safe.
      (frame-windows-min-size): New function (used by frame resizing
      routines).
      (fit-frame-to-buffer, fit-window-to-buffer): Count in horizontal
      scroll bars.
      (window--sanitize-window-sizes): New function.
      (window-split-min-size): Remove.
      (split-window): Count divider-width.  Don't use
      `window-split-min-size' any more.  Reword error messages.
      Sanitize windows sizes after splitting.
      * buffer.h (struct buffer): New fields scroll_bar_height and
      horizontal_scroll_bar_type.
      * buffer.c (bset_scroll_bar_height)
      (bset_horizontal_scroll_bar_type): New functions.
      (Fbuffer_swap_text): Handle old_pointm field.
      (init_buffer_once): Set defaults for scroll_bar_height and
      horizontal_scroll_bar_type.
      (syms_of_buffer): New variables scroll_bar_height and
      horizontal_scroll_bar_type.
      * dispextern.h (window_part): Rename ON_SCROLL_BAR to
      ON_VERTICAL_SCROLL_BAR.  Add ON_HORIZONTAL_SCROLL_BAR.
      (set_vertical_scroll_bar): Remove prototype.
      (x_change_tool_bar_height): Add prototype.
      * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
      (window_to_frame_vpos, update_frame_1, scrolling, init_display):
      Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS
      and FRAME_LINES.
      (adjust_frame_glyphs_for_window_redisplay): Rearrange lines.
      (update_window): Start mode_line_row->y after horizontal scroll
      bar.
      (change_frame_size_1): Call adjust_frame_size.
      (init_display): When changing the size of a tty frame do not
      pass height of menu bar.
      (Qframe_windows_min_size): New symbol.
      * frame.h (struct frame): List tool bar fields after menu bar
      fields.  Add official, total_lines, horizontal_scroll_bars,
      config_scroll_bar_height and config_scroll_bar_lines fields.
      (FRAME_HAS_HORIZONTAL_SCROLL_BARS)
      (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES)
      (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS)
      (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES)
      (FRAME_WINDOWS_HEIGHT): New macros.
      (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT)
      (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES)
      (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and
      horizontal scroll bar.
      (frame_inhibit_resize, adjust_frame_size)
      (frame_windows_min_size): Add declarations.
      (Qscroll_bar_height, Qhorizontal_scroll_bars)
      (x_set_scroll_bar_default_height, x_set_left_fringe)
      (x_set_right_fringe, x_set_vertical_scroll_bars)
      (x_set_horizontal_scroll_bars, x_set_scroll_bar_width)
      (x_set_scroll_bar_height): Add external declarations.
      * frame.c: (frame_inhibit_resize, frame_windows_min_size)
      (adjust_frame_size): New functions.
      (make_frame): Initial horizontal_scroll_bars field.  Use
      SET_FRAME_LINES.  Don't allow horizontal scroll bar in
      minibuffer window.
      (make_initial_frame, make_terminal_frame): No horizontal scroll
      bar in initial and terminal frames.  Use adjust_frame_size.
      (Fframe_total_cols): Fix doc-string.
      (Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
      (Fset_frame_height, Fset_frame_width, Fset_frame_size): Rewrite
      using adjust_frame_size.
      (Qscroll_bar_height, Qhorizontal_scroll_bars)
      (Qframe_windows_min_size): New symbols.
      (x_set_frame_parameters): Remove call of check_frame_size.
      (x_report_frame_params): Return scroll_bar_height value.
      (x_set_left_fringe, x_set_right_fringe): New functions.
      (adjust_frame_height, x_set_internal_border_width)
      (x_set_fringe_width): Remove.
      (x_set_internal_border_width, x_set_vertical_scroll_bars)
      (x_set_scroll_bar_width, x_set_right_divider_width)
      (x_set_bottom_divider_width): Rewrite using adjust_frame_size.
      (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): New
      functions.
      (x_figure_window_size): Rewrite to make frame display the
      expected number of lines.
      (Vdefault_frame_scroll_bars): Rewrite doc-string.
      (Vdefault_frame_horizontal_scroll_bars)
      (Vframe_initial_frame_tool_bar_height)
      (frame_inhibit_implied_resize): New variables.
      * fringe.c (compute_fringe_widths): Remove.
      * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define.
      (xg_create_horizontal_scroll_bar)
      (xg_update_horizontal_scrollbar_pos)
      (xg_set_toolkit_horizontal_scroll_bar_thumb)
      (xg_get_default_scrollbar_height)
      (xg_clear_under_internal_border): Extern.
      * gtkutil.c (xg_frame_resized): Don't call
      do_pending_window_change.
      (xg_frame_set_char_size): Use adjust_frame_size.
      (style_changed_cb): Call update_theme_scrollbar_height and
      x_set_scroll_bar_default_height.
      (x_wm_set_size_hint): Don't call check_frame_size.
      (update_theme_scrollbar_height)
      (xg_get_default_scrollbar_height)
      (xg_create_horizontal_scroll_bar)
      (xg_update_horizontal_scrollbar_pos)
      (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions.
      (xg_create_scroll_bar): Set horizontal slot of bar.
      (xg_initialize): Call update_theme_scrollbar_height.
      (xg_clear_under_internal_border): No more static.
      * insdel.c (adjust_suspend_auto_hscroll): New function.
      (adjust_markers_for_delete, adjust_markers_for_insert)
      (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll.
      * keyboard.c (readable_events, discard_mouse_events)
      (make_lispy_event): Handle horizontal scroll bar click events.
      (Fsuspend_emacs): When changing the size of a tty frame do not
      pass height of menu bar.
      (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft)
      (Qright, Qleftmost, Qrightmost): New symbols.
      * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of
      FRAME_LINES.
      * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll.
      * nsfns.m (x_set_internal_border_width): New function.
      * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar):
      Remove extended fringe code.
      (x_set_window_size, x_new_font): Don't call
      compute_fringe_widths.
      * term.c (Fresume_tty): When changing the size of a tty frame do
      not pass height of menu bar.
      (clear_tty_hooks, set_tty_hooks): Clear
      horizontal_scroll_bar_hook.
      (init_tty): Frame has no horizontal scroll bars.
      * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
      scroll_bar_before_handle, scroll_bar_horizontal_handle,
      scroll_bar_after_handle, scroll_bar_left_arrow,
      scroll_bar_right_arrow, scroll_bar_to_leftmost and
      scroll_bar_to_rightmost entries.
      (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
      (struct terminal): Add set_horizontal_scroll_bar_hook.
      * w32console.c (initialize_w32_display): Clear
      horizontal_scroll_bar_hook.
      * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
      FRAME_X_DISPLAY.
      (x_clear_under_internal_border, x_set_internal_border_width):
      New functions.
      (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize.  Set
      windows_or_buffers_changed when adding the menu bar.
      (x_set_tool_bar_lines): Rewrite using adjust_frame_size.
      (x_change_tool_bar_height, x_set_scroll_bar_default_height)
      (w32_createhscrollbar): New functions.
      (w32_createscrollbar): Rename to w32_createvscrollbar.
      (w32_createwindow): Init WND_HSCROLLBAR_INDEX.
      (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
      WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR.  Add
      WM_EMACS_SHOWCURSOR.
      (w32_wnd_proc): Handle WM_HSCROLL case.  In WM_WINDOWPOSCHANGING
      case do not artificially impose WM size hints.  Handle
      WM_EMACS_SHOWCURSOR case.  Replace WM_EMACS_CREATESCROLLBAR case
      by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
      cases.
      (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
      WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX.
      (unwind_create_frame_1): Remove.
      (Fx_create_frame): Make both scrollbars the system standard
      width and height.  Use official field of frame structure to
      inhibit running window-configuration-change-hook.
      (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
      pixelwise.  Handle frame's official field.
      (w32_frame_parm_handlers): Remove x_set_fringe_width
      entries. Add x_set_scroll_bar_height,
      x_set_horizontal_scroll_bars, x_set_left_fringe and
      x_set_right_fringe.
      * w32inevt.c (resize_event, maybe_generate_resize_event): Do not
      pass height of menu bar to change_frame_size.
      * w32menu.c (set_frame_menubar): Rewrite using
      frame_inhibit_resize.
      * w32term.h (struct w32_display_info): Add
      horizontal_scroll_bar_cursor and cursor_display_counter.
      (struct scroll_bar): Add horizontal.
      (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
      (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
      (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH)
      (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
      (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
      (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
      (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
      (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
      (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR): Define
      instead of WM_EMACS_CREATESCROLLBAR.
      (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
      WND_SCROLLBAR_INDEX.
      * w32term.c (horizontal_scroll_bar_min_handle)
      (horizontal_scroll_bar_left_border)
      (horizontal_scroll_bar_right_border): New integers.
      (x_set_frame_alpha): Replace x_highlight_frame by
      w32_focus_frame.
      (x_window_to_scroll_bar): New argument "type".  Update callers
      accordingly.
      (w32_set_horizontal_scroll_bar_thumb)
      (x_horizontal_scroll_bar_report_motion)
      (w32_set_horizontal_scroll_bar)
      (w32_horizontal_scroll_bar_handle_click)
      (x_horizontal_scroll_bar_report_motion): New functions.
      (w32_mouse_position): Discriminate horizontal and vertical
      scrollbar cases.
      (my_create_scrollbar): Replace with two new functions
      my_create_vscrollbar and my_create_hscrollbar.
      (x_scroll_bar_create): New argument "horizontal".  Update
      callers accordingly.
      (x_scroll_bar_remove, w32_condemn_scroll_bars)
      (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
      scroll bar case.
      (w32_read_socket): Handle WM_HSCROLL cae.
      (x_new_font): Don't recompute fringe widths.  Use
      frame_inhibit_resize.  Calculate new menu bar height iff we
      build without toolkit.  Always clear under internal border.
      (x_set_window_size): Don't check frame size or recompute
      fringes.  Reset fullscreen status before applying sizes.  Always
      resize as requested by pixelwise argument.  Don't call
      do_pending_window_change.
      (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
      (w32_initialize_display_info): Initialize dpyinfo's
      horizontal_scroll_bar_cursor entry.
      (w32_create_terminal): Add set_horizontal_scroll_bar_hook.
      (w32_initialize): Init horizontal_scroll_bar_min_handle and
      horizontal_scroll_bar_left_border.
      (w32fullscreen_hook): Intermittently resize window to normal
      when switching from fullscreen to maximized state.
      (run_window_configuration_change_hook): Don't run it if frame is
      not official yet.
      (unwind_change_frame): Remove.
      (Fset_window_configuration): Rewrite using frame's official field.
      * widget.c (set_frame_size): Don't call compute_fringe_widths.
      (EmacsFrameSetCharSize): Obey frame_inhibit_resize.
      * window.h (struct window): New fields old_pointm,
      horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole,
      scroll_bar_height and suspend_auto_hscroll.
      (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type):
      New functions.
      (sanitize_window_sizes): Extern.
      (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P)
      (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
      (WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
      (WINDOW_CONFIG_SCROLL_BAR_LINES)
      (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT): New
      macros.
      (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
      (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
      (WINDOW_VERTICAL_SCROLL_BAR_TYPE)
      (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
      (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
      (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite.
      (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT)
      (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height.
      * window.c (wset_old_pointm, Fwindow_scroll_bar_height)
      (Fwindow_old_point, sanitize_window_sizes): New functions.
      (Qwindow_sanitize_window_sizes): New symbol.
      (window_body_height): Count in horizontal scroll bar.
      (set_window_hscroll, Fscroll_left, Fscroll_right): Set
      suspend_auto_hscroll slot.
      (Fwindow_inside_edges): Count fringes pixelwise.
      (coordinates_in_window, Fcoordinates_in_window_p): Consider
      horizontal scroll bar.
      (check_frame_size, adjust_window_margins): Remove functions and
      corresponding calls.
      (set_window_buffer): Initialize old_pointm and horizontal scroll
      bars.
      (temp_output_buffer_show): Reset hscroll related fields.
      Initialize old_pointm.
      (make_parent_window): Initialize old_pointm.
      (make_window): Initialize old_pointm, horizontal scroll bar type,
      and scroll bar height.
      (resize_frame_windows): Don't count top margin in new sizes.
      Don't use safe sizes when shrinking a frame; let the window
      manager do the clipping.
      (Fsplit_window_internal): Inherit horizontal scroll bar type and
      height.
      (Fdelete_window_internal): Unchain old_pointm marker.
      (window_scroll_pixel_based, Fscroll_other_window): Adjust
      old_pointm.
      (Fwindow_text_width, Fwindow_text_height): New argument
      "pixelwise".
      (struct saved_window): New fields, old_pointm, hscroll_whole,
      suspend_auto_hscroll, scroll_bar_height and
      horizontal_scroll_bar_type.
      (Fset_window_configuration, save_window_save): Set new fields of
      saved_window.
      (apply_window_adjustment): Don't call adjust_window_margins.
      (set_window_margins): Don't change margins if new sizes don't
      fit into window.
      (set_window_scroll_bars): New argument "horizontal_type".
      Handle horizontal scroll bars.  Don't change scroll bars if they
      don't fit into window.
      (Fset_window_scroll_bars): New argument "horizontal_type".
      (Fwindow_scroll_bars): Return values for horizontal scroll bars.
      (compare_window_configurations): Compare horizontal scroll bar
      settings.
      * xdisp.c (window_text_bottom_y, window_box_height): Count in
      horizontal scroll bar height.
      (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES
      instead of FRAME_LINES.
      (remember_mouse_glyph): Case ON_SCROLL_BAR changed to
      ON_VERTICAL_SCROLL_BAR.
      (with_echo_area_buffer): Initialize old_pointm.
      (with_echo_area_buffer_unwind_data): Store old_pointm values in
      vector.
      (unwind_with_echo_area_buffer): Handle old_pointm.
      (update_tool_bar): Set do_update when the tool bar window has at
      least one line (since this is what the user sets).
      (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro.
      (redisplay_tool_bar): Return early when toolbar has zero lines.
      Call x_change_tool_bar_height.  Don't use max_tool_bar_height.
      (hscroll_window_tree): Handle suspension of auto_hscroll and
      old_pointm.
      (set_horizontal_scroll_bar): New function.
      (redisplay_window): Set ignore_mouse_drag_p when tool bar has
      more than one line.  Handle horizontal scroll bars.
      (note_mouse_highlight): Handle horizontal scrol bars.
      (expose_frame): Set dimensions of XRectangle from frame's text
      sizes.
      (Vvoid_text_area_pointer): Update doc-string.
      * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size.
      (x_change_tool_bar_height, x_set_scroll_bar_default_height)
      (x_set_internal_border_width): New functions.
      (x_set_tool_bar_lines): Call x_change_tool_bar_height.
      (unwind_create_frame_1): Remove.
      (Fx_create_frame): Handle horizontal scroll bars.  Use official
      field of frame structure to inhibit running
      window-configuration-change-hook.
      (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
      pixelwise.  Handle frame's official field.
      (x_frame_parm_handlers): Add x_set_scroll_bar_height,
      x_set_horizontal_scroll_bars, x_set_left_fringe,
      x_set_right_fringe.
      * xmenu.c (update_frame_menubar, free_frame_menubar): Use
      adjust_frame_size.
      * xterm.h (struct x_display_info): Add
      horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
      slots.
      (struct scroll_bar): Add horizontal slot.
      (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
      (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
      (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros.
      (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
      (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
      (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
      (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
      (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define.
      (x_clear_under_internal_border): Remove.
      * xterm.c (XTmouse_position): Handle horizontal scroll bars.
      (x_window_to_scroll_bar): New argument TYPE.  Update callers.
      (x_send_scroll_bar_event, x_scroll_bar_create): New arguments
      HORIZONTAL.  Update callers.
      (horizontal_action_hook_id): New action hook id.
      (x_horizontal_scroll_bar_to_input_event)
      (x_create_horizontal_toolkit_scroll_bar)
      (xt_horizontal_action_hook)
      (x_set_toolkit_horizontal_scroll_bar_thumb)
      (XTset_horizontal_scroll_bar, x_net_wm_state)
      (x_horizontal_scroll_bar_report_motion): New functions.
      (xg_scroll_callback, x_scroll_bar_handle_click): Handle
      horizontal scroll bars.
      (SCROLL_BAR_HORIZONTAL_NAME): Define.
      (XTset_vertical_scroll_bar): Attempt to clear areas not covered
      by scroll bar.
      (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite.  Handle
      horizontal scroll bars.
      (handle_one_xevent): Handle horizontal scroll bar events.  Call
      x_net_wm_state.
      (x_set_window_size_1, x_wm_set_size_hint): Don't call
      check_frame_size.
      (x_set_window_size): Don't call check_frame_size and
      do_pending_window_change.
      (x_term_init): Init horizontal_scroll_bar_cursor display info.
      (x_create_terminal): Add set_horizontal_scroll_bar_hook.
      (x_scroll_bar_set_handle): Add some checks when calling
      x_clear_area.
      3477e270
  16. 20 Jul, 2014 1 commit
    • Jan Djärv's avatar
      * macfont.h (macfont_update_antialias_threshold): Declare. · 880b7166
      Jan Djärv authored
      * macfont.m (macfont_update_antialias_threshold): Remove static.
      
      * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
      
      * nsterm.m (applicationDidFinishLaunching:): Call
      antialiasThresholdDidChange, register for antialias changes.
      (antialiasThresholdDidChange:): New method for EmacsApp.
      
      Fixes: debbugs:17534
      880b7166
  17. 30 Jun, 2014 1 commit
    • Jan Djärv's avatar
      Fix use of deallocated memory. · 98bfa4f1
      Jan Djärv authored
      * nsterm.h (EmacsScroller): Remove dealloc.
      
      * nsterm.m (judge): EmacsScroller: Move dealloc code here.
      (dealloc): Remove for EmacsScroller.
      98bfa4f1
  18. 11 Jun, 2014 1 commit
    • Jan Djärv's avatar
      Fix memory leaks · b765f1fe
      Jan Djärv authored
      * macfont.m (macfont_draw): positions where not freed.
      
      * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst
      on Cocoa.
      
      * nsterm.m (run): Always compile for Cocoa.  Use runtime check to
      determine 10.9.
      
      Fixes: debbugs:17751
      b765f1fe
  19. 04 Jun, 2014 1 commit
    • Dmitry Antipov's avatar
      Use terminal-specific hooks to display popup dialogs. · 680a6ad9
      Dmitry Antipov authored
      * termhooks.h (struct terminal): New field popup_dialog_hook.
      * menu.c (emulate_dialog_with_menu): New function, refactored from ...
      (Fx_popup_dialog): ... adjusted user.  Also remove old #if 0
      code and use popup_dialog_hook.
      * nsmenu.m (ns_popup_dialog): Make hook-compatible.
      * nsterm.h (ns_popup_dialog): Adjust prototype.
      * nsterm.m (ns_create_terminal):
      * w32term.c (w32_create_terminal):
      * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]: Setup
      popup_dialog_hook.
      680a6ad9
  20. 26 May, 2014 1 commit
    • Jan Djärv's avatar
      * nsfns.m (ns_do_applescript): Surround executeAndReturnError · 6cf4e5d6
      Jan Djärv authored
      with calls to ns_init_events, ns_finish_events.
      
      * nsterm.h (ns_init_events, ns_finish_events): Declare.
      
      * nsterm.m (ns_init_events, ns_finish_events): New functions.
      (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
      
      Fixes: debbugs:17424
      6cf4e5d6
  21. 04 Apr, 2014 1 commit
    • Jan Djärv's avatar
      Backport from trunk. · 11a9c72f
      Jan Djärv authored
             * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
      is nil.  If waiting for toolbar to complete, force a redraw.
      (free_frame_tool_bar): Set wait_for_tool_bar = NO
      
             * nsterm.h (EmacsView): Add wait_for_tool_bar.
      
      * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
             bar is zero height, just return (Bug#16976).
             (initFrameFromEmacs:): Initialize wait_for_tool_bar.
      11a9c72f
  22. 30 Mar, 2014 1 commit
    • Jan Djärv's avatar
      Avoid flickering on frame creation with tool bar on OSX. · f9d45267
      Jan Djärv authored
      * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
      is nil.  If waiting for toolbar to complete, force a redraw.
      
      * nsterm.h (EmacsView): Add wait_for_tool_bar.
      
      * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
      bar is zero height, just return.
      (initFrameFromEmacs:): Initialize wait_for_tool_bar.
      
      Fixes: debbugs:16976
      f9d45267
  23. 08 Mar, 2014 1 commit
  24. 20 Jan, 2014 1 commit
  25. 05 Jan, 2014 1 commit
    • Paul Eggert's avatar
      Spelling fixes. · da5ecfa9
      Paul Eggert authored
      * lib-src/Makefile.in (regex.o): Remove reference to no-longer-used macros
      CONFIG_BROKETS and INHIBIT_STRING_HEADER.  "BROKETS" was a
      misspelling anyway....
      * src/nsterm.h (updateCollectionBehavior): Rename from
      updateCollectionBehaviour.  All uses changed.
      da5ecfa9
  26. 01 Jan, 2014 1 commit
  27. 21 Dec, 2013 1 commit
    • Jan Djärv's avatar
      Customize ns-use-srgb-colorspace on OSX >= 10.7 to use sRGB. · 41cf3d11
      Jan Djärv authored
      * etc/NEWS: Mention ns-use-srgb-colorspace.
      
      * lisp/cus-start.el (all): Add ns-use-srgb-colorspace.
      
      * src/nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
      
      * src/nsterm.h: Declare EmacsColor category.
      
      * src/nsterm.m (NSColor): Implement EmacsColor category.
      (ns_get_color): Use colorUsingDefaultColorSpace.
      (ns_get_color, ns_term_init): Use colorForEmacsRed.
      41cf3d11
  28. 19 Dec, 2013 2 commits
    • Jan Djärv's avatar
      Make NS port use the normal dnd functions. · 1269a680
      Jan Djärv authored
      * lisp/term/ns-win.el: Require dnd.
      (global-map): Remove drag items.
      (ns-insert-text, ns-set-foreground-at-mouse)
      (ns-set-background-at-mouse): Remove
      (ns-drag-n-drop, ns-drag-n-drop-other-frame)
      (ns-drag-n-drop-as-text, ns-drag-n-drop-as-text-other-frame): New
      functions.
      
      * src/nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
      Remove.
      
      * src/nsterm.m (Qfile, Qurl): New.
      (EV_MODIFIERS2): New macro.
      (EV_MODIFIERS): Use EV_MODIFIERS2.
      (ns_term_init): Remove font and color from DND, does not work on
      newer OSX, and other ports don't have them.
      (performDragOperation:): Handle modifiers used during drag.
      Use DRAG_N_DROP_EVENT instead of NS specific events.
      Remove global Lisp variables used to communicate with ns-win.el.
      Remove font and color handling.
      (syms_of_nsterm): Defsym Qfile and Qurl.
      
      Fixes: debbugs:8051
      1269a680
    • Jan Djärv's avatar
      Redo size constraint for NS so frames can span screens. · 680e6b8c
      Jan Djärv authored
      * nsterm.h (ns_output): Remove dont_constrain.
      
      * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
      (ns_constrain_all_frames, x_set_offset): Remove assignment to
      dont_constrain.
      (updateFrameSize:, windowWillResize:toSize:): Add trace.
      (constrainFrameRect): Remove special case nr_screens == 1.
      Don't constrain size to size of view.
      680e6b8c
  29. 07 Dec, 2013 1 commit
    • Jan Djärv's avatar
      Fix GNUStep issues with startup. · 1bb2debd
      Jan Djärv authored
      * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
      
      Pixel resize changes for NS.
      * nsterm.m (x_set_window_size): Change parameters rows/cols to
      height/width.  row/cols are locals.
      Pass pixelwise to check_frame_size.  Don't set FRAME_PIXEL_WIDTH/HEIGHT.
      (updateFrameSize:): Remove gsextra.  Adjust for pixelwise resize.
      (windowWillResize): Remove gsextra.  Calculate extra as in
      updateFrameSize.
      (x_new_font): Don't change frame size if fullscreen.  Change
      size pixelwise.
      
      * nsterm.m (x_set_window_size): Remove fprintf.
      (init): Define always.  Set applicationDidFinishLaunchingCalled
      for GNUStep.
      (applicationDidFinishLaunching:): Set
      applicationDidFinishLaunchingCalled,
      (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
      not called.
      1bb2debd
  30. 02 Dec, 2013 1 commit
  31. 30 Nov, 2013 1 commit
    • Martin Rudalics's avatar
      Support resizing frames and windows pixelwise. · 880e6158
      Martin Rudalics authored
      * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
      ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
      (struct glyph_matrix): Replace window_left_col and
      window_top_line by window_pixel_left and window_pixel_top.
      (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): Minor
      rewrite.
      (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
      (draw_window_divider, move_it_to, x_draw_right_divider)
      (x_draw_bottom_divider, change_frame_size): Add or fix
      declarations.
      * dispnew.c (change_frame_size_1): Change prototype.
      (adjust_glyph_matrix, required_matrix_width)
      (adjust_frame_glyphs_for_window_redisplay): Use pixel
      values instead of lines and columns.
      (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
      WINDOW_TOTAL_FRINGE_WIDTH.
      (handle_window_change_signal, do_pending_window_change)
      (init_display): Adjusts calls of change_frame_size.
      (change_frame_size, change_frame_size_1): Handle pixelwise
      changes.
      * frame.c (Qright_divider_width, Qbottom_divider_width): New
      Lisp objects.
      (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
      (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
      (x_set_internal_border_width, x_set_vertical_scroll_bars)
      (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
      values.
      (set_frame_param): New function.
      (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
      (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
      (Ffringe_width, Fborder_width, Fright_divider_width)
      (Fbottom_divider_width): New functions, defsubr them.
      (Fset_frame_height, Fset_frame_width, Fset_frame_size): New
      argument pixelwise.
      (struct frame_parm_table): New members Qright_divider_width and
      Qbottom_divider_width.
      (x_set_frame_parameters): Handle parameters for pixelwise sizes.
      (x_report_frame_params): Handle Qright_divider_width and
      Qbottom_divider_width.
      (x_set_right_divider_width, x_set_bottom_divider_width): New
      functions.
      (frame_resize_pixelwise): New option.
      * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
      new_pixelwise, right_divider_width and bottom_divider_width;
      remove total_lines; rename text_lines, text_cols, new_text_lines
      and new_text_cols to text_height, text_width, new_height and
      new_width respectively.
      (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
      FRAME_TEXT_WIDTH respectively.
      (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
      (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
      (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH): New
      macros.
      (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
      (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
      (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
      (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
      (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
      (FRAME_TOTAL_COLS_ARG): Remove macro.
      * fringe.c (draw_fringe_bitmap_1): Handle right divder.
      * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
      (x_wm_set_size_hint): Handle frame pixel sizes.
      * indent.c (compute_motion, Fcompute_motion): Call
      window_body_width instead of window_body_cols.
      * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
      (make_lispy_position): Handle right and bottom dividers.
      (Fsuspend_emacs): Pixelize call of change_frame_size.
      * keyboard.h: Extern Qright_divider, Qbottom_divider.
      * lisp.h: Extern set_frame_param.
      * nsfns.m (x_set_tool_bar_lines): Pixelize call of
      x_set_window_size.
      (Fx_create_frame): Add entry for vertical_drag_cursor.  Pixelize
      call of change_frame_size.
      * nsterm.h (struct ns_output): Add vertical_drag_cursor.
      * nsterm.m (ns_update_window_end): Optionally draw right
      divider.
      (x_set_window_size): Add argument pixelwise.  Call
      check_frame_size and change_frame_size with pixelwise zero.
      (ns_draw_window_divider): New function.
      (ns_redisplay_interface): Add ns_draw_window_divider.
      (updateFrameSize:): Call change_frame_size with pixelwise zero.
      (x_new_font): Call x_set_window_size with pixelwise zero.
      * print.c (print_object): For a window print its sequence
      number again.
      * term.c (Fresume_tty): Pixelize call of change_frame_size.
      * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
      (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
      (w32_createwindow): Use scroll bar area width.
      (w32_wnd_proc): Handle bottom divider width.  For
      WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
      (Fx_create_frame): Default divider width parameters.  Caclulate
      sizes pixelwise.  Add vertical drag cursor support.
      (x_create_tip_frame): Default divider widths to zero.  Pixelize
      call to change_frame_size.
      (Fx_show_tip): Add handling of divider widths.  Pixelize window
      position and sizes.
      (Fw32_frame_rect): New function.
      (frame_parm_handler w32_frame_parm_handlers): Add divider
      widths.
      (Vx_window_vertical_drag_shape): Add variable.
      * w32inevt.c (resize_event, maybe_generate_resize_event):
      Pixelize change_frame_size calls.
      * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
      call.
      * w32term.c (w32_draw_window_divider): New function.
      (x_update_window_end): Handle right divider.
      (w32_draw_fringe_bitmap, x_scroll_run)
      (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
      (w32_read_socket): Handle SIZE_MAXIMIZED separately.  Calculate
      new frame sizes pixelwise.
      (x_new_font): Pixelize call to x_set_window_size.
      (x_check_fullscreen): Pixelize call to change_frame_size.
      (x_set_window_size_1, x_set_window_size): New argument
      pixelwise.  Calculate pixelwise.
      (x_wm_set_size_hint): Use scroll bar area width.
      (w32_redisplay_interface): Add w32_draw_window_divider.
      * w32term.h (struct w32_output): Add vertical drag cursor.
      * widget.c (set_frame_size, update_wm_hints)
      (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
      change_frame_size.
      (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
      * window.c (sequence_number): Restore.
      (Fwindow_pixel_width, Fwindow_pixel_height)
      (Fwindow_mode_line_height, Fwindow_header_line_height)
      (window_pixel_to_total, Frun_window_scroll_functions)
      (Fset_window_new_pixel, window_resize_apply_total)
      (Fwindow_resize_apply_total): New functions.
      (window_body_height, window_body_width): Rename from
      window_body_lines.  New argument PIXELWISE.  Calculate
      pixelwise.
      (Fwindow_body_height, Fwindow_body_width): New argument
      PIXELWISE.
      (coordinates_in_window, window_relative_x_coord): Use window's
      pixel width instead of total width.
      (replace_window, recombine_windows): Initialize pixel values.
      (resize_root_window, resize_frame_windows, grow_mini_window)
      (shrink_mini_window): New argument PIXELWISE.  Calculate
      pixelwise.
      (Fdelete_other_windows_internal, adjust_window_margins)
      (window_resize_check, window_resize_apply)
      (Fdelete_window_internal, Fresize_mini_window_internal)
      (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
      (check_frame_size): Rename arguments.  New argument PIXELWISE.
      Calculate pixelwise.
      (set_window_buffer): Make samebuf bool.  Run configuration change
      hook only if buffer changed.
      (Fset_window_buffer): Rewrite doc-string.
      (make_window): Initialize new_pixel slot.
      (Fwindow_resize_apply): Check pixel size of root window.
      (Fsplit_window_internal): Call 2nd argument pixel_size.
      Calculate pixelwise.
      (Fscroll_left, Fscroll_right): Call window_body_width instead of
      window_body_cols.
      (save_window_data): New slots frame_text_width,
      frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
      (saved_window): New slots pixel_left, pixel_top, pixel_height,
      pixel_width.
      (Fcurrent_window_configuration, Fset_window_configuration)
      (save_window_save, compare_window_configurations): Handle new
      slots in save_window_data and saved_window.
      (Fset_window_scroll_bars): Fix doc-string.
      (window_resize_pixelwise): New variable.
      (coordinates_in_window, Fcoordinates_in_window_p): Handle
      dividers.
      (make_parent_window): Adjust sequence_number.
      (Fwindow_right_divider_width, Fwindow_bottom_divider_width): New
      functions.
      * window.h (struct window): New members new_pixel, pixel_left,
      pixel_top, pixel_width, pixel_height.  Restore sequence_number.
      (wset_new_pixel): New function.
      (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
      (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
      (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
      (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
      (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
      (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
      (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
      (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
      (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
      (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
      (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
      (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
      (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
      (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
      (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
      Rewrite.
      (resize_frame_windows, grow_mini_window, shrink_mini_window)
      (window_body_width, check_frame_size): Adapt external declarations.
      * xdisp.c (last_max_ascent): New integer.
      (window_text_bottom_y): Handle bottom divider.
      (window_box_width, window_box_height): Calculate pixelwise.
      (get_glyph_string_clip_rects): Handle right divider.
      (remember_mouse_glyph): When windows are resized pixelwise
      proceed with width and height set to 1.
      (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
      WINDOW_TOTAL_WIDTH.
      (move_it_to): Calculate and return maximum x position
      encountered.
      (Fwindow_text_pixel_size): New function.
      (resize_mini_window, update_tool_bar): Calculate pixelwise.
      (tool_bar_lines_needed): Rename to tool_bar_height.  Calculate
      pixelwise.
      (Ftool_bar_lines_needed): Rename to Ftool_bar_height.  Calculate
      pixelwise.
      (redisplay_tool_bar): Calculate pixelwise.
      (redisplay_window): Calculate pixelwise.  Handle dividers.
      (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
      (x_draw_vertical_border): Handle dividers.
      (define_frame_cursor1): Handle vertical drag cursor.
      (x_draw_right_divider, x_draw_bottom_divider): New functions.
      (expose_window): Calculate pixelwise.  Handle dividers.
      (init_xdisp): Initialize pixel values.
      * xfaces.c (Qwindow_divider): New face.
      (realize_basic_faces): Realize it.
      * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
      (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
      (x_set_scroll_bar_default_width): Default actual width to 16.
      (Fx_create_frame): Set sizes pixelwise.
      (x_create_tip_frame): Default divider widths to zero.  Pixelize
      call of change_frame_size.
      (Fx_show_tip): Handle divider widths.  Initial pixel position
      and sizes.
      (frame_parm_handler x_frame_parm_handlers): Add divider widths.
      (Vx_window_vertical_drag_shape): New option.
      * xmenu.c (free_frame_menubar): Pixelize call of
      x_set_window_size.
      * xterm.c (x_draw_window_divider): New function.
      (x_update_window_end): Optionally draw right divider.
      (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
      (XTset_vertical_scroll_bar): Use scroll bar pixel width.
      (handle_one_xevent, x_new_font): Calculate pixelwise.
      (x_set_window_size_1, x_set_window_size): New argument
      pixelwise.  Calculate pixelwise.
      (x_wm_set_size_hint): Pixelize call of check_frame_size.
      (struct x_redisplay_interface): Add x_draw_window_divider.
      * xterm.h (struct x_output): Add vertical_drag_cursor.
      
      * cus-start.el (frame-resize-pixelwise)
      (window-resize-pixelwise): New entries.
      * emacs-lisp/debug.el (debug): Use window-total-height instead
      of window-total-size.
      * frame.el (tool-bar-lines-needed): Defalias to tool-bar-height.
      * help.el (describe-bindings-internal): Call help-buffer
      (temp-buffer-max-width): New option.
      (resize-temp-buffer-window, help-window-setup)
      (with-help-window): Rewrite.
      * mouse.el (mouse-drag-line): Rewrite.  Add key bindings for
      dragging dividers.
      * window.el (frame-char-size, window-min-pixel-height)
      (window-safe-min-pixel-height, window-safe-min-pixel-width)
      (window-min-pixel-width, window-safe-min-pixel-size)
      (window-combination-p, window-safe-min-size)
      (window-resizable-p, window--size-to-pixel)
      (window--pixel-to-size, window--resize-apply-p): New functions.
      (window-safe-min-height): Fix doc-string.
      (window-size, window-min-size, window--min-size-1)
      (window-sizable, window-sizable-p, window--min-delta-1)
      (window-min-delta, window--max-delta-1, window-max-delta)
      (window--resizable, window--resizable-p, window-resizable)
      (window-full-height-p, window-full-width-p, window-at-side-p)
      (window--in-direction-2, window-in-direction)
      (window--resize-reset-1, window--resize-mini-window)
      (window-resize, window-resize-no-error)
      (window--resize-child-windows-normal)
      (window--resize-child-windows, window--resize-siblings)
      (window--resize-this-window, window--resize-root-window)
      (window--resize-root-window-vertically)
      (adjust-window-trailing-edge, enlarge-window, shrink-window)
      (maximize-window, minimize-window, delete-window)
      (quit-restore-window, window-split-min-size, split-window)
      (balance-windows-2, balance-windows)
      (balance-windows-area-adjust, balance-windows-area)
      (window--state-get-1, window-state-get, window--state-put-1)
      (window--state-put-2, window-state-put)
      (display-buffer-record-window, window--display-buffer): Make
      functions handle pixelwise sizing of windows.
      (display-buffer--action-function-custom-type)
      (display-buffer-fallback-action): Add
      display-buffer-in-previous-window.
      (display-buffer-use-some-window): Resize window to height it had
      before.
      (fit-window-to-buffer-horizontally): New option.
      (fit-frame-to-buffer): Describe new values.
      (fit-frame-to-buffer-bottom-margin): Replace with
      fit-frame-to-buffer-margins.
      (window--sanitize-margin): New function.
      (fit-frame-to-buffer, fit-window-to-buffer): Rewrite completely
      using window-text-pixel-size.
      880e6158
  32. 04 Nov, 2013 1 commit
    • Jan Djärv's avatar
      Fix memory leaks in NS version. · c8b09927
      Jan Djärv authored
      * src/macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
      (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
      (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
      
      * src/nsfns.m (Fx_create_frame): Fix memory leak.
      
      * src/nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
      OSX >= 10.9.
      
      * src/nsterm.m (init, run, stop:): New methods in EmacsApp for
      OSX >= 10.9 to prevent memory leak of GCD dispatch source.
      c8b09927
  33. 18 Oct, 2013 1 commit
    • Dmitry Antipov's avatar
      Remove port-specific display name lists to avoid extra · d141d701
      Dmitry Antipov authored
      complexity and data duplication with display info lists.
      * xterm.h (x_display_name_list): Remove declaration.
      * xterm.c (x_display_name_list): Remove.
      (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
      * xfns.c (x_display_info_for_name, Fx_display_list):
      Likewise.  Use x_display_list where appropriate.
      * w32term.h (w32_display_name_list): Remove declaration.
      * w32term.c (w32_display_name_list): Remove.
      (w32_initialize_display_info, x_delete_display, syms_of_w32term):
      Adjust users.
      * w32fns.c (x_display_info_for_name, Fx_display_list):
      Likewise.  Use x_display_list where appropriate.
      * nsterm.h (ns_display_name_list): Remove declaration.
      * nsterm.m (ns_display_name_list): Remove.
      (ns_term_init, syms_of_nsterm): Adjust users.
      * nsfns.m (ns_display_info_for_name, Fx_display_list):
      Likewise.  Use x_display_list where appropriate.
      * termhooks.h (TERMINAL_FONT_CACHE): New macro.
      * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
      (mark_terminals): Mark per-terminal font cache.
      d141d701
  34. 15 Oct, 2013 1 commit
  35. 29 Sep, 2013 1 commit
  36. 28 Sep, 2013 1 commit
    • Jan Djärv's avatar
      Pick up default selection color on OSX when user defaults are not set. · 1610938f
      Jan Djärv authored
      * lisp/faces.el (region): Change ns_selection_color to
      ns_selection_fg_color, add ns_selection_bg_color.
      
      * src/nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Renamed from
      NS_SELECTION_COLOR_DEFAULT.
      (NS_SELECTION_FG_COLOR_DEFAULT): New.
      
      * src/nsterm.m (ns_selection_color): Remove.
      (ns_get_color): Check for ns_selection_(fg|bg)_color using
      NSColor selectedText(Background)Color.  Only for COCOA.
      (ns_term_init): Remove assignment of ns_selection_color, logic
      moved to ns_get_color.
      1610938f