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)
                        '("foo"
                          "barfoobaz"
                          "foobarbaz"
                          "barbazfoo"
                          "fabrobazo"
                          "foot"
                          "foto"
                          "fotttttttttttttttttttttttto"))
            (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
      flex-score-match-tightness.
      (completion-pcm--hilit-commonality): Update function.
      0d19e08d
    • 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.
      a4c7de35
    • 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.
      e2050920
    • 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.
      ef718cbe
    • João Távora's avatar
      fabfb54d
    • 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
      project-query-replace-regexp.
      33dbe23b
  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
      correct.
      
      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.
      a48099ce
    • 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:
      https://lists.gnu.org/r/emacs-devel/2019-02/msg00334.html
      9a7519ce
    • 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.
      b0e318d2
    • 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.
      e4896fcb
    • 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.
      10527fca
    • Paul Eggert's avatar
      Don’t assume CURRENT_TIME_LIST · ae4bfd52
      Paul Eggert authored
      * lisp/progmodes/cc-cmds.el (c-progress-init)
      (c-progress-update):
      * lisp/progmodes/cperl-mode.el (cperl-time-fontification):
      * lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
      (vhdl-fix-case-region-1):
      Don’t assume (current-time) returns a list.
      Fix unlikely bug if we’re called 65536 seconds apart.
      ae4bfd52
    • 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.
      8e0d3580
    • 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.
      7ee12d95
    • 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>
      21eef9fa
    • 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.
      dd319f27
  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)
      d41f9123
    • 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’.
      2860f6ce
    • 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.
      93241242
    • 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)
      (gnus-delay-send-queue):
      * 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)
      (org-clocktable-steps):
      * 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)
      (vc-cvs-parse-entry):
      Simplify use of encode-time.
      * lisp/org/org-clock.el (org-clock-get-clocked-time):
      (org-clock-resolve, org-resolve-clocks, org_clock_out)
      (org-clock-update-time-maybe):
      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)
      (org-closest-date):
      Use org-time-string-to-time instead of doing it by hand with
      encode-time.
      * lisp/org/org.el (org-current-time): Simplify rounding.
      (org-read-date): Avoid extra trip through encode-time.
      988e37fa
    • 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.
      3eb63da1
    • 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.
      57c74793
  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.
      
      Bug#34290
      1e155dcc
    • 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.
      b3092b28
    • 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.
      61748cd7
    • 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.
      ac1e5a5e
    • 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
      0f994050
    • 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.
      4f138318