1. 03 Aug, 2016 2 commits
  2. 02 Aug, 2016 18 commits
    • Stefan Monnier's avatar
      * src/window.c: Fix bootstrap failure due to window.el changes · 49e0c276
      Stefan Monnier authored
      (sanitize_window_sizes): Adjust to new calling convention of
      window--sanitize-window-sizes and only call it if defined.
      (Fwindow__sanitize_window_sizes): Remove.
      (syms_of_window): Don't defsubr it.
      49e0c276
    • Michael Albinus's avatar
      Fix Bug#23883 · 50834992
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-maybe-open-connection):
      Call `process-actions' with adapted position.  The connection
      buffer might have been cleaned up already.  (Bug#23883)
      50834992
    • Paul Eggert's avatar
      Port regex changes to strict ISO C · 0100805a
      Paul Eggert authored
      * src/regex.c (regex_compile): Redo casts.
      0100805a
    • Stefan Monnier's avatar
      * lisp/window.el: Use lexical-binding · 9d5cd450
      Stefan Monnier authored
      (window--min-size-ignore-p): Remove unused arg `horizontal'.
      (window--sanitize-window-sizes): Remove unused arg `frame'.
      (window-edges): Remove unused vars left-off and right-off.
      (display-buffer-reuse-mode-window): Remove unused var `frame?'.
      Avoid extraneous setq and do a bit of CSE.
      (fit-frame-to-buffer): Remove unused vars `window', `fit-width',
      and `toolbar-extra-height'.
      (window-adjust-process-window-size): Remove unused arg `process'.
      9d5cd450
    • Michal Nazarewicz's avatar
      Fix unused lexical variable · c441f564
      Michal Nazarewicz authored
      This fixes the following warning:
      
          In toplevel form:
          src/regex-tests.el:416:1:Warning: Unused lexical variable ‘newline’
      
      * test/src/regex-tests.el (regex-tests-BOOST): Remove unused lexical
      variable.
      c441f564
    • Michal Nazarewicz's avatar
      Remove unused STREQ macro · edd5dd80
      Michal Nazarewicz authored
      This fixes the following compilation warning:
      
          regex.c:516:0: warning: macro "STREQ" is not used [-Wunused-macros]
           #define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
           ^
      
      * src/regex.c (STREQ): Remove unused macro.  It should have been removed
      in a [4538a5e3: Refactor regex character class parsing in [:name:]]
      commit but was mistakenly left out.
      edd5dd80
    • Stefan Monnier's avatar
      * cl-generic.el: Fix problems introduced by new load-history format · d0838f20
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-generic.el (cl--generic-load-hist-format): New function.
      (cl-generic-define-method, cl--generic-describe): Use it.
      (cl--generic-search-method): Adjust for new format.
      
      * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions):
      * test/lisp/progmodes/elisp-mode-tests.el:
      Use cl--generic-load-hist-format rather than hard-coding cl-generic's
      internal format.
      d0838f20
    • Michal Nazarewicz's avatar
      Hardcode regex syntax to remove dead code handling different syntax · 54a3c0c9
      Michal Nazarewicz authored
      Emacs only ever uses its own regex syntax so support for other syntaxes
      is never used.  Hardcode the syntax so that the compilar can detect such
      dead code and remove it from compiled code.
      
      The only exception is RE_NO_POSIX_BACKTRACKING which can be separatelly
      specified.  Handle this separatelly with a function argument (replacing
      now unnecessary syntax argument).
      
      With this patchset, size of Emacs binary on x86_64 machine is reduced by
      around 60 kB:
      
      	new-sizes:-rwx------ 3 mpn eng 30254720 Jul 27 23:31 src/emacs
      	old-sizes:-rwx------ 3 mpn eng 30314828 Jul 27 23:29 src/emacs
      
      * src/regex.h (re_pattern_buffer): Don’t define syntax field #ifdef emacs.
      (re_compile_pattern): Replace syntax with posix_backtracking argument.
      
      * src/regex.c (print_compiled_pattern): Don’t print syntax #ifdef emacs.
      (regex_compile): #ifdef emacs, replace syntax argument with
      posix_backtracking which is now used instead of testing for
      RE_NO_POSIX_BACKTRACKING syntax.
      (re_match_2_internal): Don’t access bufp->syntax #ifndef emacs.
      (re_compile_pattern): Replace syntax with posix_backtracking argument.
      
      * src/search.c (compile_pattern_1): Pass boolean posix_backtracking
      instead of syntax to re_compile_pattern.
      54a3c0c9
    • Michal Nazarewicz's avatar
      Get rid of re_set_whitespace_regexp · da9c55dd
      Michal Nazarewicz authored
      * src/regex.h (re_set_whitespace_regexp): Delete.
      (re_compile_pattern): Add whitespace_regexp argument #ifdef emacs.
      
      * src/regex.c (re_set_whitespace_regexp, whitespace_regexp): Delete.
      (regex_compile): Add whitespace_regexp argument #ifdef emacs and wrap
      whitespace_regexp-related code in an #ifdef emacs so it’s compiled out
      unless building Emacs.
      (re_compile_pattern): Pass whitespace_regexp argument to regex_compile
      
      * src/search.c (compile_pattern_1): Don’t use re_set_whitespace_regexp,
      pass the regex as argument to re_compile_pattern instead.
      da9c55dd
    • Michal Nazarewicz's avatar
      Get rid of re_set_syntax · 04d96eca
      Michal Nazarewicz authored
      Instead of using a global variable for storing regex syntax, pass it
      to re_compile_pattern.  This is only enabled when compiling Emacs (i.e.
      ‘#ifdef emacs’).
      
      * src/regex.h (re_set_syntax): Declare only #ifndef emacs.
      (re_compile_pattern): Now takes syntax argument #ifdef emacs.
      
      * src/regex.c (re_syntax_options): Define only #ifndef emacs.
      (re_compile_pattern): Use the new syntax argument #ifdef emacs.
      
      * src/search.c (compile_pattern_1): Don’t use re_set_syntax and
      instead pass syntax to re_compile_pattern directly.
      04d96eca
    • Michal Nazarewicz's avatar
      Remove dead opcodes in regex bytecode · 9a418e0f
      Michal Nazarewicz authored
      There is no way to specify before_dot and after_dot opcodes in a regex
      so code handling those ends up being dead.  Remove it.
      
      * src/regex.c (print_partial_compiled_pattern, regex_compile,
      analyze_first, re_match_2_internal): Remove handling and references to
      before_dot and after_dot opcodes.
      9a418e0f
    • Michal Nazarewicz's avatar
      Refactor regex character class parsing in [:name:] · 4538a5e3
      Michal Nazarewicz authored
      re_wctype function is used in three separate places and in all of
      those places almost exact code extracting the name from [:name:]
      surrounds it.  Furthermore, re_wctype requires a NUL-terminated
      string, so the name of the character class is copied to a temporary
      buffer.
      
      The code duplication and unnecessary memory copying can be avoided by
      pushing the responsibility of parsing the whole [:name:] sequence to
      the function.
      
      Furthermore, since now the function has access to the length of the
      character class name (since it’s doing the parsing), it can take
      advantage of that information in skipping some string comparisons and
      using a constant-length memcmp instead of strcmp which needs to take
      care of NUL bytes.
      
      * src/regex.c (re_wctype): Delete function.  Replace it with:
      (re_wctype_parse): New function which parses a whole [:name:] string
      and returns a RECC_* constant or -1 if the string is not of [:name:]
      format.
      (regex_compile): Use re_wctype_parse.
      * src/syntax.c (skip_chars): Use re_wctype_parse.
      4538a5e3
    • Michal Nazarewicz's avatar
      Split regex glibc test cases into separet tests · e7257061
      Michal Nazarewicz authored
      * test/src/regex-tests.el (regex-tests): Remove and split into multiple
      tests cases.
      (regex-tests-glbic-BOOST, regex-tests-glibc-PCRE,
      regex-tests-glibc-PTESTS, regex-tests-glibc-TESTS): New test cases split
      from ‘regex-tests’.
      e7257061
    • Michal Nazarewicz's avatar
      Don’t (require 'cl) · 7496844e
      Michal Nazarewicz authored
      * test/src/regex-test.el: Don’t (require 'cl).
      (regex-tests-PCRE): s/loop/cl-loop/
      7496844e
    • Michal Nazarewicz's avatar
      Fix reading of regex-resources in regex-tests · 82a487d5
      Michal Nazarewicz authored
      * test/src/regex-tests.el (regex-tests-generic-line): Referring to
      ‘buffer-file-name’ does not work when running the test from command
      line, i.e. via make, which results in (wrong-type-argument stringp nil)
      failures.  Replace it with hard-coded path.
      (regex-tests-BOOST, regex-tests-PCRE, regex-tests-PTESTS-whitelist,
      regex-tests-TESTS-whitelist): ‘regex-tests-generic-line’ now  includes
      the ‘regex-resources’ path component so the tests don’t need to specify
      it explicitly.
      82a487d5
    • Dima Kogan's avatar
      Added driver for the regex tests · 91d53091
      Dima Kogan authored
      * test/src/regex-tests.el (regex-tests): Test executing glibc tests
      cases.
      
      [mina86@mina86.com: merged test with existing file]
      91d53091
    • Dima Kogan's avatar
      New regex tests imported from glibc 2.21 · 6db72771
      Dima Kogan authored
      * test/src/regex-resources/BOOST.tests:
      * test/src/regex-resources/PCRE.tests:
      * test/src/regex-resources/PTESTS:
      * test/src/regex-resources/TESTS:
      New test data files
      
      [mina86@mina86.com: Moved files from test/src/regex/* to test/src/*.]
      6db72771
    • Paul Eggert's avatar
      Fix use-after-close in connect_network_socket · 53917616
      Paul Eggert authored
      * src/process.c (connect_network_socket):
      Reverse sense of previous fix.  Problem reported by Ken Brown in:
      http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00004.html
      53917616
  3. 01 Aug, 2016 2 commits
  4. 31 Jul, 2016 1 commit
    • Stefan Merten's avatar
      * lisp/textmodes/rst.el: Major refactoring, minor changes, minor fixes · cafb4a39
      Stefan Merten authored
      (rst-Ado, rst-Hdr, rst-Ttl, rst-Stn): Introduce classes
      representing reStructuredText section header concepts.
      (rst-mode-map, rst-new-preferred-hdr)
      (rst-update-section, rst-classify-adornment)
      (rst-ttl-at-point, rst-all-ttls-cache)
      (rst-hdr-hierarchy-cache, rst-reset-section-caches)
      (rst-all-ttls, rst-infer-hdr-hierarchy, rst-hdr-hierarchy)
      (rst-all-ttls-with-level, rst-get-previous-hdr)
      (rst-adornment-complete-p, rst-next-hdr, rst-adjust)
      (rst-adjust-section, rst-promote-region)
      (rst-display-hdr-hierarchy, rst-straighten-sections)
      (rst-all-stn, rst-remaining-stn, rst-toc-insert)
      (rst-toc-insert-node, rst-toc-node, rst-toc)
      (rst-forward-section, rst-adornment-level)
      (rst-font-lock-handle-adornment-pre-match-form)
      (rst-imenu-convert-cell, rst-imenu-create-index): Refactor
      using classes.
      (rst-compare-adornments, rst-get-adornment-match): Remove
      functions now in classes.
      (rst-re-alist-def, rst-toc-mode)
      (rst-font-lock-extend-region-extend): Minor improvements.
      (rst-mode, rst-compile): Use `setq-local'.
      (rst-cvs-header, rst-svn-rev, rst-svn-timestamp)
      (rst-official-version, rst-official-cvs-rev)
      (rst-package-emacs-version-alist): Maintain version tags.
      cafb4a39
  5. 30 Jul, 2016 4 commits
  6. 29 Jul, 2016 1 commit
  7. 28 Jul, 2016 2 commits
    • Vincent Belaïche's avatar
    • Vincent Belaïche's avatar
      Enable addition of local printers from a mode hook. · 41b28dea
      Vincent Belaïche authored
      * doc/misc/ses.texi (Printer functions): Split the node into 5
      sub-nodes + add some extra documentation.
      (Various kinds of printer functions): Make an itemisation to
      disintguish better the 3 types of printers, give an example of
      lambda printer definition.
      (Standard printer functions): Add documentation for ses-prin1
      printer function.
      (Local printer functions): Add documentation for creating
      local printers programmatically from a hook.
      (Writing a lambda printer function): Add documentation about
      anti-stackoverflow precautions to take when you call the
      standard printer functions from inside a local printer.
      
      * lisp/ses.el (ses-standard-printer-functions): Add ses-prin1
      among standard printer function, and update docstring
      accordingly.
      (ses-call-printer, ses-export-tab): Call `ses-prin1' instead
      of prin1-to-string.
      (ses-define-local-printer): Add definition to arguments so
      that a local printer can be defined programmatically from a
      mode hook.  Make docstring more substantial.  Use completing
      read for local printer name input.  Plus some minor
      optimization.
      (ses-define-if-new-local-printer): New defsubst.
      (ses-center, ses-center-span, ses-dashfill)
      (ses-dashfill-span, ses-tildefill-span): Allow to pass printer
      as an optional argument to superseed column printer/default
      spreadsheet printer.
      (ses-prin1): New defun.
      41b28dea
  8. 27 Jul, 2016 5 commits
    • Ted Zlatanov's avatar
      Prompt to save gnus-cloud-method. · ec359399
      Ted Zlatanov authored
      Since `gnus-cloud-method' is a defcustom, when it's set, we should
      prompt the user to save it, so the customization is not lost on
      restart.
      
      * gnus-srvr.el (gnus-server-toggle-cloud-method-server): Prompt to
      save the customization of `gnus-cloud-method'.
      ec359399
    • Ken Brown's avatar
      Fix dired-test-bug22694 · 773778e1
      Ken Brown authored
      * test/lisp/dired-tests.el (dired-test-bug22694): Delete the
      "bug22694" directory, if it exists, before running the test.  It
      might be left over from a previous aborted run of the test.
      773778e1
    • Michal Nazarewicz's avatar
      Fix ‘is multibyte’ test regex.c’s mutually_exclusive_p (bug#24020) · 74f9c1a8
      Michal Nazarewicz authored
      * src/regex.c (mutually_exclusive_p): Fix how whether character is
      unibyte is tested when calling execute_charset function.  This bug has
      been introduced by [6dc6b007: Fix ‘[[🇨🇨]]*literal’ regex failing to
      match ‘literal’] which dropped a call to IS_REAL_ASCII (c) macro.
      Reinstitute it.
      74f9c1a8
    • Tino Calancha's avatar
      Remove hook when disabling ibuffer-auto-mode · e0d42597
      Tino Calancha authored
      * lisp/ibuf-ext.el (ibuffer-auto-mode):
      Remove 'ibuffer-auto-update-changed' from 'post-command-hook'.
      e0d42597
    • Tino Calancha's avatar
      ; Spelling fixes · 40476552
      Tino Calancha authored
      40476552
  9. 26 Jul, 2016 5 commits