1. 15 Feb, 2019 2 commits
  2. 14 Feb, 2019 7 commits
    • João Távora's avatar
      Change scoring strategy for 'flex' completion style · 0d19e08d
      João Távora authored
      The previous strategy had problems comparing scores of matches to
      strings of different lengths.  This one seems slightly more sensible,
      and uses a new constant `flex-score-match-tightness' instead of the
      more abstract `flex-score-falloff'.
      It's not completely without problems, and I think it shouldn't count
      "holes" at the front and at the back, but that needs a different
      "pattern-to-regexp" conversion in completion-pcm--hilit-commonality.
      (defun test ()
        (mapcar (lambda (a)
                  (cons (substring-no-properties a)
                        (get-text-property 0 'completion-score a)))
                (sort (completion-pcm--hilit-commonality
                        '(prefix "f" star "o" star "o" point)
            (lambda (a b)
              (> (get-text-property 0 'completion-score a)
                 (get-text-property 0 'completion-score b))))))
      (let ((flex-score-match-tightness 100)) (test))
      => (("foo" . 1.0)
          ("foot" . 0.375)
          ("foto" . 0.375)
          ("foobarbaz" . 0.16260162601626016) ;; one hole
          ("barbazfoo" . 0.16260162601626016) ;; one hole
          ("barfoobaz" . 0.10964912280701755) ;; two holes
          ("fabrobazo" . 0.10964912280701755) ;; two holes
          ("fotttttttttttttttttttttttto" . 0.04982561036372696))
      (let ((flex-score-match-tightness 0.1)) (test))
      => (("foo" . 1.0)
          ("foot" . 0.375)
          ("foto" . 0.375)
          ("barfoobaz" . 0.007751937984496124) ;; two holes
          ("fabrobazo" . 0.007751937984496124) ;; two holes
          ("foobarbaz" . 0.00641025641025641)  ;; one hole
          ("barbazfoo" . 0.00641025641025641)  ;; one hole
          ("fotttttttttttttttttttttttto" . 0.0004789272030651341))
      * lisp/minibuffer.el (flex-score-falloff): Rename to
      (completion-pcm--hilit-commonality): Update function.
    • Mattias Engdegård's avatar
      Add categories L, R, SPC and . to `rx' doc string · a4c7de35
      Mattias Engdegård authored
      * lisp/emacs-lisp/rx.el (rx): Add new categories to doc string.
    • Mattias Engdegård's avatar
      Use lexical-binding in rx.el · e2050920
      Mattias Engdegård authored
      * lisp/emacs-lisp/rx.el: Use lexical-binding.
      (rx-form): Use `let' to bind the dynamic variable `rx-parent' instead
      of binding it as an argument.
    • João Távora's avatar
    • Michael Albinus's avatar
      Adapt tramp-adb-handle-set-file-times · ef718cbe
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
      Use 'touch -d', 'touch -t' does not seem to work.  Use Universal Time.
    • João Távora's avatar
    • Dmitry Gutov's avatar
      Rename project-query-replace to project-query-replace-regexp · 33dbe23b
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-query-replace): Rename to
  3. 13 Feb, 2019 10 commits
    • Gregor Zattler's avatar
      * doc/misc/eshell.texi (Built-ins): Fix alias description · a48099ce
      Gregor Zattler authored
      Dear eamcs developers, eshells current documentation first states
      that alias definitions are not saved to an alias file, later that
      they are saved to an alias file.  I tested it and the latter is
      Please find attached a patch which fixes this.
      Thanks for working on emacs which is really great, Gregor
      >From 1fe51cc769ab7a30d0896fb3d6105c0561243fa7 Mon Sep 17 00:00:00 2001
      From: Gregor Zattler <telegraph@gmx.net>
      Date: Wed, 13 Feb 2019 20:19:38 +0100
      Subject: * doc/misc/eshell.texi (Built-ins): Fix alias description.
      Bring description of built-in 'alias' in line with (info "(eshell) Aliases"),
      which describes the actual behaviur.
    • Paul Eggert's avatar
      Add missing dependency to ucs-normalize.el · 9a7519ce
      Paul Eggert authored
      * lisp/international/ucs-normalize.el:
      Require regexp-opt when compiling.  Problem reported by hx in:
    • João Távora's avatar
      Score flex-style completions according to match tightness · b0e318d2
      João Távora authored
      The new completion style needs to score completion matches so that we
      can use it later on when sorting the completions.  This is because
      "foo" can flex-match "foobar", "frodo" and "barfromsober" but we
      probably want "foobar" to appear at the top of the completion list.
      This change introduces a scoring formula and adds scoring hints in the
      candidate string's `completion-score' property.
      * lisp/minibuffer.el (completion-pcm--hilit-commonality): Propertize
      completion with 'completion-score
      (flex-score-falloff): New variable.
    • João Távora's avatar
      Add a new 'flex' completion style · e4896fcb
      João Távora authored
      * lisp/minibuffer.el (completion-styles-alist): Add flex.
      (completion-substring--all-completions): Accept
      transform-pattern-fn arg.
      (completion-flex-all-completions, completion-flex-try-completion)
      (completion-flex--make-flex-pattern): New functions.
    • Eli Zaretskii's avatar
      Avoid crashes upon C-g in nested invocations of 'read_char' · 10527fca
      Eli Zaretskii authored
      * src/keyboard.c (read_char, read_event_from_main_queue):
      Ensure the global value of getcjmp is restored when the stack
      is unwound by the likes of 'throw', by calling
      record_unwind_protect_ptr instead of restoring the value
      manually.  (Bug#34394)
      (restore_getcjmp): Argument is now 'void *', to match the
      signature of record_unwind_protect_ptr.
    • Paul Eggert's avatar
      Don’t assume CURRENT_TIME_LIST · ae4bfd52
      Paul Eggert authored
      * lisp/progmodes/cc-cmds.el (c-progress-init)
      * lisp/progmodes/cperl-mode.el (cperl-time-fontification):
      * lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
      Don’t assume (current-time) returns a list.
      Fix unlikely bug if we’re called 65536 seconds apart.
    • Paul Eggert's avatar
      Don’t assume CURRENT_TIME_LIST · 8e0d3580
      Paul Eggert authored
      * lisp/url/url-util.el (url-lazy-message):
      Don’t assume (current-time) returns a list.
      Fix unlikely bug if we’re called 65536 seconds apart.
    • Paul Eggert's avatar
      Simplify nnspool-request-newgroups arithmetic · 7ee12d95
      Paul Eggert authored
      * lisp/gnus/nnspool.el (nnspool-request-newgroups):
      Simplify by compute time stamps as integers, not floats,
      since integers don’t overflow any more.
    • Jackson Ray Hamilton's avatar
      Indent arrows’ expression bodies like function bodies (Bug#25904) · 21eef9fa
      Jackson Ray Hamilton authored
      * lisp/progmodes/js.el (js--continued-expression-p): Don’t confuse
      ‘=>’ for a ‘>’ operator.
      (js--line-terminating-arrow-re): New variable.
      (js--looking-at-broken-arrow-function-p): New function.
      (js--proper-indentation): Don’t align arrow functions’ expression
      bodies starting on new lines like list continuations, instead align
      them like function bodies (js-indent-align-list-continuation need not
      be nil).
      * test/manual/indent/js.js: Add test for Bug#25904.
      Co-authored-by: default avatarFelipe Ochoa <felipe@fov.space>
    • Jackson Ray Hamilton's avatar
      js-indent-align-list-continuation: Make variable safe · dd319f27
      Jackson Ray Hamilton authored
      * lisp/progmodes/js.el (js-indent-align-list-continuation): Indicate
      variable is safe as a file-local variable.  This fixes the
      js-indent-align-list-continuation-nil test when run with make.
  4. 12 Feb, 2019 2 commits
  5. 11 Feb, 2019 6 commits
    • Mattias Engdegård's avatar
      Add missing categories L, R, . and SPC to rx · d41f9123
      Mattias Engdegård authored
      * lisp/emacs-lisp/rx.el (rx-categories):
      Add missing categories L, R, . and SPC.  (Bug#34436)
    • Paul Eggert's avatar
      Simplify url-digest-auth-make-cnonce · 2860f6ce
      Paul Eggert authored
      * lisp/url/url-auth.el (url-digest-auth-make-cnonce):
      Simplify by using encode-time instead of round-tripping
      through a format-time-string and ‘read’.
    • Paul Eggert's avatar
      Don’t assume CURRENT_TIME_LIST · 93241242
      Paul Eggert authored
      Use timestamp accessors instead of delving into a timestamp
      format that is planned to change in a future version.
      * lisp/find-lisp.el (find-lisp-format-time):
      * lisp/gnus/gnus-group.el (gnus-group-set-timestamp):
      * lisp/gnus/gnus-icalendar.el (gnus-icalendar-show-org-agenda):
      Use encode-time instead of delving into timestamp format.
      * lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
      Use float-time instead of delving into timestamp format.
      * lisp/gnus/nnmaildir.el (nnmaildir-request-accept-article):
      Use format-time-string instead of delving into timestamp format.
      * lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
      Use time-less-p instead of delving into timestamp format.
      * lisp/ido.el (ido-wash-history, ido-file-name-all-completions):
      Use time-equal-p instead of delving into timestamp format.
      * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
      Use format-time-string to generate POSIX ‘test -t’ format instead
      of timestamp-format-dependent code along with shell arithmetic
      that can’t possibly do the right thing on a POSIX platform.
    • Paul Eggert's avatar
      Simplify use of encode-time · 988e37fa
      Paul Eggert authored
      Most uses of (apply #'encode-time foo) can now be replaced
      with (encode-time foo).  Make similar simplifications.
      * lisp/calendar/time-date.el (date-to-time):
      * lisp/calendar/timeclock.el (timeclock-when-to-leave)
      (timeclock-day-base, timeclock-generate-report):
      * lisp/emacs-lisp/timer.el (timer-set-idle-time):
      * lisp/eshell/esh-util.el (eshell-parse-ange-ls):
      * lisp/gnus/gnus-art.el (article-make-date-line):
      * lisp/gnus/gnus-delay.el (gnus-delay-article)
      * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event--decode-datefield):
      * lisp/gnus/gnus-logic.el (gnus-advanced-date):
      * lisp/gnus/message.el (message-make-expires-date):
      * lisp/gnus/nndiary.el (nndiary-compute-reminders):
      * lisp/mail/ietf-drums.el (ietf-drums-parse-date):
      * lisp/net/tramp-adb.el (tramp-adb-ls-output-time-less-p):
      * lisp/org/org-agenda.el (org-agenda-get-timestamps)
      (org-agenda-get-progress, org-agenda-show-clocking-issues):
      * lisp/org/org-capture.el (org-capture-set-target-location):
      * lisp/org/org-clock.el (org-clock-get-sum-start, org-clock-sum)
      * lisp/org/org-colview.el (org-colview-construct-allowed-dates)
      * lisp/org/org-macro.el (org-macro--vc-modified-time):
      * lisp/org/org-table.el (org-table-eval-formula):
      * lisp/org/org.el (org-current-time, org-store-link)
      (org-time-today, org-read-date, org-read-date-display)
      (org-display-custom-time, org-time-string-to-time)
      (org-timestamp-change, org-timestamp--to-internal-time):
      * lisp/url/url-dav.el (url-dav-process-date-property):
      * lisp/vc/vc-cvs.el (vc-cvs-annotate-current-time)
      Simplify use of encode-time.
      * lisp/org/org-clock.el (org-clock-get-clocked-time):
      (org-clock-resolve, org-resolve-clocks, org_clock_out)
      Avoid some rounding problems with encode-time and float-time.
      * lisp/org/org-clock.el (org-clock-in, org-clock-update-time-maybe):
      * lisp/org/org-colview.el (org-columns--age-to-minutes):
      * lisp/org/org.el (org-get-scheduled-time, org-get-deadline-time)
      (org-add-planning-info, org-2ft, org-time-string-to-absolute)
      Use org-time-string-to-time instead of doing it by hand with
      * lisp/org/org.el (org-current-time): Simplify rounding.
      (org-read-date): Avoid extra trip through encode-time.
    • Paul Eggert's avatar
      Fix doc string treatment of integer overflow · 3eb63da1
      Paul Eggert authored
      * lisp/calendar/cal-dst.el (calendar-dst-find-startend):
      Fix doc string.
    • Paul Eggert's avatar
      Prefer encode-time to its alias · 57c74793
      Paul Eggert authored
      * lisp/calendar/icalendar.el, lisp/calendar/timeclock.el:
      * lisp/emacs-lisp/timer.el, lisp/gnus/gnus-delay.el:
      * lisp/gnus/gnus-sum.el, lisp/gnus/nndiary.el:
      * lisp/gnus/nnrss.el, lisp/net/newst-backend.el:
      * lisp/net/rcirc.el, lisp/obsolete/xesam.el:
      * lisp/org/org-agenda.el, lisp/org/org-clock.el:
      * lisp/org/org-element.el, lisp/org/org-timer.el:
      * lisp/org/org.el, lisp/progmodes/flymake.el:
      * lisp/url/url-cache.el, lisp/url/url-cookie.el:
      Use encode-time instead of its alias seconds-to-time.
  6. 10 Feb, 2019 7 commits
  7. 08 Feb, 2019 6 commits
    • Alex Branham's avatar
      Fix byte compile warnings in checkdoc.el · 1e155dcc
      Alex Branham authored
      * lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Fix
        byte compile warnings by requiring lisp-mnt top-level, remove XEmacs
        compatibility code.
    • Tassilo Horn's avatar
      Impl. json-pretty-print with replace-region-contents + minimization · b3092b28
      Tassilo Horn authored
      * lisp/json.el (json-pretty-print): Use the new
        replace-region-contents.  Add prefix arg for minimzation.
      (json-pretty-print-buffer): Add prefix arg for minimzation.
      (json-pretty-print-buffer-ordered): Add prefix arg for minimzation.
      (json-pretty-print-ordered): Add prefix arg for minimzation.
    • Tassilo Horn's avatar
      Add new function replace-buffer-contents · 61748cd7
      Tassilo Horn authored
      * src/editfns.c (Freplace_buffer_contents): Use lower value of
        too_expensive and enable heuristic.
      * lisp/subr.el (replace-region-contents): New convenient wrapper
        function around replace-buffer-contents.
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/package.el: Improve generated foo-pkg.el · ac1e5a5e
      Stefan Monnier authored
      (package-generate-description-file): Make first line more informative.
      (package-buffer-info): Include keywords, to more closely match
      elpa.git's archive--metadata.
    • Glenn Morris's avatar
      Merge from origin/emacs-26 · 0f994050
      Glenn Morris authored
      0cd7b526 (origin/emacs-26) Minor improvements to do strings in callproc.c
      b8c70172 Improve documentation of 'date-to-time' and 'parse-time-string'
      46095a7d Fix downloading of URLs that end in a slash
      3b60a0ad * doc/misc/eww.texi (Basics): Fix eww keybindings.  (Bug#34291)
      8e22025f Fix process-thread docstring
      459b669b Fix failures of vc-find-revision with non-ASCII file names
      e9ff1905 * doc/lispref/tips.texi (Documentation Tips): Fix quotes.  (B...
      3e49a080 ; * src/coding.h (struct coding_system): Fix a typo in a comm...
      b657286a Add documentation for tabulated-list functions in the elisp m...
      6e0f67b2 Fix URL in ucs-normalize.el
      ce3ae1f8 * etc/PROBLEMS: Amend entry for profiler bug #34235 to mentio...
      # Conflicts:
      #	doc/lispref/os.texi
    • Glenn Morris's avatar
      ; Merge from origin/emacs-26 · 4f138318
      Glenn Morris authored
      The following commit was skipped:
      b51ac456 * make-dist: Remove references to src/stamp-h.in.