1. 14 Nov, 2015 3 commits
    • Dmitry Gutov's avatar
      ; Fix warnings · 138ad3d9
      Dmitry Gutov authored
      * lisp/vc/diff-mode.el (diff-kill-applied-hunks):
      Fix unused variable warnings.
      138ad3d9
    • Dmitry Gutov's avatar
      7126e9a4
    • Dmitry Gutov's avatar
      Use generic dispatch for xref backends · 246d6605
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-backend-functions):
      New variable.
      (xref-find-function): Remove.
      (xref-find-backend)
      (xref--etags-backend): New functions.
      (xref-identifier-at-point-function)
      (xref-identifier-completion-table-function): Remove.
      (xref-backend-definitions, xref-backend-references)
      (xref-backend-apropos, xref-backend-identifier-at-point)
      (xref-backend-identifier-completion-table):
      New generic functions.
      
      * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add
      `elisp--xref-backend' to the beginning of
      `xref-backend-functions', locally.  Delete references to
      removed functions and vars.
      (elisp-xref-find): Remove.
      (elisp--xref-backend): New function.
      (elisp--xref-find-references, elisp--xref-find-apropos)
      (elisp--xref-identifier-completion-table):
      Turn into appropriately named generic methods.
      
      * lisp/progmodes/etags.el (etags-xref-find): Remove.
      (xref-backend-identifier-completion-table)
      (xref-backend-references, xref-backend-definitions)
      (xref-backend-apropos): New generic methods.
      246d6605
  2. 13 Nov, 2015 19 commits
    • Juri Linkov's avatar
      Support rectangular regions for more commands · 31f6e939
      Juri Linkov authored
      * lisp/simple.el (region-extract-function): Handle the arg value ‘bounds’.
      (region-insert-function): New function.
      (shell-command-on-region): Add arg ‘region-noncontiguous-p’.
      If non-nil, operate on multiple chunks.
      (region-noncontiguous-p): New function.
      
      * lisp/rect.el: Add function rectangle--insert-region
      around region-insert-function.
      (extract-rectangle-bounds): New function.
      (rectangle--extract-region): Handle the arg value ‘bounds’.
      (rectangle--insert-region): New function.
      
      * lisp/emulation/cua-rect.el: Add function cua--insert-rectangle
      around region-insert-function.
      (cua--extract-rectangle-bounds): New function.
      (cua--rectangle-region-extract): Handle the arg value ‘bounds’.
      
      * lisp/replace.el (query-replace, query-replace-regexp): Add arg
      ‘region-noncontiguous-p’.  Use ‘use-region-p’.
      (query-replace-regexp-eval, map-query-replace-regexp)
      (replace-string, replace-regexp): Use ‘use-region-p’.
      (keep-lines, flush-lines, how-many): Use ‘use-region-p’.
      (perform-replace): Add arg ‘region-noncontiguous-p’.
      If non-nil, operate on multiple chunks.
      
      * src/casefiddle.c (Fdowncase_region): Add arg ‘region-noncontiguous-p’.
      If non-nil, operate on multiple chunks. (Bug#19829)
      31f6e939
    • Dmitry Gutov's avatar
      Handle multiple matches on the same line; add highlighting · f103a277
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-location-marker): Interpret the
      column value in characters.
      (xref--collect-matches): Rename from `xref--collect-match'.
      Search for all matches in the hit line.  Add `highlight' face to
      the matched region in the summary.  Update both callers.
      f103a277
    • Dmitry Gutov's avatar
      Replace xref-match-bounds with xref-match-length · fe973fc2
      Dmitry Gutov authored
      Relying on xref-location-marker to point to the beginning of the match
      
      * lisp/progmodes/xref.el (xref-match-bounds): Remove.
      (xref-match-length): Add.
      (xref-make-match): Change the arguments.
      (xref--match-buffer-bounds): Remove.
      (xref-match-item): Store length, instead of end-column.
      (xref-pulse-momentarily)
      (xref--collect-match)
      (xref--query-replace-1): Update accordingly.
      (xref-query-replace): Ditto.  And check that the search results
      are up-to-date.
      fe973fc2
    • Paul Eggert's avatar
      Merge from gnulib · 92a50102
      Paul Eggert authored
      This incorporates:
      2015-11-13 xalloc-oversized: improve performance with GCC 5
      * lib/xalloc-oversized.h: Copy from gnulib.
      92a50102
    • Paul Eggert's avatar
      Spruce up ftfont.c memory allocation · 04ac097f
      Paul Eggert authored
      * src/ftfont.c (setup_otf_gstring):
      Avoid O(N**2) behavior when reallocating.
      (ftfont_shape_by_flt): Prefer xpalloc to xrealloc when
      reallocating buffers; this simplifies the code.  Do not trust
      mflt_run to leave the output areas unchanged on failure, as
      this isn’t part of its interface spec.
      04ac097f
    • Paul Eggert's avatar
      Port recent XCB changes to 64-bit ‘long int’ · 4c4b5205
      Paul Eggert authored
      For historical reasons, libX11 represents 32-bit values like Atoms as
      ‘long int’ even on platforms where ‘long int’ is 64 bits.  XCB doesn’t
      do that, so adapt the recent XCB code to behave properly on 64-bit
      platforms.  Also, fix what appears to be a bug in the interpretation
      of xcb_get_property_value_length, at least on my Fedora platform
      which is running libxcb-1.11-5.fc21.
      * src/xfns.c (x_real_pos_and_offsets):
      * src/xterm.c (get_current_wm_state):
      xcb_get_property_value_length returns a byte count, not a word count.
      For 32-bit quantities, xcb_get_property_value returns a vector
      of 32-bit words, not of (possibly 64-bit) long int.
      4c4b5205
    • Paul Eggert's avatar
      4f0ce9c8
    • Eli Zaretskii's avatar
      Remove support for ':timeout' from w32 tray notifications · 695a6f93
      Eli Zaretskii authored
      * src/w32fns.c (Fw32_notification_notify): Delete the code that
      supports ':timeout'.
      (syms_of_w32fns): Don't DEFSYM ':timeout'.  This avoids clashes
      with dbusbind.c when D-Bus is compiled in.
      
      * doc/lispref/os.texi (Desktop Notifications): Don't mention
      ':timeout'.
      695a6f93
    • Juanma Barranquero's avatar
      * test/automated/simple-test.el: Add test for bug#20698 (bug#21885) · a731c2f1
      Juanma Barranquero authored
      (simple-test--transpositions): New macro.
      (simple-transpose-subr): New test.
      a731c2f1
    • Juanma Barranquero's avatar
    • Juanma Barranquero's avatar
      * src/undo.c: Small fixes for previous change · 66b9f7bd
      Juanma Barranquero authored
      (run_undoable_change): Mark void argument list.
      (record_property_change): Remove unused variable `boundary'.
      66b9f7bd
    • Eli Zaretskii's avatar
      Add a few more variables to redisplay--variables · 2fac30eb
      Eli Zaretskii authored
      * lisp/frame.el (redisplay--variables): Add bidi-paragraph-direction
      and bidi-display-reordering to the list.
      2fac30eb
    • Eli Zaretskii's avatar
    • Eli Barzilay's avatar
      Fix point positioning after transposing with negative arg · e221d32d
      Eli Barzilay authored
      * lisp/simple.el (transpose-subr): When invoked with a negative
      argument, move point to after the transposed text, like we do
      when invoked with a positive argument.  (Bug#21885)
      e221d32d
    • Eli Zaretskii's avatar
      Fix last change in shr.el · 35f5afbc
      Eli Zaretskii authored
      * lisp/net/shr.el (shr--have-one-fringe-p): Rename from
      have-fringes-p.  All callers changed.  Doc fix.  (Bug#21895)
      35f5afbc
    • Eli Zaretskii's avatar
      Fix last change · 508e77b7
      Eli Zaretskii authored
      * src/w32fns.c (syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]:
      Don't DEFSYM tray notification symbols if D-Bus is being used.
      508e77b7
    • Eli Zaretskii's avatar
      Another fix for MinGW64 and Cygwin builds due to notifications · d60ed3f3
      Eli Zaretskii authored
      * src/w32fns.c: Ifdef away tray notification code if D-Bus is
      being compiled into Emacs.
      (syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]: Don't defsubr
      Sw32_notification_notify and Sw32_notification_close if the code
      is not compiled.  Reported by Andy Moreton <andrewjmoreton@gmail.com>.
      d60ed3f3
    • YAMAMOTO Mitsuharu's avatar
      Remove intern calls and XXX comments from Fx_export_frames · 805a39bc
      YAMAMOTO Mitsuharu authored
      * src/xfns.c (Fx_export_frames): Use Qpdf, Qpng, Qpostscript, and
      Qsvg instead of intern calls.  Use "postscript" instead of "ps"
      for consistency with image types.  Remove XXX comments.
      (syms_of_xfns) <Qpdf>: DEFSYM it.
      805a39bc
    • Eric Hanchrow's avatar
      shr: don't invoke unbound function (Bug#21895) · 9463abf4
      Eric Hanchrow authored
      * lisp/net/shr.el (have-fringes-p): New function.
        (shr-insert-document, shr-fill-text): Use it.
      9463abf4
  3. 12 Nov, 2015 16 commits
    • Juanma Barranquero's avatar
      * test/automated/keymaps-test.el: Fix test to make it repeatable · 6e5186e8
      Juanma Barranquero authored
      (keymap-store_in_keymap-FASTINT-on-nonchars): Reset Buffer-menu-mode-map
      entry to its initial value to make the test repeatable in interactive
      sessions (assuming it doesn't fail and crashes Emacs, of course).
      6e5186e8
    • Artur Malabarba's avatar
    • Phillip Lord's avatar
      : Tests for undo-auto functionality. · 39dbd1cd
      Phillip Lord authored
      39dbd1cd
    • Phillip Lord's avatar
      ; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change' · 20aa42e8
      Phillip Lord authored
      Conflicts:
      	src/cmds.c
      	src/keyboard.c
      20aa42e8
    • Phillip Lord's avatar
      The heuristic that Emacs uses to add an `undo-boundary' has been · 44dfa86b
      Phillip Lord authored
      reworked, as it interacts poorly with functions on `post-command-hook'
      or `after-change-functions'.
      
      * lisp/simple.el: New section added.
      * src/cmds.c (remove_excessive_undo_boundaries): Now in lisp.
      (self_insert_command): Calls simple.el to amalgamate.
      (delete_char): Calls simple.el to amalgamate.
      * src/keyboard.c (last_undo_boundary): Removed.
      * src/undo.c (run_undoable_change): New function.
      44dfa86b
    • Juri Linkov's avatar
      Bind [?\S-\ ] to previous line command in Dired-like modes. · d2f73db5
      Juri Linkov authored
      * lisp/arc-mode.el (archive-mode-map):
      * lisp/dired.el (dired-mode-map):
      * lisp/proced.el (proced-mode-map):
      * lisp/vc/vc-dir.el (vc-dir-mode-map):
      Bind [?\S-\ ] to previous line command.
      (Bug#20790)
      d2f73db5
    • Eli Zaretskii's avatar
      Fix the MinGW64 and Cygwin-w32 builds · c1bc6e5d
      Eli Zaretskii authored
      * src/w32fns.c (MYNOTIFYICONDATAW_V1_SIZE)
      (MYNOTIFYICONDATAW_V2_SIZE, MYNOTIFYICONDATAW_V3_SIZE): Define and
      use instead of the corresponding NOTIFYICONDATAW_Vn_SIZE macros,
      which cause trouble with MinGW42 headers.  Ifdef away tray
      notifications code for Cygwin.  Reported by Andy Moreton
      <andrewjmoreton@gmail.com>.
      c1bc6e5d
    • Simen Heggestøyl's avatar
      Enable sorting of JSON object keys when encoding · 1e363a8e
      Simen Heggestøyl authored
      * lisp/json.el (json-encoding-object-sort-predicate): New variable for
      specifying a sorting predicate for JSON objects during encoding.
      (json--plist-to-alist): New utility function.
      (json-encode-hash-table): Re-use `json-encode-alist' when object keys
      are to be sorted.
      (json-encode-alist): Sort output by
      `json-encoding-object-sort-predicate, when set.
      (json-encode-plist): Re-use `json-encode-alist' when object keys are
      to be sorted.
      (json-pretty-print-buffer-ordered): New command to pretty print the
      buffer with object keys sorted alphabetically.
      (json-pretty-print-ordered): New command to pretty print the region with
      object keys sorted alphabetically.
      
      * test/automated/json-tests.el (test-json-plist-to-alist)
      (test-json-encode-plist, test-json-encode-hash-table)
      (test-json-encode-alist-with-sort-predicate)
      (test-json-encode-plist-with-sort-predicate): New tests.
      
      * etc/NEWS: Add an entry for the new commands.
      1e363a8e
    • Juanma Barranquero's avatar
      9dd7da99
    • Ken Raeburn's avatar
      Speed up x_real_pos_and_offsets using XCB · aa17de90
      Ken Raeburn authored
      * src/xfns.c (x_real_pos_and_offsets) [USE_XCB]: Add XCB flavors of
      all X calls, and pipeline requests when possible, collecting results
      later.  Eliminate use of x_catch_errors (and thus XSync) in XCB case.
      aa17de90
    • Ken Raeburn's avatar
      Enable use of XCB for checking window manager state · a838c833
      Ken Raeburn authored
      * src/xterm.c (get_current_wm_state) [USE_XCB]: Use XCB calls instead
      of XGetWindowProperty plus error-catching, since we can explicitly
      check for errors in the XCB version.  This eliminates 3 XSync calls on
      top of the round-trip actually fetching the information.
      a838c833
    • Ken Raeburn's avatar
      Detect XCB and save a connection handle · c7f2b6ad
      Ken Raeburn authored
      * configure.ac: If using X11, check for XCB libraries and header.
      * src/Makefile.in (XCB_LIBS): Define.
      (LIBX_EXTRA): Include it.
      
      * src/xterm.h [USE_XCB]: Include X11/Xlib-xcb.h.
      (struct x_display_info) [USE_XCB]: Add an XCB connection handle field.
      * src/xterm.c (x_term_init) [USE_XCB]: Initialize the new field.
      c7f2b6ad
    • Ken Raeburn's avatar
      Reduce some data dependencies between X calls · e1c27dbd
      Ken Raeburn authored
      Gains nothing in the traditional-Xlib code, but more closely aligns
      with how the XCB version will work.
      
      * src/xfns.c (x_real_pos_and_offsets): When translating coordinates,
      send coordinates (0,0) to the X server and add in the real coordinates
      after getting the response.  Move XGetGeometry for outer window inside
      error-trapping block.  Use DPY variable more, since it's available.
      e1c27dbd
    • Ken Raeburn's avatar
      Use color cache for creating bitmap · 25e32bd8
      Ken Raeburn authored
      * src/image.c (x_create_bitmap_from_xpm_data) [ALLOC_XPM_COLORS]: Set
      attributes to use the caching color allocator.  Initialize and free
      the cache.
      25e32bd8
    • Eli Barzilay's avatar
      Add "^" to the interactive specs of `dired-next/previous-line' · 851be0f6
      Eli Barzilay authored
      * lisp/dired.el (dired-next-line, dired-previous-line): It makes sense
      to bind these commands to the arrow keys, and that means that they work
      better with a "^" in the `interactive' declaration so selection works
      as expected.
      851be0f6
    • Thomas Fitzsimmons's avatar
      Sync with soap-client repository, version 3.0.2 · 055ca3a5
      Thomas Fitzsimmons authored
      * soap-client.el: Bump version to 3.0.2.
      
      * soap-client.el (soap-warning): Use format, not format-message.
      
      * soap-client.el: Add cl-lib to Package-Requires.  Require cl-lib.
      (soap-validate-xs-simple-type): Use cl-labels instead of cl-flet.
      
      * soap-client.el: Support Emacs versions that do not have
      define-error.
      
      * soap-inspect.el: Remove version header.
      
      * soap-client.el, soap-inspect.el, jira2.el: Fix first line header
      format.
      055ca3a5
  4. 11 Nov, 2015 2 commits
    • Alan Mackenzie's avatar
      CC Mode: Respect users' settings of open-paren-in-column-0-is-defun-start. · e0f64e7b
      Alan Mackenzie authored
      lisp/progmodes/cc-engine.el (c-backward-single-comment, c-backward-comments)
      (c-invalidate-state-cache-1, c-parse-state-1, c-guess-basic-syntax):
      remove bindings of open-paren-in-column-0-is-defun-start to nil.
      (c-get-fallback-scan-pos): "New" function (existed several years ago).
      (c-parse-state-get-strategy): Reintroduce the 'BOD strategy, using
      c-get-fallback-scan-pos.
      (c-parse-state-1): Handle 'BOD strategy.
      
      lisp/progmodes/cc-mode.el (c-before-change, c-after-change)
      c-font-lock-fontify-region): remove bindings of
      open-paren-in-column-0-is-defun-start to nil.
      
      cc-mode.texi (Performance Issues, Limitations and Known Bugs): Fix mix up
      between @chapter and @appendix.
      e0f64e7b
    • Artur Malabarba's avatar
      * lisp/obarray.el: Fix shadowed variables · 952395d3
      Artur Malabarba authored
      (obarray-map, obarray-remove, obarray-put, obarray-get):
      Change OBARRAY arg to OB to avoid shadowing ‘obarray’.
      952395d3