[elpa] externals/elisp-benchmarks fe6aa3e 2/2: * Use the Emacs native compiler if available
branch: externals/elisp-benchmarks commit fe6aa3ec9ca5f7568d7a1e5005382343b3bd9143 Author: Andrea Corallo Commit: Andrea Corallo * Use the Emacs native compiler if available * elisp-benchmarks.el: Update version. (elisp-benchmarks-run): Use native compiler if available. --- elisp-benchmarks.el | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/elisp-benchmarks.el b/elisp-benchmarks.el index 5ac9b44..9e70620 100644 --- a/elisp-benchmarks.el +++ b/elisp-benchmarks.el @@ -4,7 +4,7 @@ ;; Author: Andrea Corallo ;; Maintainer: Andrea Corallo -;; Version: 1.4 +;; Version: 1.5 ;; Keywords: languages, lisp ;; Package-Type: multi ;; Created: 2019-01-12 @@ -85,6 +85,10 @@ RECOMPILE all the benchmark folder when non nil." repeat runs for i from 1 named test-loop + with native-comp = (boundp 'comp-ctxt) ; FIXME when possible + with compile-function = (if native-comp + #'native-compile +#'byte-compile-file) with res = (make-hash-table :test #'equal) with sources = (directory-files elb-bench-directory t "\\.el$") with tests = (if selector @@ -93,9 +97,20 @@ RECOMPILE all the benchmark folder when non nil." collect (file-name-base f)) (mapcar #'file-name-base sources)) initially - (if recompile - (mapc (lambda (f) (byte-compile-file f t)) sources) -(mapc #'load (mapcar #'file-name-sans-extension sources))) + (when native-comp +(require 'comp) +(setf comp-speed 3)) + ;; Compile + (when recompile +(mapc (lambda (f) +(message "Compiling... %s" f) +(funcall compile-function f t)) + sources)) + ;; Load + (mapc #'load (mapcar (if native-comp + #'comp-output-filename + #'file-name-sans-extension) + sources)) (cl-loop for test in tests do (puthash test () res)) do
[elpa] externals/elisp-benchmarks updated (4c57eab -> fe6aa3e)
akrl pushed a change to branch externals/elisp-benchmarks. from 4c57eab * elisp-benchmarks.el: Typo fix new 179bf40 * elisp-benchmarks.el (elisp-benchmarks-run): Recompile by default. new fe6aa3e * Use the Emacs native compiler if available Summary of changes: elisp-benchmarks.el | 25 - 1 file changed, 20 insertions(+), 5 deletions(-)
[elpa] externals/elisp-benchmarks 179bf40 1/2: * elisp-benchmarks.el (elisp-benchmarks-run): Recompile by default.
branch: externals/elisp-benchmarks commit 179bf402e1f2ec447272644c6bdfd0b1fdfe3104 Author: Andrea Corallo Commit: Andrea Corallo * elisp-benchmarks.el (elisp-benchmarks-run): Recompile by default. --- elisp-benchmarks.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elisp-benchmarks.el b/elisp-benchmarks.el index ca8dc58..5ac9b44 100644 --- a/elisp-benchmarks.el +++ b/elisp-benchmarks.el @@ -74,7 +74,7 @@ (1- n) ;;;###autoload -(defun elisp-benchmarks-run (&optional selector recompile runs) +(cl-defun elisp-benchmarks-run (&optional selector (recompile t) runs) "Run all the benchmarks and present the results. If non nil SELECTOR is a regexp to match the benchmark names to be executed. The test is repeated RUNS number of times. If RUNS is nil `elb-runs' is used as
[elpa] externals/ebdb f28b665 5/6: Prevent sort from actually altering record mails
branch: externals/ebdb commit f28b6656b27d2ff44d478b3d756409d2cf5d7500 Author: Eric Abrahamsen Commit: Eric Abrahamsen Prevent sort from actually altering record mails * ebdb.el (ebdb-record-mail): Is this actually necessary? Obviously there's something I don't understand about sort. --- ebdb.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebdb.el b/ebdb.el index 3fb6e75..977bacf 100644 --- a/ebdb.el +++ b/ebdb.el @@ -4499,7 +4499,7 @@ addresses. Sort mails by descending priority." mails))) (if label (object-assoc label 'label mails) - (sort mails #'ebdb-field-compare + (sort (copy-sequence mails) #'ebdb-field-compare
[elpa] externals/ebdb 4027218 3/6: Have ebdb-record-mail sort mails by priority
branch: externals/ebdb commit 4027218c7a47f96b23212d302dd084e58fa9ab06 Author: Eric Abrahamsen Commit: Eric Abrahamsen Have ebdb-record-mail sort mails by priority Fixes #87 * ebdb.el (ebdb-record-mail): Primary mails first. --- ebdb.el | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ebdb.el b/ebdb.el index 25eff4b..6788310 100644 --- a/ebdb.el +++ b/ebdb.el @@ -4484,7 +4484,7 @@ If RECORDS are given, only search those records." If NO-ROLES is non-nil, exclude mail fields from RECORD's roles. If LABEL is a string, return the mail with that label. If DEFUNCT is non-nil, also consider RECORD's defunct mail -addresses." +addresses. Sort mails by descending priority." (let ((mails (slot-value record 'mail))) (when (and (null no-roles) (slot-exists-p record 'organizations)) (dolist (r (slot-value record 'organizations)) @@ -4499,7 +4499,10 @@ addresses." mails))) (if label (object-assoc label 'label mails) - mails))) + (sort mails (lambda (m1 m2) + (or (eql (slot-value m1 'priority) 'primary) + (and (eql (slot-value m1 'priority) 'normal) +(eql (slot-value m2 'priority) 'defunct
[elpa] externals/ebdb d0321ab 2/6: Fix to previous anniversary display defcustoms
branch: externals/ebdb commit d0321aba6226e11fb56a1c28be4eb57e209eca55 Author: Eric Abrahamsen Commit: Eric Abrahamsen Fix to previous anniversary display defcustoms Still attempting to address #88 * ebdb.el (ebdb-string): Missing year needs to be given as 0, not nil. --- ebdb.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebdb.el b/ebdb.el index c3ad803..25eff4b 100644 --- a/ebdb.el +++ b/ebdb.el @@ -2158,7 +2158,7 @@ Eventually this method will go away." `(0 0 0 ,(nth 1 date) ,(car date) - ,(nth 2 date) + ,(or (nth 2 date) 0) nil nil nil (format-time-string (if (nth 2 date)
[elpa] externals/ebdb 4f72046 1/6: New defcustoms handling formatting of anniversary dates
branch: externals/ebdb commit 4f72046550c72a134cc4d25f2f525b4c8448bc6e Author: Eric Abrahamsen Commit: Eric Abrahamsen New defcustoms handling formatting of anniversary dates Partially addresses #88, but we should be handling the different calendars as well. * ebdb.el (ebdb-anniversary-md-format, ebdb-anniversary-ymd-format): New options handling date formatting strings. * ebdb.el (ebdb-string): Use new options. --- ebdb.el | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/ebdb.el b/ebdb.el index 6090ee9..c3ad803 100644 --- a/ebdb.el +++ b/ebdb.el @@ -340,9 +340,24 @@ Emacs, always query before reverting." :group 'ebdb-utilities-anniv :type 'boolean) +(defcustom ebdb-anniversary-md-format "%B %d" + "Format string used for displaying month-day anniversary dates. +See the docstring of `format-time-string' for the meaning of +various formatting escapes, but keep in mind that only month and +day values are available." + :group 'ebdb-utilities-anniv + :type 'string) + +(defcustom ebdb-anniversary-ymd-format "%B %d, %Y" + "Format string used for displaying year-month-day anniversary dates. +See the docstring of `format-time-string' for the meaning of +various formatting escapes, but keep in mind that only year, +month, and day values are available." + :group 'ebdb-utilities-anniv + :type 'string) + (defvar ebdb-diary-entries nil "A list of all anniversary diary entries. - Entries are added and removed in the `ebdb-init-field' and `ebdb-delete-field' methods of the `ebdb-field-anniversary' class, and added with the `ebdb-diary-add-entries' function. @@ -2129,15 +2144,6 @@ Eventually this method will go away." (list month day year)) obj))) -(cl-defmethod ebdb-string ((ann ebdb-field-anniversary)) - (let* ((date (slot-value ann 'date)) -(month-name (aref calendar-month-name-array - (1- (nth 0 date -(str (format "%s %d" month-name (nth 1 date -(when (nth 2 date) - (setq str (concat str (format ", %d" (nth 2 date) -str)) - ;; `ebdb-field-anniv-diary-entry' is defined below. (cl-defmethod ebdb-init-field ((anniv ebdb-field-anniversary) record) (when ebdb-use-diary @@ -2145,6 +2151,21 @@ Eventually this method will go away." 'ebdb-diary-entries (ebdb-field-anniv-diary-entry anniv record +(cl-defmethod ebdb-string ((ann ebdb-field-anniversary)) + (let* ((date (slot-value ann 'date)) +(encoded (encode-time + ;; Why did I reverse the day month order?! + `(0 0 0 + ,(nth 1 date) + ,(car date) + ,(nth 2 date) + nil nil nil +(format-time-string + (if (nth 2 date) +ebdb-anniversary-ymd-format + ebdb-anniversary-md-format) + encoded))) + (cl-defmethod ebdb-delete-field ((anniv ebdb-field-anniversary) record &optional _unload) (when ebdb-use-diary
[elpa] externals/ebdb 3913555 4/6: Update last commit
branch: externals/ebdb commit 39139a25423eb6698f067d97b2e47bb26ce6 Author: Eric Abrahamsen Commit: Eric Abrahamsen Update last commit * ebdb.el (ebdb-record-mail): Forgot we already have `ebdb-field-compare' for sorting. --- ebdb.el | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ebdb.el b/ebdb.el index 6788310..3fb6e75 100644 --- a/ebdb.el +++ b/ebdb.el @@ -4499,10 +4499,7 @@ addresses. Sort mails by descending priority." mails))) (if label (object-assoc label 'label mails) - (sort mails (lambda (m1 m2) - (or (eql (slot-value m1 'priority) 'primary) - (and (eql (slot-value m1 'priority) 'normal) -(eql (slot-value m2 'priority) 'defunct + (sort mails #'ebdb-field-compare
[elpa] externals/ebdb 15f5bd8 6/6: Don't do anything clever with phone numbers by default
branch: externals/ebdb commit 15f5bd8228be10b14f6c357519bfebfbf50d98aa Author: Eric Abrahamsen Commit: Eric Abrahamsen Don't do anything clever with phone numbers by default Fixes #89 * ebdb.el (ebdb-string): Just dump the string out. (ebdb-parse): Accept everything between the area code and an extension as the number, don't do any "parsing". People can use i18n libs if they want. --- ebdb.el | 45 + 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/ebdb.el b/ebdb.el index 977bacf..1fcd5ab 100644 --- a/ebdb.el +++ b/ebdb.el @@ -1915,17 +1915,7 @@ The result looks like this: (when extension (push (format "X%d" extension) outstring)) (when number - (let ((numstring (split-string number "" t))) - (push - (apply #'format (cl-case (length numstring) -(7 - "%s%s%s-%s%s%s%s") -(8 - "%s%s%s%s-%s%s%s%s") -(t - number)) - numstring) - outstring))) + (push number outstring)) (when area-code (push (format "(%d) " area-code) outstring)) (when country-code @@ -1993,25 +1983,24 @@ The result looks like this: (plist-put slots :area-code (string-to-number (match-string 1 (goto-char (match-end 0) ;; There is no full regexp for the main phone number. We just - ;; chomp up any and all numbers that come after the area code, - ;; until we hit an extension, or the end of the buffer. All - ;; phone slots but "number" are actually saved as numbers. The - ;; "number" is saved as a string, partially for ease in - ;; formatting, partially because if it's too long Emacs turns it + ;; chomp up everything that comes after the area code, until we + ;; hit an extension, or the end of the buffer. All phone slots + ;; but "number" are actually saved as numbers. The "number" is + ;; saved as a string, partially because it isn't really a + ;; number, partially because if it's too long Emacs turns it ;; into a float, which is a pain in the ass. - (unless (plist-member slots :number) - (while (and (< (point) (point-max)) - (null (looking-at-p ext-regexp)) - (looking-at "[ \t]?\\([0-9]+\\)[- .]?")) - (setq acc (concat acc (match-string-no-properties 1))) - (goto-char (match-end 0))) - (setq slots - (plist-put slots :number acc))) - (unless (plist-member slots :number) - (when (looking-at ext-regexp) + (when (and (< (point) (point-max)) +(re-search-forward (format "\\([^[:blank:]]+\\)\\(%s\\)?" + ext-regexp))) + (unless (plist-member slots :number) (setq slots - (plist-put slots :extension (string-to-number -(match-string 1))) + (plist-put slots :number (match-string 1 + (unless (or (plist-member slots :extension) + (null (match-string 2))) + (setq slots + (plist-put slots :extension + (string-to-number + (match-string 2))) (cl-call-next-method class string slots))) (cl-defmethod cl-print-object ((phone ebdb-field-phone) stream)
[elpa] externals/ebdb updated (5d8b473 -> 15f5bd8)
girzel pushed a change to branch externals/ebdb. from 5d8b473 Fix Org links that initiate tag searches, bump to 0.6.17 new 4f72046 New defcustoms handling formatting of anniversary dates new d0321ab Fix to previous anniversary display defcustoms new 4027218 Have ebdb-record-mail sort mails by priority new 3913555 Update last commit new f28b665 Prevent sort from actually altering record mails new 15f5bd8 Don't do anything clever with phone numbers by default Summary of changes: ebdb.el | 90 - 1 file changed, 50 insertions(+), 40 deletions(-)