1. 07 Jul, 2020 5 commits
  2. 06 Jul, 2020 5 commits
    • Stefan Monnier's avatar
    • Mattias Engdegård's avatar
      Simplify byte-code optimisation of pure functions · 3f990c3c
      Mattias Engdegård authored
      Most pure functions need no explicit optimisation; we can do away with
      almost all uses of byte-optimize-predicate (now renamed to
      byte-optimize-constant-args, since it is not just for predicates).
      Also remove some superfluous arity warnings.
      
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-identity, byte-optimize-memq)
      (byte-optimize-nth, byte-optimize-nthcdr):
      Remove arity warnings and simplify.
      * lisp/emacs-lisp/byte-opt.el (<, >, <=, >=, not, null, consp, listp)
      (symbolp, stringp, string<, string-lessp, proper-list-p, logand)
      (logior, logxor, lognot, car, cdr, car-safe, cdr-safe):
      Remove superfluous byte-optimizer property.
      (byte-optimize-predicate): Rename to byte-optimize-constant-args.
      All uses changed.
      3f990c3c
    • Mattias Engdegård's avatar
      Mark more functions pure (bug#42147) · fb63a64d
      Mattias Engdegård authored
      Extend the list of 'pure' functions to many predicates and numerical
      functions that we are reasonably confident will give portable results.
      Also include various list and array accessors, because our use of purity
      in the byte compiler isn't affected by the mutability of arguments.
      
      * lisp/emacs-lisp/byte-opt.el: Update example in comment.
      (pure-fns): Add many functions.
      (byte-optimize-form-code-walker) Don't signal errors during evaluation
      of calls to pure functions with constant arguments at compile time,
      since such calls are not necessarily reachable.
      fb63a64d
    • Dmitry Gutov's avatar
      ; Revert "; Add a note about a bottleneck" · 10a0941f
      Dmitry Gutov authored
      This reverts commit 9f9ce631.
      
      It's still a bottleneck, but so are mapcar (with its effect on GC) and
      concat. So our limits show in several places at once.
      10a0941f
    • Dmitry Gutov's avatar
      ; Add a note about a bottleneck · 9f9ce631
      Dmitry Gutov authored
      9f9ce631
  3. 05 Jul, 2020 7 commits
    • Dmitry Gutov's avatar
      3c7bae23
    • Dmitry Gutov's avatar
      ; Add a couple of FIXMEs · bcde7952
      Dmitry Gutov authored
      bcde7952
    • Dmitry Gutov's avatar
      project-switch-to-buffer: Don't filter based on default-directory · 4ca13d98
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-switch-to-buffer):
      Don't filter based on default-directory
      (https://lists.gnu.org/archive/html/emacs-devel/2020-07/msg00075.html).
      (project-switch-to-buffer): Ditto.
      4ca13d98
    • Wilson Snyder's avatar
      Verilog-Mode collected updates. · e3ada206
      Wilson Snyder authored
      * lisp/progmodes/verilog-mode.el (verilog-auto-inst): Support regexp of
      what AUTOINST I/O to include, issue #1682.  Reported by Mrainy.
      (verilog-font-lock-keywords-1): Fix highlighting module names with no
      following (, issue #1679.  Reported by Vinam Arora.
      (verilog-font-lock-keywords) Adds syntax highlighting for identifiers in
      declaration statements, #1678.
      (verilog-calculate-indent, verilog-inject-arg)
      (verilog-keywords, verilog-showscopes): Support AMS
      connectmodule/endconnectmodule, #1665. Reported by Dan McMahill.
      e3ada206
    • Mattias Engdegård's avatar
      Don't confuse errors with nil in bytecomp-tests.el · 58e27ebb
      Mattias Engdegård authored
      * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-check-1)
      (bytecomp-explain-1, test-byte-opt-arithmetic, bytecomp-lexbind-check-1)
      (bytecomp-lexbind-explain-1):
      If an expression raises an error when evaluated, don't treat it as if
      it had succeeded with the value nil; use 'bytecomp-check-error' as the
      result instead.
      58e27ebb
    • Eli Zaretskii's avatar
      Clarify the documentation of 'left/right-fringe' display spec · 247dcb4b
      Eli Zaretskii authored
      * doc/lispref/display.texi (Other Display Specs, Fringe Bitmaps):
      Clarify how the optional FACE parameter of the left-fringe and
      right-fringe display spec is used.  Reported by Gregory Heytings
      <ghe@sdf.org>.
      247dcb4b
    • Mattias Engdegård's avatar
      Relax portable number check in byte compiler (bug#42147) · c10293e1
      Mattias Engdegård authored
      With bignums, the set of representable integers is no longer
      platform-dependent, and since we use nothing but IEEE754 64-bit
      floats, all numbers are now portable.  Take advantage of this fact
      to simplify constant-folding in the byte compiler, allowing it to
      be applied more widely.
      
      * lisp/emacs-lisp/byte-opt.el (byte-opt--portable-max)
      (byte-opt--portable-min, byte-opt--portable-numberp): Remove.
      (byte-opt--arith-reduce, byte-optimize-minus, byte-optimize-1+)
      (byte-optimize-1-): Simplify: any number will do, and if N is a
      number, then so are -N, N+1 and N-1.
      c10293e1
  4. 04 Jul, 2020 5 commits
    • Alan Mackenzie's avatar
      Remove long obsolete c-looking-at-bos. Make c-at-expression-start-p obsolete · 1560c92c
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-looking-at-bos): Remove.
      (c-at-expression-start-p): Make obsolete, with no alternative function.
      1560c92c
    • Alan Mackenzie's avatar
      Fix filling in js-mode and mhtml-mode (js-mode parts), fixing bug #41897 · eae028b9
      Alan Mackenzie authored
      * lisp/progmodes/js.el (js-mode): Use "\\(?:" in the value of
      comment-start-skip rather than "\\(", fixing the second half of bug #41952.
      Call c-foreign-init-lit-pos-cache and install c-foreign-truncate-lit-pos-cache
      on before-change-functions, to connect up correctly with CC Mode's filling
      mechanism.
      
      * lisp/textmodes/mhtml-mode.el (mhtml--crucial-variable-prefix): Add prefixes
      "adaptive-fill-", "fill-", "normal-auto-fill-function" and "paragraph-" to
      pull in variables crucial to filling.
      (mhtml-syntax-propertize): Read the current submode from the piece of text
      being propertized rather than one character before it, and do so before
      erasing the submode text-property.
      (mhtml-mode): Set the js-mode value of auto-fill-function to js-do-auto-fill.
      Correctly initialize and use CC Mode's filling facilities, as above.
      eae028b9
    • Alan Mackenzie's avatar
      CC Mode: Fix wrong value of comment-start-skip, fixing half of bug #41952 · 697942f9
      Alan Mackenzie authored
      Also add functions to enable correct use of CC Mode's filling functionality
      from major modes which don't initialize CC Mode fully.  These modes are
      currently js-mode and mhtml-mode.
      
      * lisp/progmodes/cc-langs.el (comment-start-skip): Replace "\\(" by "\\(?:" so
      that (match-end 1) isn't falsely taken to be the start of the comment.
      
      * lisp/progmodes/cc-engine.el (c-foreign-truncate-lit-pos-cache)
      (c-foreign-init-lit-pos-cache): New functions.
      697942f9
    • Daniel Koning's avatar
      Use 'emacs-lisp-mode-syntax-table' for reading Lisp expressions · 32b3856f
      Daniel Koning authored
      * lisp/simple.el (read--expression): Set syntax table to
      'emacs-lisp-mode-syntax-table' when reading a Lisp expression
      from the minibuffer.  (Bug#41781)
      
      Copyright-paperwork-exempt: yes
      32b3856f
    • Eli Zaretskii's avatar
      Minor improvement in ELisp manual · d453cee1
      Eli Zaretskii authored
      * doc/lispref/frames.texi (Position Parameters): Clarify the
      description of the 'above' frame parameter.  (Bug#42154)
      d453cee1
  5. 02 Jul, 2020 3 commits
  6. 01 Jul, 2020 5 commits
  7. 30 Jun, 2020 1 commit
  8. 29 Jun, 2020 4 commits
    • James N. V. Cash's avatar
      Subject: Frame-local tab-bar for numeric value of tab-bar-show (bug#42052) · bc8089a3
      James N. V. Cash authored
      * lisp/tab-bar.el (tab-bar-new-tab-to): Set frame parameter
      tab-bar-lines to 1 when tab-bar-show is the same as number of tabs.
      (tab-bar-close-tab, tab-bar-close-other-tabs): Set frame parameter
      tab-bar-lines to 0 when tab-bar-show is the same as number of tabs.
      
      Copyright-paperwork-exempt: yes
      bc8089a3
    • Alan Mackenzie's avatar
      CC Mode: optimize for repeated simple operations. · 519e64f9
      Alan Mackenzie authored
      Do this by recognising that unterminated strings in a buffer are typically
      going to be few and close together.  Also optimize code for C++ attributes.
      
      * lisp/progmodes/cc-defs.el (c-previous-single-property-change): New macro.
      (c-put-syn-tab, c-clear-syn-tab): Turned from macros into functions, and moved
      to cc-mode.el.
      (c-clear-syn-tab-properties): Amended to use c-min/max-syn-tab-mkr.
      (c-with-extended-string-fences): Removed.
      
      * lisp/progmodes/cc-engine-el (c-enclosing-c++-attribute): Rewritten for
      speed.
      (c-slow-enclosing-c++-attribute): Removed.
      (c-semi-pp-to-literal): Remove a superfluous call to
      c-with-extended-string-fences.
      
      * lisp/progmodes/cc-mode.el (c-min-syn-tab-mkr, c-max-syn-tab-mkr): two new
      marker variables which bound the region occupied by positions with
      c-fl-syn-tab text properties.
      (c-basic-common-init): Initialize these two variables.
      (c-fl-syn-tab-region): Removed.
      (c-put-syn-tab, c-clear-syn-tab): Functions moved from cc-defs.el.
      (c-clear-string-fences): Amended to use the new scheme.
      (c-restore-string-fences): Now takes no arguments; amended to use the new
      scheme.
      (c-font-lock-fontify-region): Amended to use the new scheme.
      519e64f9
    • Paul Eggert's avatar
    • Philipp Stephani's avatar
      Fix undefined behavior in json.c (Bug#42113) · 59e768d6
      Philipp Stephani authored
      * src/json.c (lisp_to_json_toplevel_1, Fjson_parse_string): Check
      whether input strings are actually strings.
      
      * test/src/json-tests.el (json-parse-string/wrong-type)
      (json-serialize/wrong-hash-key-type): New regression tests.
      59e768d6
  9. 28 Jun, 2020 4 commits
    • Paul Eggert's avatar
      Update from Gnulib. · 66501445
      Paul Eggert authored
      This incorporates:
      2020-06-28 getrandom: do not depend on ‘open’ on mingw
      2020-06-28 getrandom: fix compilation errors on older versions of mingw
      * build-aux/config.sub, lib/getrandom.c, m4/getrandom.m4:
      Copy from Gnulib
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      66501445
    • Eli Zaretskii's avatar
      MS-Windows fixes as followup to import of Gnulib 'getrandom' · 162f375b
      Eli Zaretskii authored
      * nt/mingw-cfg.site (gl_cv_lib_assume_bcrypt): Set to "no" to
      disable linking against bcrypt.dll.  (Bug#42095)
      
      * src/gnutls.c (gnutls_rnd) [WINDOWSNT]: Don't define a function
      pointer, and don't load it from GnuTLS DLL.
      (w32_gnutls_rnd) [WINDOWSNT]: Delete unused function.
      * src/fns.c (gnutls_rnd) [WINDOWSNT]: Don't redirect to
      w32_gnutls_rnd.
      162f375b
    • Richard Kim's avatar
      Fix ACTION argument of 'display-buffer' call in gud.el · cce00bef
      Richard Kim authored
      * lisp/progmodes/gud.el (gud-common-init): The ACTION argument of
      'display-buffer' should be a list of list of functions.  (Bug#41888)
      cce00bef
    • Timo Myyrä's avatar
      Add thread-naming support for OpenBSD · e4028d15
      Timo Myyrä authored
      OpenBSD has pthread_set_name_np; FreeBSD appears to have both
      this call and pthread_setname_np (the latter call is used in preference).
      
      * configure.ac: Detect pthread_set_name_np.
      * sys/systhread.c:
      Include <pthread_np.h> and call pthread_set_name_np if available.
      e4028d15
  10. 27 Jun, 2020 1 commit
    • Paul Eggert's avatar
      Use getrandom syscall for nonces · 5ce5cf64
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add getrandom.
      * doc/lispref/text.texi (Format of GnuTLS Cryptography Inputs):
      Don’t say that iv-auto uses GNUTLS_RND_NONCE.  Also, don’t say
      that it returns the IV’s actual value, as it never has done that.
      * src/fns.c, src/sysdep.c: Include sys/random.h, for getrandom.
      * src/fns.c (Fsecure_hash_algorithms): Use getrandom so that this
      function does not depend on HAVE_GNUTLS3.
      * src/sysdep.c: Do not include <gnutls/crypto.h>.
      (random_seed) [HAVE_LRAND48]: Can be long int now.
      (init_random) [!WINDOWSNT]: Use getrandom syscall instead
      of opening /dev/urandom, as this works even on GNU/Linux
      hosts that lack /dev/urandom.  Don’t bother with gnutls_rnd
      as it’s not needed now that we have getrandom.
      5ce5cf64