[elpa] master 7356cf0: [el-search] Shorten el-search-query-replace prompt again

2019-04-24 Thread Michael Heerdegen
branch: master
commit 7356cf05c5bbf3ffd3709232386909b5e7d0fc61
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

[el-search] Shorten el-search-query-replace prompt again

Also update header and bump version to 1.12.2.

* packages/el-search/el-search.el
(el-search--search-and-replace-pattern): Force using no dialog box
which won't work with the large variety of choices.  Emacs would try
to use a dialog box when resuming a session with the menu entry
"Resume Query-Replace".
Use shorter names for 'read-multiple-choice' so that the prompt fits
in one line.
Change o (show) and e (ediff) to e (edit) and E (Ediff).
---
 packages/el-search/NEWS |  6 ++
 packages/el-search/el-search.el | 23 ---
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/packages/el-search/NEWS b/packages/el-search/NEWS
index 8bb6b21..ebf52af 100644
--- a/packages/el-search/NEWS
+++ b/packages/el-search/NEWS
@@ -1,6 +1,12 @@
 Some of the user visible news were:
 
 
+Version: 1.12.2
+
+  Some changes to the 'el-search-query-replace' prompt to make it
+  shorter.  The keys o and e to show and ediff the replacement changed
+  to e and E ("edit", "Ediff").
+
 Version: 1.12.1
 
   Like searches, 'el-search-query-replace' sessions are now also
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 5ce4530..2c28e4e 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 1.12.1
+;; Version: 1.12.2
 ;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0"))
 
 
@@ -333,7 +333,7 @@
 ;; There are two ways to edit replacements directly while performing
 ;; an el-search-query-replace:
 ;;
-;; (1) Without suspending the search: hit o at the prompt to show the
+;; (1) Without suspending the search: hit e at the prompt to show the
 ;; replacement of the current match in a separate buffer.  You can
 ;; edit the replacement in this buffer.  Confirming with C-c C-c will
 ;; make el-search replace the current match with this buffer's
@@ -4609,6 +4609,7 @@ exactly you did?  Thanks!"
  (kill-buffer buffer))
(el-search--after-scroll (selected-window) 
(window-start))
nil)))
+  (use-dialog-box nil)
   (query
(lambda ()
  (if stopped-for-comments
@@ -4633,24 +4634,24 @@ exactly you did?  Thanks!"
  '(?n "n" "Move to the next 
match"))
 '(?r "r" "\
 Replace match but don't move or restore match if already replaced")
-'(?! "all" "Replace all remaining 
matches in this buffer")
+'(?! "!" "Replace all remaining 
matches in this buffer")
 '(?b "skip buf"
  "Skip this buffer and any 
remaining matches in it")
 (and buffer-file-name
- '(?d "skip dir"
+ '(?d "dir"
   "Skip a parent directory 
of current file"))
 (and (not replaced-this)
- (list ?s (concat (if splice 
"disable" "enable")
-  " splice")
+ (list ?s (concat (if splice 
"no " "")
+  "splice")

(substitute-command-keys "\
 Toggle splicing mode (\\[describe-function] el-search-query-replace for 
details)")))
-'(?o "show" "\
+'(?e "edit" "\
 Show current replacement in a separate buffer - you can modify it there")
-'(?e "ediff" "\
+'(?E "Ediff" "\
 Ediff match with replacement")
 '(?q  "quit")
 '(?\r "quit")
-'(?S "Search" "\
+'(?S "S" "\
 Switch to driving search.  Useful to reposition search head.")
  (when (and
 stop-for-comments
@@ -4757,9 +4758,9 @@ Replace all matches in all buffers"
   

[elpa] master a28a7ec: [el-search] Query-replace: Change skip keys

2019-04-24 Thread Michael Heerdegen
branch: master
commit a28a7ecb94077d3e27ea31a0ba3f92f6f4afa080
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

[el-search] Query-replace: Change skip keys

Move the keys in the 'el-search-query-replace' prompt to skip matches
inside replacements away from y and n so that they can't be used by
accident.
Also bump version to 1.12.3.

* packages/el-search/el-search.el
(el-search--search-and-replace-pattern): Change keys to skip matches
in replacements from y/n/Y/N to s/d/S/D.
---
 packages/el-search/el-search.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 2c28e4e..e7357d3 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 1.12.2
+;; Version: 1.12.3
 ;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0"))
 
 
@@ -4796,22 +4796,22 @@ Replace all matches in all buffers"
 (propertize
  "Skip the matches in the 
replacement? "
  'face 
'el-search-highlight-in-prompt-face)
-'((?y "yes"
+'((?s "skip"
   "Skip any matches in this 
replacement")
-  (?n "no"
+  (?d "don't"
   "Continue with the matches 
in the replacement")
-  (?Y "always Yes"
+  (?S "always Skip"
   "Skip now and for the rest 
of this session")
-  (?N "always No"
+  (?D "always Don't"
   "Don't skip now and for the 
rest of this session")
   (?q "quit"
   "Abort this query-replace 
session"
- ((and (or ?y ?Y) answer)
-  (when (= answer ?Y) (setq 
skip-matches-in-replacement t))
+ ((and (or ?s ?S) answer)
+  (when (= answer ?S) (setq 
skip-matches-in-replacement t))
   (funcall skip-replacement))
  (?q (signal 'quit t))
  (answer
-  (when (= answer ?N) (setq 
skip-matches-in-replacement nil))
+  (when (= answer ?D) (setq 
skip-matches-in-replacement nil))
   (when replace-all
 (setq replace-all nil)
 ;; FIXME: can this be annoying?  Problem: 
we need to catch possibly



[elpa] master 0ed0cd4: [el-search] Key syntax cleanup

2019-04-24 Thread Michael Heerdegen
branch: master
commit 0ed0cd47f8c823748da89226a5fae5ed71a6abaf
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

[el-search] Key syntax cleanup

Only bind events that are generated or result of key translation in
all environments; avoid binding events that are generated only in some
environments (e.g. depending on 'window-system') and typically
translated.
Also bump version to 1.12.4.

* packages/el-search/el-search.el (el-search-read-expression-map)
(el-search-basic-transient-map, el-search-occur-mode-map-1): Clean up
key syntax.
---
 packages/el-search/NEWS | 17 +
 packages/el-search/el-search.el | 15 +--
 2 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/packages/el-search/NEWS b/packages/el-search/NEWS
index ebf52af..e0fea03 100644
--- a/packages/el-search/NEWS
+++ b/packages/el-search/NEWS
@@ -1,6 +1,23 @@
 Some of the user visible news were:
 
 
+Version: 1.12.4
+
+  Key syntax cleanup: In some cases the code used to bind some keys
+  twice: it bound events E1 and E2 where in some environments hitting
+  a certain key generates E1 in in others E2 where E2 is normally
+  translated into E1.  For example, the code created bindings for
+  "\C-j" and also for [(meta return)], although binding only "\C-j"
+  would suffice because in environments where [(meta return)] is
+  created it would be immediately translated to "\C-j".
+
+  That means that should you add a binding for the event that is
+  generated only in some environments like [(meta return)] in the
+  respective key map you would get the effect that your binding
+  shadows the el-search binding in some environments and in others
+  not.  If you experience something like that, check your init file if
+  you do something like that.
+
 Version: 1.12.2
 
   Some changes to the 'el-search-query-replace' prompt to make it
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index e7357d3..0e1c1e5 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 1.12.3
+;; Version: 1.12.4
 ;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0"))
 
 
@@ -659,11 +659,10 @@ whole match visible whenever possible."
 (defvar el-search-read-expression-map
   (let ((map (make-sparse-keymap)))
 (set-keymap-parent map read-expression-map)
-(define-key map [(control ?g)] #'abort-recursive-edit)
+(define-key map "\C-g" #'abort-recursive-edit)
 (define-key map [up]   nil)
 (define-key map [down] nil)
-(define-key map [(control ?j)] #'newline)
-(define-key map [(meta return)] #'el-search-set-occur-flag-exit-minibuffer)
+(define-key map "\C-j" #'newline)
 (define-key map (kbd "M-RET")   #'el-search-set-occur-flag-exit-minibuffer)
 map)
   "Keymap for reading input with `el-search-read-expression'.")
@@ -2063,9 +2062,8 @@ Go back to the place where the search had been started."
 
 (defvar el-search-basic-transient-map
   (let ((map (make-sparse-keymap)))
-(define-key map [return]   #'el-search-pause-search)
 (define-key map (kbd "RET")#'el-search-pause-search)
-(define-key map [(control ?g)] #'el-search-keyboard-quit)
+(define-key map "\C-g" #'el-search-keyboard-quit)
 (define-key map [??]   #'el-search-help-list-bindings)
 (define-key map `[,help-char]  el-search-help-map)
 (define-key map [help] el-search-help-map)
@@ -3646,12 +3644,9 @@ Prompt for a new pattern and revert."
 
 (defvar el-search-occur-mode-map-1
   (let ((map (make-sparse-keymap)))
-(define-key map [tab]   #'el-search-occur-tab-command)
 (define-key map "\t"#'el-search-occur-tab-command)
-(define-key map [return]#'el-search-occur-jump-to-match)
 (define-key map "\r"#'el-search-occur-jump-to-match)
-(define-key map [S-iso-lefttab] #'el-search-occur-cycle)
-(define-key map [(shift tab)]   #'el-search-occur-cycle)
+(define-key map [backtab]   #'el-search-occur-cycle)
 (define-key map [?p]#'el-search-occur-previous-match)
 (define-key map [?n]#'el-search-occur-next-match)
 (define-key map [?r]#'el-search-occur-previous-match)



[elpa] master 430d715: [el-search] Prefer rx forms to stringish regexps

2019-04-24 Thread Michael Heerdegen
branch: master
commit 430d715d8db021ebced6280dbfc41e28c67f0d90
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

[el-search] Prefer rx forms to stringish regexps

* packages/el-search/el-search.el
(el-search--pushnew-to-history, el-search--ensure-sexp-start)
(el-search--make-docstring, el-search--looking-at-1)
(el-search-stream-of-directory-files, el-search-help-list-bindings--1)
(el-search-skip-directory, el-search-occur-mode)
(el-search--replace-hunk, el-search-query-replace-ediff-replacement)
(el-search-query-replace--read-args): Replace stringish regexps with
equivalent 'rx' forms.
---
 packages/el-search/el-search.el | 40 +---
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 0e1c1e5..3beb2d7 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -923,15 +923,14 @@ nil."
   ;; Push string INPUT to HISTVAR unless empty or equal to the head
   ;; element modulo `read'.  Reindent INPUT when multiline.
   (let ((hist-head (car (symbol-value histvar
-(unless (or (string-match-p "\\`\\'" input)
+(unless (or (string-match-p (rx bos eos) input)
 (and (stringp hist-head)
  (or (string= input hist-head)
  (ignore-errors (equal (el-search-read input) 
(el-search-read hist-head))
-  (push (if (string-match-p "\\`.+\n" input)
+  (push (if (string-match-p (rx bos (+ nonl) "\n") input)
 (with-temp-buffer
   (emacs-lisp-mode)
-  (unless (string-match-p "\\`\n" input)
-(insert "\n"))
+  (insert "\n")
   (insert input)
   (indent-region 1 (point))
   (buffer-string))
@@ -1178,7 +1177,7 @@ error."
 
;; FIXME: can the rest be done more generically?
((and (looking-at (rx (or (syntax symbol) (syntax word
- (not (looking-at "\\_<"))
+ (not (looking-at (rx symbol-start)))
  (not (funcall looking-at-from-back ",@" 2)))
 (forward-symbol 1))
((or (and (looking-at "'") (funcall looking-at-from-back "#" 1))
@@ -1226,7 +1225,8 @@ In addition to the standard `pcase' patterns the following
 pattern types are defined:")
   (mapc
(pcase-lambda (`(,symbol . ,fun))
- (unless (string-match-p "\\`[-_]\\|--" (symbol-name symbol)) ;Let's 
consider these "internal"
+ (unless (string-match-p (rx (or (seq bos (any "-" "_")) "--")) ;Let's 
consider these "internal"
+ (symbol-name symbol))
(when-let ((doc (documentation fun)))
  (insert "\n\n\n-- ")
  (setq doc (help-fns--signature symbol doc fun fun nil))
@@ -1882,7 +1882,7 @@ Unlike `count-matches' matches \"inside\" other matches 
also count."
(end-of-buffer nil))
  (or (= here (point))
  (and allow-leading-whitespace
-  (string-match-p "\\`[[:space:]]*\\'" (buffer-substring 
here (point)
+  (string-match-p (rx bos (+ space) eos) (buffer-substring 
here (point)
  (el-search--match-p matcher current-sexp))
 
 ;;;###autoload
@@ -2182,7 +2182,7 @@ that contain a file named \".nosearch\" are excluded as 
well."
 el-search-ignored-directory-regexps)
(and
 el-search-respect-nosearch
-(directory-files dir-name nil "\\`\\.nosearch\\'" t))
+(directory-files dir-name nil (rx bos ".nosearch" eos) 
t))
t #'el-search--elisp-file-p))
 
 
@@ -2242,7 +2242,7 @@ map until you finished el-searching."
   "`" (symbol-name cmd-name) "'"
   " (" (keys-string cmd-name) ")\n"
   (when-let ((docstring (documentation cmd-name)))
-(string-match "\\(\\`.*$\\)" docstring)
+(string-match (rx (group bos (0+ nonl) eol)) 
docstring)
 (concat (match-string 1 docstring) "\n"))
   "\n")
(concat "  "
@@ -3150,7 +3150,7 @@ continued."
  (or (bufferp buffer-or-file-name)
  ;; `file-in-directory-p' would be perfect here, but it calls
  ;; file-truename on both args what we don't want, so we use this:
- (string-match-p "\\`\\.\\." (file-relative-name buffer-or-file-name 
directory)
+ (string-match-p (rx bos "..") (file-relative-name buffer-or-file-name 
directory)
   (el-search-prefix-key-maybe-set-transient-map))
 
 (defun el-search-pattern--interactive (&optional prompt display-match-count)
@@ -3727,7 +3727,7 @@ addition from `specia

[elpa] externals/smalltalk-mode 9d543ba: * smalltalk-mode.el:

2019-04-24 Thread Stefan Monnier
branch: externals/smalltalk-mode
commit 9d543baa646c59bbe6573cef9f579faddbd7a7aa
Author: Derek Zhou 
Commit: Derek Zhou 

 * smalltalk-mode.el:

 ** remove some dead code
 ** we should use the same hotkey as other modes
 ** minor font lock tweaks
 ** smalltalk--smie-rules: use parent rule for hanging [
 ** add hideshow config
---
 smalltalk-mode.el | 74 ++-
 1 file changed, 18 insertions(+), 56 deletions(-)

diff --git a/smalltalk-mode.el b/smalltalk-mode.el
index 0e80a10..9f3a8f6 100644
--- a/smalltalk-mode.el
+++ b/smalltalk-mode.el
@@ -81,28 +81,6 @@ Requires Emacs≥23.3."
 
 (defvar smalltalk-mode-syntax-table
   (let ((table (make-syntax-table)))
-;; Make sure A-z0-9 are set to "w   " for completeness ;FIXME: Why bother?
-(let ((c 0))
-  (setq c ?0)
-  (while (<= c ?9)
-   (setq c (1+ c))
-   (modify-syntax-entry c "w   " table))
-  (setq c ?A)
-  (while (<= c ?Z)
-   (setq c (1+ c))
-   (modify-syntax-entry c "w   " table))
-  (setq c ?a)
-  (while (<= c ?z)
-   (setq c (1+ c))
-   (modify-syntax-entry c "w   " table)))
-;; FIXME: The settings below seem to indicate a desire to treat
-;;
-;; "/ ... \n
-;;
-;; as a comment, but it doesn't work.  I saw references to such
-;; comment syntax for Smalltalk/X but I don't know how widespread it is
-;; nor whether GNU Smalltalk should support it.
-(modify-syntax-entry ?\n " >  " table) ; Comment (generic) ;FIXME!
 (modify-syntax-entry ?:  ".   " table) ; Symbol-char
 (modify-syntax-entry ?_  "_   " table) ; Symbol-char
 (modify-syntax-entry ?\" "!1  " table) ; Comment (generic)
@@ -125,7 +103,7 @@ Requires Emacs≥23.3."
 (modify-syntax-entry ?+  ".   " table) ; math
 (modify-syntax-entry ?-  ".   " table) ; math
 (modify-syntax-entry ?*  ".   " table) ; math
-(modify-syntax-entry ?/  ".2  " table) ; math
+(modify-syntax-entry ?/  ".   " table) ; math
 (modify-syntax-entry ?=  ".   " table) ; bool/assign
 (modify-syntax-entry ?%  ".   " table) ; valid selector
 (modify-syntax-entry ?&  ".   " table) ; boolean
@@ -153,6 +131,7 @@ Requires Emacs≥23.3."
 
 (defvar smalltalk-mode-map
   (let ((keymap (make-sparse-keymap)))
+;; the following six are deprecated, use C-M- ones
 ;; (define-key keymap "\n"'smalltalk-newline-and-indent)
 ;; FIXME: Set `beginning-of-defun-function' instead!
 (define-key keymap "\C-c\C-a"   'smalltalk-begin-of-defun)
@@ -163,9 +142,11 @@ Requires Emacs≥23.3."
   (define-key keymap "\C-c\C-b"   'smalltalk-backward-sexp))
 (define-key keymap "\C-c\C-p"   'smalltalk-goto-previous-keyword)
 (define-key keymap "\C-c\C-n"   'smalltalk-goto-next-keyword)
-;; the following three are deprecated
+;; the following four are NOT deprecated
 ;; FIXME: Set `beginning-of-defun-function' instead!
 (define-key keymap "\C-\M-a"   'smalltalk-begin-of-defun)
+;; FIXME: Set `end-of-defun-function' instead!
+(define-key keymap "\C-\M-e"   'smalltalk-end-of-defun)
 (unless smalltalk-use-smie
   (define-key keymap "\C-\M-f"   'smalltalk-forward-sexp)
   (define-key keymap "\C-\M-b"   'smalltalk-backward-sexp))
@@ -198,30 +179,18 @@ Requires Emacs≥23.3."
 keymap)
   "Keymap for Smalltalk mode.")
 
-;; FIXME: Why is `||' in there?
-(defconst smalltalk-binsel "[-+*/~,<>=&?]\\{1,2\\}\\|\\(:=\\)\\|||"
+(defconst smalltalk-binsel "\\([-+*/~,<>=|&?]\\{1,2\\}\\|:=\\)"
   "Smalltalk binary selectors.")
 
-;; (defun smalltalk--definition-pos-p ()
-;;   ;; In the non-bang style, we consider that a selector is in a "definition
-;;   ;; position" (i.e. is defined rather than used to call a method) if it
-;;   ;; follows a [...] that's not a block.
-;;   ;; FIXME: This fails to accept the *first* definition in a list.
-;;   (save-excursion
-;; (forward-comment (- (point)))
-;; (when (eq (char-before) ?\])
-;;   (forward-sexp -1)
-;;   (not (smalltalk--smie-exp-p)
-
 (defconst smalltalk-font-lock-keywords
   `((,(concat "#" smalltalk-name-regexp) (0 'font-lock-constant-face))
 (,(concat "\\<" smalltalk-name-regexp ":")
  (0 'font-lock-function-name-face))
 ;; FIXME: This should not apply to the < and > of pragmas!
 (,smalltalk-binsel (0 'font-lock-function-name-face))
-("\\^" (0 'font-lock-keyword-face))
+("\\^" (0 'font-lock-builtin-face))
 ("\\$." (0 'font-lock-string-face)) ;; Chars
-("\\<[[:upper:]]\\sw*\\>" (0 'font-lock-type-face)))
+("\\<[[:upper:]][[:alnum:]_]*\\>" (0 'font-lock-type-face)))
   "Basic Smalltalk keywords font-locking.")
 
 (defconst smalltalk-font-lock-keywords-1
@@ -230,11 +199,9 @@ Requires Emacs≥23.3."
 
 (defconst smalltalk-font-lock-keywords-2
   (append smalltalk-font-lock-keywords-1
- `(("\\<\\(true\\|false\\|nil\\|self\\|super\\)\\>"
-. font-lock-builtin-face)
-   (":[[:lowe

[elpa] externals/smalltalk-mode 077f7cd: * smalltalk-mode.el: Tweak last change

2019-04-24 Thread Stefan Monnier
branch: externals/smalltalk-mode
commit 077f7cd6a66411672d67de783204ed4f49840773
Author: Stefan Monnier 
Commit: Stefan Monnier 

* smalltalk-mode.el: Tweak last change

(smalltalk-binsel): Mark `:=` again, used by
smalltalk--smie-*ward-token to distinguish := from actual binary selectors.
(hs-special-modes-alist): No need to set it before the major mode
is activated.
---
 smalltalk-mode.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/smalltalk-mode.el b/smalltalk-mode.el
index 9f3a8f6..040eeb3 100644
--- a/smalltalk-mode.el
+++ b/smalltalk-mode.el
@@ -83,7 +83,7 @@ Requires Emacs≥23.3."
   (let ((table (make-syntax-table)))
 (modify-syntax-entry ?:  ".   " table) ; Symbol-char
 (modify-syntax-entry ?_  "_   " table) ; Symbol-char
-(modify-syntax-entry ?\" "!1  " table) ; Comment (generic)
+(modify-syntax-entry ?\" "!   " table) ; Comment (generic)
 (modify-syntax-entry ?'  "\"' " table) ; String
 (modify-syntax-entry ?#  "'   " table) ; Symbol or Array constant
 (modify-syntax-entry ?\( "()  " table) ; Grouping
@@ -179,8 +179,9 @@ Requires Emacs≥23.3."
 keymap)
   "Keymap for Smalltalk mode.")
 
-(defconst smalltalk-binsel "\\([-+*/~,<>=|&?]\\{1,2\\}\\|:=\\)"
-  "Smalltalk binary selectors.")
+(defconst smalltalk-binsel "[-+*/~,<>=|&?]\\{1,2\\}\\|\\(:=\\)"
+  "Smalltalk binary selectors.
+Also matches the assignment operator (in submatch 1).")
 
 (defconst smalltalk-font-lock-keywords
   `((,(concat "#" smalltalk-name-regexp) (0 'font-lock-constant-face))
@@ -548,9 +549,8 @@ Commands:
   (set (make-local-variable 'find-tag-default-function)
#'smalltalk-find-message))
 
-;;;###autoload
-;; for hideshow.
-;; hideshow does not cope with comment-start and comment-end being the same
+;; For hideshow.
+;; Hideshow does not cope with comment-start and comment-end being the same
 ;; so I change it to "= ... =" which seems to be the convention in GNU 
smalltalk
 (add-to-list 'hs-special-modes-alist '(smalltalk-mode "\\[" "\\]" "\"=" nil 
nil))
 



[elpa] master 7931888: * gnu-elpa-keyring-update: New package

2019-04-24 Thread Stefan Monnier
branch: master
commit 79318884dc709c2eb42f58f00c6559926c2992f5
Author: Stefan Monnier 
Commit: Stefan Monnier 

* gnu-elpa-keyring-update: New package
---
 .../etc/gnu-elpa-keyring.gpg   | Bin 0 -> 2069 bytes
 .../gnu-elpa-keyring-update.el |  96 +
 2 files changed, 96 insertions(+)

diff --git a/packages/gnu-elpa-keyring-update/etc/gnu-elpa-keyring.gpg 
b/packages/gnu-elpa-keyring-update/etc/gnu-elpa-keyring.gpg
new file mode 100644
index 000..490dee4
Binary files /dev/null and 
b/packages/gnu-elpa-keyring-update/etc/gnu-elpa-keyring.gpg differ
diff --git a/packages/gnu-elpa-keyring-update/gnu-elpa-keyring-update.el 
b/packages/gnu-elpa-keyring-update/gnu-elpa-keyring-update.el
new file mode 100644
index 000..5db762d
--- /dev/null
+++ b/packages/gnu-elpa-keyring-update/gnu-elpa-keyring-update.el
@@ -0,0 +1,96 @@
+;;; gnu-elpa-keyring-update.el --- Update Emacs's GPG keyring for GNU ELPA  
-*- lexical-binding: t; -*-
+
+;; Copyright (C) 2019  Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier 
+;; Keywords: maint, tools
+;; Version: 2019.0
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Commentary:
+
+;; This package updates the GPG keys used by the ELPA package manager
+;; (a.k.a `package.el') to verify authenticity of packages downloaded
+;; from the GNU ELPA archive.
+;;
+;; Those keys have a limited validity in time (for example, the first key was
+;; valid until Sep 2019 only), so you need to install and keep this package up
+;; to date to make sure signature verification does not spuriously fail when
+;; installing packages.
+;; 
+;; If your keys are already too old, causing signature verification errors when
+;; installing packages, then in order to install this package you will
+;; ironically need to temporarily disable signature verification (see variable
+;; `package-check-signature') or to manually modify the expiration date of
+;; the old key, e.g. with:
+;;
+;;   gpg --homedir ~/.emacs.d/elpa/gnupg --quick-set-expire 474F05837FBDEF9B 1y
+
+;;; Code:
+
+;;;###autoload
+(defvar gnu-elpa-keyring-update--keyring
+  (let ((kr (expand-file-name "etc/gnu-elpa-keyring.gpg"
+  (file-name-directory load-file-name
+(if (and load-file-name (file-readable-p kr))
+kr
+  "etc/gnu-elpa-keyring.gpg")))
+
+(defun gnu-elpa-keyring-update--keyring (&optional noerror)
+  (if (and (file-name-absolute-p gnu-elpa-keyring-update--keyring)
+   (file-readable-p gnu-elpa-keyring-update--keyring))
+  gnu-elpa-keyring-update--keyring
+(let ((kr (expand-file-name
+   gnu-elpa-keyring-update--keyring
+   (file-name-directory
+(or (locate-library "gnu-elpa-keyring-update")
+(error
+ "Can't find the gnu-elpa-keyring-update package"))
+  (if (file-readable-p kr)
+  (setq gnu-elpa-keyring-update--keyring kr)
+(unless noerror
+  (error "Can't find the keyring.gpg file with the new keys"))
+
+;;;###autoload
+(defun gnu-elpa-keyring-update ()
+  "Import new GNU ELPA keys (if any) into package.el's keyring."
+  (let ((gnupghome-dir (or (bound-and-true-p package-gnupghome-dir)
+   (expand-file-name "gnupg"
+ package-user-dir
+(if (file-directory-p gnupghome-dir)
+(package-import-keyring (gnu-elpa-keyring-update--keyring))
+  (error "No keyring to update!"
+
+;;;###autoload (eval-after-load 'package
+;;;###autoload   `(and (bound-and-true-p package-user-dir)
+;;;###autoload (file-directory-p package-user-dir)
+;;;###autoload (let ((okr (expand-file-name
+;;;###autoload "pubring.gpg"
+;;;###autoload (or (bound-and-true-p package-gnupghome-dir)
+;;;###autoload (expand-file-name "gnupg"
+;;;###autoload   package-user-dir
+;;;###autoload   (nkr gnu-elpa-keyring-update--keyring))
+;;;###autoload   (and (file-writable-p okr)
+;;;###autoload(file-readable-p nkr)
+;;;###autoload(file-newer-than-file-p nkr okr)
+;;;###autoload(gnu-elpa-keyring-update)
+
+(eval-when-compile
+  (condition-case err
+

[elpa] master 00a4342: * gnu-elpa-keyring-update.el: Make it a multifile package

2019-04-24 Thread Stefan Monnier
branch: master
commit 00a434241a59782750ed44f73fca222f069ac42b
Author: Stefan Monnier 
Commit: Stefan Monnier 

* gnu-elpa-keyring-update.el: Make it a multifile package
---
 packages/gnu-elpa-keyring-update/gnu-elpa-keyring-update.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/packages/gnu-elpa-keyring-update/gnu-elpa-keyring-update.el 
b/packages/gnu-elpa-keyring-update/gnu-elpa-keyring-update.el
index 5db762d..3d1ea5d 100644
--- a/packages/gnu-elpa-keyring-update/gnu-elpa-keyring-update.el
+++ b/packages/gnu-elpa-keyring-update/gnu-elpa-keyring-update.el
@@ -4,7 +4,8 @@
 
 ;; Author: Stefan Monnier 
 ;; Keywords: maint, tools
-;; Version: 2019.0
+;; Package-Type: multi
+;; Version: 2019.1
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by