1. 10 Jul, 2012 1 commit
    • Glenn Morris's avatar
      Stop ns builds setting the EMACSLOADPATH environment variable · 9e059e3f
      Glenn Morris authored
      Ref bugs 4309, 6401, etc.
      This is the last environment variable (ab)used by the ns port in this way.
      
      * src/nsterm.m (ns_load_path): Rename from ns_init_paths.
      Now it does not set EMACSLOADPATH, just returns the load-path string.
      * src/nsterm.h: Update accordingly.
      
      * src/lread.c [HAVE_NS]: Include nsterm.h.
      (init_lread) [HAVE_NS]: Use ns_load_path.
      
      * src/emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
      9e059e3f
  2. 09 Jul, 2012 3 commits
  3. 06 Jul, 2012 1 commit
  4. 05 Jul, 2012 1 commit
    • Paul Eggert's avatar
      More xmalloc and related cleanup. · 38182d90
      Paul Eggert authored
      * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
      * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
      * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
      * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
      * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
      * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
      * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
      * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
      * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
      * xterm.c:
      Omit needless casts involving void * pointers and allocation.
      Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
      as the former is more robust if P's type is changed.
      Prefer xzalloc to xmalloc + memset 0.
      Simplify malloc-or-realloc to realloc.
      Don't worry about xmalloc returning a null pointer.
      Prefer xstrdup to xmalloc + strcpy.
      * editfns.c (Fmessage_box): Grow message_text by at least 80 when
      growing it.
      * keyboard.c (apply_modifiers_uncached): Prefer local array to
      alloca of a constant.
      38182d90
  5. 30 Jun, 2012 1 commit
  6. 29 Jun, 2012 1 commit
  7. 22 Jun, 2012 1 commit
  8. 17 Jun, 2012 1 commit
    • Alp Aker's avatar
      Implement wave-style variant of underlining. · 9b0e3eba
      Alp Aker authored
        * doc/lispref/display.texi: Document new face attribute.
        * lisp/cus-face.el (custom-face-attributes): Add wave-style underline
        attribute.
        * lisp/faces.el (set-face-attribute): Update docstring.
        * src/dispextern.h (face_underline_type): New enum.
        (face): Add field for underline type.
        * src/nsterm.m (ns_draw_underwave): New function.
        (ns_draw_text_decoration): Use it.
        * src/w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
        New functions.
        (x_draw_glyph_string): Use them.
        * src/xfaces.c (Qline, Qwave): New Lisp objects.
        (check_lface_attrs, merge_face_ref)
        (Finternal_set_lisp_face_attribute, realize_x_face): Handle
        wave-style underline face attributes.
        * src/xterm.c (x_draw_underwave): New function.
        (x_draw_glyph_string): Use it.
      9b0e3eba
  9. 11 Jun, 2012 1 commit
  10. 26 May, 2012 1 commit
  11. 14 May, 2012 2 commits
  12. 09 Apr, 2012 1 commit
  13. 04 Feb, 2012 1 commit
  14. 02 Feb, 2012 1 commit
    • Glenn Morris's avatar
      Native scroll-bars are not implemented for Nextstep (bug#10673) · 44f92739
      Glenn Morris authored
      * configure.in [HAVE_NS]: Error if use --without-toolkit-scroll-bars.
      
      * src/nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
      Unconditionally set to t.
      
      * src/nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
      * src/w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
      * src/xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
      44f92739
  15. 31 Jan, 2012 1 commit
    • Glenn Morris's avatar
      x-toolkit-scroll-bars doc fix. · 97897668
      Glenn Morris authored
      * src/nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
      * src/xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
      97897668
  16. 11 Jan, 2012 1 commit
  17. 05 Jan, 2012 1 commit
  18. 21 Dec, 2011 1 commit
    • Jan Djärv's avatar
      Fix biggest memory leaks in NS-port. More remain. · 204ee57f
      Jan Djärv authored
      * emacs.c (ns_pool): New variable.
      (main): Assign ns_pool.
      (Fkill_emacs): Call ns_release_autorelease_pool.
      
      * nsfns.m (x_set_background_color): Assign return value from
      ns_index_color to face-background instead of NSColor*.
      (ns_implicitly_set_icon_type): Fix indentation.
      Change assignment in for loop to comparison.
      
      * nsfont.m (ns_spec_to_descriptor): Fix indentation,
      autorelease fdesc, release fdAttrs and tdict.
      (ns_get_covering_families): Release charset.
      (ns_findfonts): Release NSFontDescriptor created with new.
      (ns_uni_to_glyphs): Fix indentation.
      (setString): Release attrStr before assigning new value.
      
      * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
      before returning.
      
      * nsterm.m (x_free_frame_resources): Release
      f->output_data.ns->miniimage
      (ns_index_color): Fix indentation.  Do not retain
      color_table->colors[i].
      204ee57f
  19. 18 Dec, 2011 1 commit
    • Jan Djärv's avatar
      Adapt code from AquaEmacs to handle occasional blank menus. · 5fecd5fc
      Jan Djärv authored
      * nsmenu.m (trackingMenu): New variable.
      (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5 and
      NS_IMPL_COCOA.
      (trackingNotification): New method (from AquaEmacs).
      (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
      from AquaEmacs.
      (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
      
      * nsterm.m (ns_term_init): Subscribe for notifications
      NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
      to method trackingNotification in EmacsMenu.
      
      Fixes: debbugs:7030
      5fecd5fc
  20. 10 Dec, 2011 1 commit
    • Jan Djärv's avatar
      Don't crash on bad user input. · f7dfe5d6
      Jan Djärv authored
      * nsfns.m (ns_get_defaults_value): New function.
      (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
      
      * nsterm.h (ns_get_defaults_value): Declare.
      
      * nsterm.m (ns_default): Call ns_get_defaults_value.
      
      Fixes: debbugs:10103
      f7dfe5d6
  21. 05 Dec, 2011 1 commit
  22. 27 Nov, 2011 1 commit
  23. 23 Nov, 2011 1 commit
  24. 15 Nov, 2011 1 commit
  25. 14 Nov, 2011 1 commit
  26. 05 Nov, 2011 1 commit
    • Jan Djärv's avatar
      * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG. · a97f8f3f
      Jan Djärv authored
      (unwind_create_frame): New function.
      (Fx_create_frame): Restructure code to be more similar to the one in
      xfns.c.  Call record_unwind_protect with unwind_create_frame (Bug#9943).
      Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
      Move terminal->reference_count++ just before making the frame official
      (Bug#9943).
      
      * nsterm.m (x_free_frame_resources): New function.
      (x_destroy_window): Move code to x_free_frame_resources.
      a97f8f3f
  27. 30 Sep, 2011 1 commit
  28. 29 Aug, 2011 1 commit
  29. 14 Aug, 2011 1 commit
    • Jan Djärv's avatar
      Fix that executing applescript may hang emacs uninterruptedly. · 08e3161a
      Jan Djärv authored
      * nsfns.m (as_script, as_result, as_status): New static variables.
      (ns_run_ascript): New function.
      (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
      event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
      the event loop.  Get status from as_status.
      
      * nsterm.h (ns_run_ascript): Declare.
      (NSAPP_DATA2_RUNASSCRIPT): Define.
      
      * nsterm.m (sendEvent): If event is NSApplicationDefined and
      data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
      the event loop (Bug#7276).
      08e3161a
  30. 05 Aug, 2011 1 commit
  31. 29 Jul, 2011 1 commit
  32. 28 Jul, 2011 2 commits
    • Alp Aker's avatar
      Fix display artifacts from ns_dumpglyphs_stretch (Bug#8470). · bf3492a5
      Alp Aker authored
      * src/nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
      or scroll bar.
      bf3492a5
    • Alp Aker's avatar
      Implement strike-through and overline on NextStep (Bug#8863). · 4843aac3
      Alp Aker authored
      * src/nsfont.m (nsfont_open): Use underline position provided by font,
      instead of hard-coded value of 2.
      (nsfont_draw): Call ns_draw_text_decoration instead.
      
      * src/nsterm.h: Add declaration for ns_draw_text_decoration.
      
      * src/nsterm.m (ns_draw_text_decoration): New function for drawing
      underline, overline, and strike-through.
      (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
      ns_draw_text_decoration.  Change treatment of cursor drawing to
      accomodate underlining, etc.
      4843aac3
  33. 23 Jul, 2011 1 commit
  34. 08 Jul, 2011 3 commits
    • Jan Djärv's avatar
      Fix breakage introduced by fixing Bug#8842. · 3fe4b549
      Jan Djärv authored
      * nsfns.m (Fx_open_connection): Put NSStringPboardType into
      ns_return_type.
      
      * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
      in registerServicesMenuSendTypes.
      (validRequestorForSendType): Don't check ns_return_types.
      3fe4b549
    • Jan Djärv's avatar
      Fix warnings in ns*m files: Replace deprecated methods, declare new interfaces. · 4393663b
      Jan Djärv authored
      * emacs.c: Declare unexec_init_emacs_zone.
      
      * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
      to avoid warning.
      
      * nsimage.m (allocInitFromFile): Don't use deprecated method
      bestRepresentationForDevice on OSX >= 10.6.
      
      * nsmenu.m (fillWithWidgetValue): Don't use depercated method
      sizeToFit on OSX >= 10.2.
      
      * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
      cString and lossyCString on OSX >= 10.4
      
      * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
      (MAC_OS_X_VERSION_10_5): Define if not defined.
      (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
      (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
      (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
      
      * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
      variable firstTime not needed on OSX >= 10.6.
      (setPosition): setFloatValue:knobProportion: is deprecated on OSX
      >= 10.5.  Use setKnobProportion, setDoubleValue.
      4393663b
    • Jan Djärv's avatar
      Fix services menu empty on OSX 1.6+. · 699c10bd
      Jan Djärv authored
      * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
      ns_return_types.
      (Fns_list_services): Just return Qnil on 10.6, code not working there.
      
      * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
      on svcsMenu.
      
      * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
      
      * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
      (ns_get_local_selection): Declare.
      
      * nsterm.m (QUTF8_STRING): Declare.
      (initFrameFromEmacs): Call registerServicesMenuSendTypes.
      (validRequestorForSendType): Return type is (id).
      Change indexOfObjectIdenticalTo to indexOfObject.
      Check if we have local selection before returning self (Bug#8842).
      (writeSelectionToPasteboard): Put local selection into paste board
      if we have a local selection (Bug#8842).
      (syms_of_nsterm): DEFSYM QUTF8_STRING.
      699c10bd