1. 22 Feb, 2017 1 commit
  2. 21 Feb, 2017 14 commits
    • Paul Eggert's avatar
      Minor weak hash table performance tweaks · 17af43ca
      Paul Eggert authored
      * src/fns.c (make_hash_table): Omit unnecessary assignment to
      h->next_weak when the hash table is not weak.
      (copy_hash_table): Put the copy next to the original in the
      weak_hash_tables list, as this should have better locality
      when scanning the weak hash tables.
      17af43ca
    • Paul Eggert's avatar
      Use float instead of Lisp_Object for rehash_size · 83c9c6fc
      Paul Eggert authored
      * src/alloc.c (purecopy_hash_table):
      * src/fns.c (maybe_resize_hash_table, Fmake_hash_table):
      (Fhash_table_rehash_size):
      * src/lisp.h (struct Lisp_Hash_Table.rehash_size):
      The rehash_size member of struct Lisp_Hash_Table is now a
      float, not a Lisp_Object.
      * src/alloc.c (purecopy_hash_table): Assign members in order.
      * src/fns.c (make_hash_table): Use EMACS_INT for size and
      float for rehash_size, instead of Lisp_Object for both.
      All callers changed.
      * src/lisp.h (DEFAULT_REHASH_SIZE): Now float, not double,
      and 1 smaller.
      * src/print.c (print_object): Simplify by calling
      Fhash_table_rehash_size and Fhash_table_rehash_threshold.
      Avoid unnecessary NILP.
      83c9c6fc
    • Paul Eggert's avatar
      Use ptrdiff_t instead of Lisp_Object for collision · 5cbdaa98
      Paul Eggert authored
      * src/alloc.c (purecopy_hash_table): Assign, don’t purecopy.
      * src/fns.c (set_hash_next_slot, set_hash_index_slot): Hash index
      arg is now ptrdiff_t index (or -1 if empty), not Lisp_Object
      integer (or Qnil if empty).  All callers changed.
      (larger_vecalloc): New static function.
      (larger_vector): Use it.
      (HASH_NEXT, HASH_INDEX): Move here from lisp.h.  Return ptrdiff_t
      index (or -1) not Lisp_Object integer (or Qnil).  All callers changed.
      * src/fns.c (make_hash_table, maybe_resize_hash_table, hash_lookup)
      (hash_put, hash_remove_from_table, hash_clear, sweep_weak_table):
      * src/profiler.c (evict_lower_half, record_backtrace):
      -1, not nil, is now the convention for end of collision list.
      * src/fns.c (maybe_resize_hash_table): Avoid double-initialization
      of the free list.  Reallocate H->next last, in case other
      reallocations exhaust memory.
      * src/lisp.h (struct Lisp_Hash_Table): ‘next_free’ is now
      ptrdiff_t, not Lisp_Object.  Adjust commentary for ‘next’ and
      ‘index’, which no longer contain nil.
      (HASH_NEXT, HASH_INDEX): Move to src/fns.c.
      5cbdaa98
    • Paul Eggert's avatar
      Hash table threshold is now float, not double · 7207b63c
      Paul Eggert authored
      Change default from 0.8 to 0.8125 so it fits in float without
      rounding glitches.
      * doc/lispref/hash.texi (Creating Hash):
      * doc/lispref/objects.texi (Hash Table Type):
      * etc/NEWS:
      Document change.
      * src/fns.c (make_hash_table, maybe_resize_hash_table)
      (Fmake_hash_table): Threshold is now float, not double.
      Be consistent about how this is rounded.
      * src/lisp.h (struct Lisp_Hash_Table.rehash_threshold):
      Change back to float, now that the other code rounds consistently.
      (DEFAULT_REHASH_THRESHOLD): Now float 0.8125 instead of double 0.8.
      7207b63c
    • Juri Linkov's avatar
      Avoid flicker in lazy-highlight by doing all updates without redisplay. · f2191691
      Juri Linkov authored
      * lisp/isearch.el (lazy-highlight-max-at-a-time):
      Change default value from 20 to nil to not trigger redisplay
      between updating iterations.
      (lazy-highlight-cleanup): New arg ‘procrastinate’ to not remove
      overlays when non-nil.
      (isearch-lazy-highlight-new-loop): Call lazy-highlight-cleanup
      with non-nil second arg when the search string is not empty.
      Run timer with isearch-lazy-highlight-start instead of
      isearch-lazy-highlight-update.
      (isearch-lazy-highlight-start): New function. (Bug#25751)
      f2191691
    • Glenn Morris's avatar
      ; * lisp/custom.el: Comments. · 217eaf69
      Glenn Morris authored
      217eaf69
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/autoload.el (make-autoload): Support cl-defgeneric · bac7de05
      Stefan Monnier authored
      * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Tweak for autoloading.
      bac7de05
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Fix duplication · e785c74d
      Stefan Monnier authored
      which resulted in incomplete list of parents in one copy of the
      cl-structure-class class.
      e785c74d
    • Glenn Morris's avatar
      Tweak recent custom-reevaluate-setting change · 20dda6be
      Glenn Morris authored
      * lisp/custom.el (custom-reevaluate-setting):
      Tweak previous change to avoid font-lock init issues.
      20dda6be
    • Glenn Morris's avatar
      Ensure delayed-init custom variables get marked special · 96cea198
      Glenn Morris authored
      * lisp/custom.el (custom-reevaluate-setting):
      If the variable has never been set, defvar it.  (Bug#25770)
      96cea198
    • Glenn Morris's avatar
      ; Add a new TODO item · 08c73cdc
      Glenn Morris authored
      * etc/TODO: Add a new entry for :set-after.
      * lisp/startup.el: Related comment.
      08c73cdc
    • Mark Oteiza's avatar
      Turn on lexical-binding in dunnet.el · bfd1afb3
      Mark Oteiza authored
      * lisp/play/dunnet.el: Turn on lexical-binding.  Re-instate lexical
      byte compile warnings.
      bfd1afb3
    • Mark Oteiza's avatar
      Make dunnet insertion functions n-ary · e91cc4e1
      Mark Oteiza authored
      * lisp/play/dunnet.el (dun-mprinc, dun-mprincl, dun-minsert):
      (dun-minsertl, dun-batch-mprinc, dun-batch-mprincl): Change to accept
      any number of arguments.
      (dun-parse, dun-describe-room, dun-quit, dun-inven, dun-shake):
      (dun-take, dun-go, dun-move, dun-press, dun-score):
      (dun-compile-save-out, dun-do-logfile): Collect arguments from
      multiple insertion calls into less calls with more args.
      e91cc4e1
    • Katsumi Yamaoka's avatar
      message-goto-body-1: Fix regexp so as not to match multi-line · 18c47695
      Katsumi Yamaoka authored
      * lisp/gnus/message.el (message-goto-body-1):
      Fix regexp so as not to match multi-line.
      18c47695
  3. 20 Feb, 2017 14 commits
  4. 19 Feb, 2017 11 commits
    • Paul Eggert's avatar
      Fix glitches in recent hash table changes · c8d14cfc
      Paul Eggert authored
      * src/fns.c (Fmake_hash_table): Simplify the machine code slightly
      by using 0 rather than -1.
      * src/lisp.h (struct Lisp_Hash_Table.pure): Now bool rather
      than a bitfield, for speed (the bitfield did not save space).
      (struct Lisp_Hash_Table.rehash_threshold): Now double rather than
      float, since the float caused unwanted rounding errors, e.g.,
      (hash-table-rehash-threshold (make-hash-table)) yielded
      0.800000011920929 instead of the correct 0.8.
      c8d14cfc
    • Stefan Monnier's avatar
    • Eli Zaretskii's avatar
      ; Minor fix of recent change in fringe.c · f03d936c
      Eli Zaretskii authored
      * src/fringe.c (init_fringe_bitmap) [HAVE_NTGUI]: Remove an
      unnecessary #ifdef introduced in a recent change.
      f03d936c
    • Eli Zaretskii's avatar
    • Eli Zaretskii's avatar
      Avoid aborts during loadup · b36f8a4d
      Eli Zaretskii authored
      * src/emacs-module.c (syms_of_module):
      * src/image.c (xpm_make_color_table_h): Update calls to
      make_hash_table to adjust to a recent change in fns.c.
      * src/fns.c (make_hash_table):
      * src/lisp.h (make_hash_table): 4th arg is now of type double.
      b36f8a4d
    • Michael Albinus's avatar
      Rework connection local variables · 143bc75c
      Michael Albinus authored
      For connection local variables interface, `class' is renamed
      to `profile'.  All arguments `criteria' are a plist now.
      
      * doc/lispref/variables.texi (Connection Local Variables):
      Rewrite.
      
      * lisp/files-x.el (connection-local-profile-alist): Rename
      from `connection-local-class-alist'.  Adapt docstring.
      (connection-local-criteria-alist): Adapt docstring.
      (connection-local-normalize-criteria): New defun.
      (connection-local-get-profiles): Rename from
      `connection-local-get-classes'.  Rewrite.
      (connection-local-set-profiles): Rename from
      `connection-local-set-classes'.  Rewrite.
      (connection-local-get-profile-variables): Rename from
      `connection-local-get-class-variables'.  Rewrite.
      (connection-local-set-profile-variables): Rename from
      `connection-local-set-class-variables'.  Rewrite.
      (hack-connection-local-variables)
      (hack-connection-local-variables-apply)): Rewrite.
      (with-connection-local-profiles): Rename from
      `ith-connection-local-classes'.  Rewrite.
      
      * lisp/net/tramp.el (tramp-set-connection-local-variables):
      Compute criteria.
      
      * lisp/net/tramp-cmds.el (tramp-bug):
      Use `connection-local-profile-alist'.
      
      * test/lisp/files-x-tests.el (files-x-test--variables1)
      (files-x-test--variables2, files-x-test--variables3)
      (files-x-test--variables4, files-x-test--criteria1)
      (files-x-test--criteria2): Make them a defconst.
      (files-x-test--application)
      (files-x-test--another-application, files-x-test--protocol)
      (files-x-test--user, files-x-test--machine): New defconst.
      (files-x-test--criteria): New defvar.
      (files-x-test--criteria3): Remove.
      (files-x-test-connection-local-set-profile-variables):
      Rename from `files-x-test-connection-local-set-class-variables'.
      Rewrite.
      (files-x-test-connection-local-set-profiles): Rename from
      `files-x-test-connection-local-set-classes'.  Rewrite.
      (files-x-test-hack-connection-local-variables-apply)  Rewrite.
      (files-x-test-with-connection-local-profiles): Rename from
      `files-x-test-with-connection-local-classes'.  Rewrite.
      143bc75c
    • Mark Oteiza's avatar
      ; Fix previous change · b6a1a745
      Mark Oteiza authored
      Actually adjust the comment.
      * lisp/play/dunnet.el: Change comment to refer to section, add page
      break to better demarcate section.
      b6a1a745
    • Mark Oteiza's avatar
      Set up combination and random item location · 7455c2ad
      Mark Oteiza authored
      * lisp/play/dunnet.el (dun-combination): Make defconst.
      (tloc, tcomb): Remove.  Replace with a top-level form.
      7455c2ad
    • Mark Oteiza's avatar
      Replace movement variables with an alist and accessor · 44931daf
      Mark Oteiza authored
      * lisp/play/dunnet.el (north, south, east, west, northeast, southeast):
      (northwest, southwest, up, down, in, out): Remove.
      (dun-movement-alist): New constant.
      (dun-movement): New function.
      (dun-n, dun-s, dun-e, dun-w, dun-ne, dun-se, dun-nw, dun-sw, dun-up):
      (dun-down, dun-in, dun-out): Use a symbol for indicating movement.
      (dun-move, dun-special-move): Translate movement symbol to an
      enumeration.
      44931daf
    • Mark Oteiza's avatar
      Change top-level setq forms to defvar or defconst · 48cb4a96
      Mark Oteiza authored
      Also collect some code onto fewer lines and reindent.
      * lisp/play/dunnet.el (dun-visited, dun-current-room, dun-exitf):
      (dun-badcd, dun-computer, dun-floppy, dun-key-level, dun-hole):
      (dun-correct-answer, dun-lastdir, dun-numsaves, dun-jar, dun-dead):
      (room, dun-numcmds, dun-wizard, dun-endgame-question, dun-logged-in):
      (dungeon-mode, dun-unix-verbs, dun-dos-verbs, dun-batch-mode):
      (dun-cdpath, dun-cdroom, dun-uncompressed, dun-ethernet):
      (dun-restricted, dun-ftptype, dun-endgame, dun-rooms):
      (dun-light-rooms, dun-verblist, dun-inbus, dun-nomail, dun-ignore):
      (dun-mode, dun-sauna-level, north, south, east, west, northeast):
      (southeast, northwest, southwest, up, down, in, out, dungeon-map):
      (dun-objnames, obj-special, dun-room-objects, dun-room-silents):
      (dun-inventory, dun-objects, dun-object-lbs, dun-object-pts):
      (dun-objfiles, dun-perm-objects, dun-physobj-desc, dun-permobj-desc):
      (dun-diggables, dun-room-shorts, dun-endgame-questions): Change
      declaration to use defvar or defconst.
      (dun-doverb, dun-vparse, dun-vparse2, dun-batch-parse):
      (dun-batch-parse2): Omit the dun- prefix from arguments dun-ignore
      dun-verblist.  Those are now constants and the byte compiler doesn't
      allow defconsts in lambda lists.
      48cb4a96
    • Mark Oteiza's avatar
      Move all dunnet globals up to the top · 33400529
      Mark Oteiza authored
      * lisp/play/dunnet.el: Adjust comments to reflect moved forms.
      (dun-visited, dun-current-room, dun-exitf):
      (dun-badcd, dun-computer, dun-floppy, dun-key-level, dun-hole):
      (dun-correct-answer, dun-lastdir, dun-numsaves, dun-jar, dun-dead):
      (room, dun-numcmds, dun-wizard, dun-endgame-question, dun-logged-in):
      (dungeon-mode, dun-unix-verbs, dun-dos-verbs, dun-batch-mode):
      (dun-cdpath, dun-cdroom, dun-uncompressed, dun-ethernet):
      (dun-restricted, dun-ftptype, dun-endgame, dun-rooms):
      (dun-light-rooms, dun-verblist, dun-inbus, dun-nomail, dun-ignore):
      (dun-mode, dun-sauna-level, north, south, east, west, northeast):
      (southeast, northwest, southwest, up, down, in, out, dungeon-map):
      (dun-objnames, obj-special, dun-room-objects, dun-room-silents):
      (dun-inventory, dun-objects, dun-object-lbs, dun-object-pts):
      (dun-objfiles, dun-perm-objects, dun-physobj-desc, dun-permobj-desc):
      (dun-diggables, dun-room-shorts, dun-endgame-questions): Move to the
      top of the file, before any uses.
      33400529