1. 25 Jul, 2016 3 commits
    • Katsumi Yamaoka's avatar
      * lisp/gnus/mm-decode.el (mm-convert-shr-links): · 52052267
      Katsumi Yamaoka authored
      Preserve key bindings that shr adds (bug#23964).
    • Michal Nazarewicz's avatar
      Fix ‘[[🇨🇨]]*literal’ regex failing to match ‘literal’ (bug#24020) · 6dc6b007
      Michal Nazarewicz authored
      The regex engine tries to optimise Kleene star by avoiding backtracking
      when it can detect that star’s operand cannot match what follows it in
      the pattern.
      For example, when ‘[[:alpha:]]*1’ tries to match a ‘foo’, the engine
      will test the longest match for ‘[[:alpha:]]*’, namely ’foo’ which is
      the entire string.  Literal digit one still present in the pattern will
      however not match the remaining empty string.
      Normally, backtracking would be performed trying a shorter match for the
      character class (namely ‘fo’ leaving ‘o’ in the string), but since the
      engine knows whatever would be put back into the string cannot possibly
      match literal digit one so no backtracking will be attempted.
      In the regexes of the form ‘[[:CC:]]*X’, the optimisation can be applied
      if the character class CC does not match character X.  In the above
      example, this holds because digit one is not in alpha character class.
      This test is performed by mutually_exclusive_p function but it did not
      check class bits of a charset opcode.  This resulted in an assumption
      that character classes do not match multibyte characters.  For example,
      it would incorrectly conclude that [[:alpha:]] doesn’t match ‘ż’.
      This, in turn, led to the aforementioned Kleene star optimisation being
      incorrectly applied in patterns such as ‘[[:graph:]]*’ (which should
      match ‘’ but doesn’t as can be tested by executing
          (string-match-p "[[:graph:]]*" "")
      which should return 0 but instead yields nil.
      This issue affects any class witch matches multibyte characters, i.e.
      if ‘[[🇨🇨]]’ matches a multibyte character X then ‘[[🇨🇨]]*X’ will
      fail to match ‘X’.
      * src/regex.c (executing_charset): A new function for executing the
      charset and charset_not opcodes.  It performs check on the character
      taking into consideration existing bitmap, range table and class bits.
      It also advances the pointer in the regex bytecode past the parsed
      Code now included in executing_charset.
      (mutually_exclusive_p, re_match_2_internal): Changed to take advantage
      of executing_charset function.
      * test/src/regex-tests.el: New file with tests for the character class
    • NicolasPetton's avatar
      Fix auto-reverting image-mode buffer (bug#21598) · b176d169
      NicolasPetton authored
      When auto-reverting an image buffer, `image-mode' is not called since
      `revert-buffer' is called with `preserve-modes' set to non-nil.
      * lisp/image-mode.el (image-after-revert-hook): Check if there is an
      image display property for the current buffer before updating it.
  2. 24 Jul, 2016 2 commits
    • Paul Eggert's avatar
      ‘signal’ no longer returns · 50cc08bf
      Paul Eggert authored
      Although for decades ‘signal’ has been documented to not return,
      a corner case in the Lisp debugger causes ‘signal’ to return.
      Remove the corner case and adjust Emacs internals accordingly.
      An alternative would be to document the corner case, but this
      would complicate the Lisp API unnecessarily.  (Bug#24047)
      * src/eval.c (signal_or_quit): New function, with most of the
      old contents of Fsignal.
      (quit): New function, which uses signal_or_quit and which
      might return.  All keyboard-based callers of Fsignal (Qquit,
      Qnil) changed to use this new function instead.
      (Fsignal): Use signal_or_quit.  Now _Noreturn.  All callers
      (xsignal): Move to lisp.h.
      * src/lisp.h (xsignal): Now an inline function, as it's now
      just an alias for Fsignal.
    • Paul Eggert's avatar
      Require libgnutls unless --with-gnutls=no · 2c2b0cd0
      Paul Eggert authored
      * configure.ac: Report an error if the gnutls library is missing,
      unless --with-gnutls=no is specified.
  3. 23 Jul, 2016 2 commits
    • Alan Mackenzie's avatar
      Fontify C++ parameter packs. · 4d342102
      Alan Mackenzie authored
      This fixes debbugs #23610.
      * lisp/progmodes/cc-langs.el (c-pack-ops, c-pack-key): New
      (c-type-decl-prefix-key): Add "..." and "&&" into the C++ version.
      * lisp/progmodes/cc-engine.el (c-forward-type): Handle matches of c-pack-key.
    • Alan Mackenzie's avatar
      Java Mode: Handle strings as case labels correctly. · edcdf649
      Alan Mackenzie authored
      This fixes debbugs #23901.
      * lisp/progmodes/cc-langs.el (c-nonlabel-token-key): Remove "\"" from the
      Java value.
  4. 22 Jul, 2016 6 commits
    • Kaushal Modi's avatar
      Avoid repeated warnings while restoring desktop · 03f32876
      Kaushal Modi authored
      * lisp/desktop.el (desktop-restore-file-buffer): Do not print warnings
      when files are being opened during desktop restore.
    • Eli Zaretskii's avatar
      Fix compilation warning in the MinGW build · d0e1774a
      Eli Zaretskii authored
      * nt/inc/ms-w32.h: Include stdint.h.
      (_execvp, execve): Provide prototypes.
      * lib-src/emacsclient.c [WINDOWSNT]: Remove prototype for execvp,
      it is now in nt/inc/ms-w32.h.
      * lib-src/ntlib.c (getppid): Avoid compiler warnings due to format
      (sys_ctime): Remove, not used.
    • Lars Ingebrigtsen's avatar
      Move read-multiple-choice to subr-x.el · ad90397c
      Lars Ingebrigtsen authored
      * lisp/faces.el (read-multiple-choice-face): Fix doc string.
      * lisp/emacs-lisp/subr-x.el (read-multiple-choice): Move here
      from subr.el.
      * lisp/gnus/message.el (subr-x): Ditto.
      * lisp/net/nsm.el: Require subr-x for read-multiple-choice.
      read-multiple-choice doesn't need to be in the dumped Emacs, so move
      it to a less central file.
    • Tino Calancha's avatar
      Update define-ibuffer-op doc string · 431641a2
      Tino Calancha authored
      * lisp/ibuf-macs.el (define-ibuffer-op):
      Mention that BODY is evaluated with 'buf' bound to the actual
      marked buffer being processed.
    • Tino Calancha's avatar
      Update define-ibuffer-op doc string · c608f490
      Tino Calancha authored
      * lisp/ibuf-macs.el (define-ibuffer-op): Document arg COMPLEX
      instead of refer the reader to the source code.
      Document arg BODY.
    • Tino Calancha's avatar
      Fix shell-command[-on-region] doc strings · b13b728c
      Tino Calancha authored
      * lisp/simple.el (shell-command, shell-command-on-region):
      Drop the sentence saying that the command may delete the buffer
      '*Shell Command Output*': the command never delete such
      buffer (Bug#23936).
  5. 21 Jul, 2016 7 commits
  6. 20 Jul, 2016 6 commits
    • Paul Eggert's avatar
      Fix lifetime bug in tzlookup · 852111f3
      Paul Eggert authored
      * src/editfns.c (tzlookup): Fix storage lifetime bug when
      INTEGERP (zone) && settz.  Problem found by Coverity Scan.
    • Lars Ingebrigtsen's avatar
      Fix shr.el/image build problem · 90fb0b2d
      Lars Ingebrigtsen authored
      Fixes: bug#24035
      * lisp/net/shr.el: Require image, since some builds seem to
      break without it (bug#24035).
    • Ted Zlatanov's avatar
      Bring the Gnus Cloud package into working order. · 30b3a842
      Ted Zlatanov authored
      * lisp/gnus/gnus-sync.el: Removed in favor of gnus-cloud.el.
      * lisp/gnus/gnus-cloud.el: Autoload EPG functions. Change storage format to
      simplify non-file data.
      (gnus-cloud-storage-method): New defcustom to support nil, Base64,
      Base64+gzip, or EPG encoding on the Gnus Cloud IMAP server. Defaults to
      EPG if that's available, Base64+gzip otherwise.
      (gnus-cloud-interactive): New defcustom to make Gnus Cloud operations
      interactive, defaults to enabled.
      (gnus-cloud-group-name): New variable for the Gnus Cloud group name.
      (gnus-cloud-make-chunk): Tag with "Gnus-Cloud-Version" instead of just
      (gnus-cloud-insert-data): Simplify and support :newsrc-data entries.
      (gnus-cloud-encode-data, gnus-cloud-decode-data): Support various
      storage methods as per gnus-cloud-storage-method.
      (gnus-cloud-parse-chunk): Look for "Gnus-Cloud-Version" marker.
      (gnus-cloud-parse-version-1): Fix parsing loop bug. Handle :newsrc-data
      (gnus-cloud-update-all): Handle :newsrc-data entries and dispatch to
      file and data handlers.
      (gnus-cloud-update-newsrc-data): New function to handle :newrsc-data
      (gnus-cloud-update-file): Rework to support gnus-cloud-interactive and
      be more careful.
      (gnus-cloud-delete-file): Remove; merged into gnus-cloud-update-file.
      (gnus-cloud-file-covered-p, gnus-cloud-all-files)
      (gnus-cloud-files-to-upload, gnus-cloud-ensure-cloud-group)
      (gnus-cloud-add-timestamps, gnus-cloud-available-chunks)
      (gnus-cloud-prune-old-chunks): Fix indentation.
      (gnus-cloud-timestamp): New function to make a standard Gnus Cloud
      (gnus-cloud-file-new-p): Use it.
      (gnus-cloud-upload-all-data): Add interactive convenience function to
      upload all data.
      (gnus-cloud-upload-data): Make interactive; collect files and newsrc
      data separately; refresh Gnus Cloud group after insert.
      (gnus-cloud-download-all-data): Add interactive convenience function to
      download all data.
      (gnus-cloud-download-data): Rework to support "Gnus-Cloud-Version"
      marker and different storage methods.
      (gnus-cloud-host-server-p): New function to check if a server is the
      Gnus Cloud host.
      (gnus-cloud-collect-full-newsrc): Tag entries with :newsrc-data.
      (gnus-cloud-host-acceptable-method-p): New function so
      other code can check if a server method can host the Gnus cloud.
      (gnus-cloud-storage-method): Use 'radio instead of 'choice for better UI.
      (gnus-cloud-method): Make this a defcustom and note how to set it.
      * lisp/gnus/gnus-group.el (gnus-group-cloud-map): Add Gnus Cloud autoloaded
      keybindings under the `~' prefix.
      * lisp/gnus/gnus-srvr.el (gnus-server-mode-map, gnus-server-make-menu-bar)
      (gnus-server-cloud, gnus-server-cloud-host)
      (gnus-server-font-lock-keywords, gnus-server-insert-server-line)
      (gnus-server-toggle-cloud-method-server): Support Gnus Cloud
      synchronized servers and synchronization host server toggling (`i' and
      `I') and visual display.
      (gnus-server-toggle-cloud-method-server): Use
      (gnus-server-toggle-cloud-method-server): Use custom-set-variables to
      set the gnus-cloud-method. Ask the user if it's OK to upload the data
      right now.
      * doc/misc/gnus.texi: Document Gnus Cloud package.
    • Paul Eggert's avatar
      Remove CHECK_FRAME_FONT cruft from bytecode.c · 60dd094a
      Paul Eggert authored
      * src/bytecode.c [CHECK_FRAME_FONT]: Do not include frame.h, xterm.h.
      Remove some old ‘#if 0’ code.
    • Paul Eggert's avatar
      Work around GCC bug 54561 in a better way · 3e71e437
      Paul Eggert authored
      The new approach is less selective, but also less intrusive on C code.
      * src/bytecode.c, src/image.c, src/keyboard.c: Ignore -Wclobbered.
      * src/conf_post.h (NONVOLATILE): Remove.  All uses removed.
    • Paul Eggert's avatar
      Fix port to glibc 2.24 (pre-release) + ppc64 · 63750fd4
      Paul Eggert authored
      * src/callproc.c (child_setup): Use emacs_exec_file
      so that ASLR is enabled in the child process.
      * src/emacs.c: Move some personality details into sys/sysdep.c.
      Do not include <sys/personality.h>.
      (main): Disable ASLR earlier, so that we don’t chdir twice.
      * src/lisp.h (disable_address_randomization): New decl.
      * src/sysdep.c (disable_address_randomization)
      [HAVE_PERSONALITY_ADDR_NO_RANDOMIZE]: Move personality details
      here from emacs.c.
      (emacs_exec_file): New function.
  7. 19 Jul, 2016 5 commits
    • Alan Third's avatar
      Prevent bar cursor overwriting next glyph (bug#16856) · bf5ddded
      Alan Third authored
      * src/nsterm.m (ns_draw_window_cursor): Test glyph width vs cursor width
      before setting final size.
    • Paul Eggert's avatar
      ; Spelling fix · a80ee12a
      Paul Eggert authored
    • Eli Zaretskii's avatar
      Fix 'transpose-regions' when LEAVE-MARKERS arg is non-nil · 00b66476
      Eli Zaretskii authored
      * src/insdel.c (adjust_markers_bytepos): New function.
      * src/lisp.h (adjust_markers_bytepos): Add prototype.
      * src/insdel.c (replace_range, replace_range_2):
      * src/editfns.c (Ftranspose_regions): Call
      adjust_markers_bytepos.  (Bug#5131)
      * test/src/editfns-tests.el (transpose-test-reverse-word)
      (transpose-test-get-byte-positions): New functions.
      (transpose-nonascii-regions-test-2): New tests.
    • Katsumi Yamaoka's avatar
      Make gif animation work (bug#24004) · 439f3c3e
      Katsumi Yamaoka authored
      * lisp/image.el (image-animate-timeout): Fix the logic that tests if
      an animation is too big (bug#24004).
    • Stefan Monnier's avatar
      * lisp/simple.el (undo-amalgamate-change-group): New function · 99fe98d3
      Stefan Monnier authored
      * lisp/emulation/viper-cmd.el (viper-adjust-undo): Use it.
      (viper-set-complex-command-for-undo): Save current state with
      * lisp/emulation/viper-init.el (viper-undo-needs-adjustment)
      (viper-buffer-undo-list-mark): Remove.
  8. 18 Jul, 2016 2 commits
    • Noam Postavsky's avatar
      Keep w32 environment settings internal only · 73f0715d
      Noam Postavsky authored
      * src/emacs.c (main) [WINDOWSNT]: Move init_environment calls after the
      set_initial_environment call.  This prevents Emacs' modifications to the
      environment from contaminating Vprocess_environment and
      Vinitial_environment (Bug #10980).
      * src/callproc.c (getenv_internal) [WINDOWSNT]: Consult Emacs' internal
      environment in as a fallback to Vprocess_environment.
      * test/src/callproc-tests.el (initial-environment-preserved): New Test.
    • NicolasPetton's avatar
      Better documentation for cl-reduce (bug#24014) · 1879b905
      NicolasPetton authored
      * lisp/emacs-lisp/cl-seq.el (cl-reduce): Explain what reducing means.
  9. 17 Jul, 2016 4 commits
  10. 16 Jul, 2016 3 commits
    • Noam Postavsky's avatar
      Optimize ucs-normalize.el compilation · e333157c
      Noam Postavsky authored
      * lisp/international/ucs-normalize.el (ucs-normalize-combining-chars-regexp):
      (quick-check-list-to-regexp): Use regexp-opt-charset instead of
      * lisp/international/ucs-normalize.el (quick-check-list): Reuse a single
      temp buffer for the whole loop.
    • Noam Postavsky's avatar
      Add tests for ucs-normalize.el · eed3b46c
      Noam Postavsky authored
      Some tests are marked as expected to fail.
      * test/lisp/international/ucs-normalize-tests.el: New tests.
      * admin/unidata/NormalizationTest.txt: Add data for tests.
      * admin/unidata/README: Add URL for NormalizationTest.txt.
      * admin/notes/unicode: Add note about running (and updating the data
      for) the new tests.  Remove note about normalization being unsupported.
    • Alan Third's avatar
      Fix cursor display (bug#23993) · 49f7c5ad
      Alan Third authored
      * src/xdisp.c (get_phys_cursor_geometry): Fix invalid C operator.