Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0962f376
Commit
0962f376
authored
Dec 02, 2013
by
Stefan Monnier
Browse files
* lisp/epa-file.el (epa-file-insert-file-contents): Ensure we insert text
in current-buffer. Fixes: debbugs:16029
parent
29bacfa9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
+18
-13
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/epa-file.el
lisp/epa-file.el
+13
-13
No files found.
lisp/ChangeLog
View file @
0962f376
2013-12-02 Stefan Monnier <monnier@iro.umontreal.ca>
* epa-file.el (epa-file-insert-file-contents): Ensure we insert text
in current-buffer (bug#16029).
2013-12-02 Helmut Eller <eller.helmut@gmail.com>
* emacs-lisp/debug.el (debugger-toggle-locals): New command.
...
...
lisp/epa-file.el
View file @
0962f376
...
...
@@ -132,6 +132,7 @@ encryption is used."
(
error
)))
(
local-file
(
or
local-copy
file
))
(
context
(
epg-make-context
))
(
buf
(
current-buffer
))
string
length
entry
)
(
if
visit
(
setq
buffer-file-name
file
))
...
...
@@ -157,16 +158,16 @@ encryption is used."
;; where `find-file-not-found-functions' are called in
;; `find-file-noselect-1'.
(
when
(
file-exists-p
local-file
)
(
make-local-variable
'epa-file-error
)
(
setq
epa-file-error
error
)
(
setq-local
epa-file-error
error
)
(
add-hook
'find-file-not-found-functions
'epa-file--find-file-not-found-function
nil
t
))
(
signal
'file-error
(
cons
"Opening input file"
(
cdr
error
)))))
(
make-local-variable
'epa-file-encrypt-to
)
(
setq
epa-file-encrypt-to
(
mapcar
#'
car
(
epg-context-result-for
context
'encrypted-to
)))
(
set-buffer
buf
)
;In case timer/filter changed/killed it (bug#16029)!
(
setq-local
epa-file-encrypt-to
(
mapcar
#'
car
(
epg-context-result-for
context
'encrypted-to
)))
(
if
(
or
beg
end
)
(
setq
string
(
substring
string
(
or
beg
0
)
end
)))
(
save-excursion
...
...
@@ -268,14 +269,13 @@ If no one is selected, symmetric encryption will be performed. "
(
defun
epa-file-select-keys
()
"Select recipients for encryption."
(
interactive
)
(
make-local-variable
'epa-file-encrypt-to
)
(
setq
epa-file-encrypt-to
(
mapcar
(
lambda
(
key
)
(
epg-sub-key-id
(
car
(
epg-key-sub-key-list
key
))))
(
epa-select-keys
(
epg-make-context
)
"Select recipients for encryption.
(
setq-local
epa-file-encrypt-to
(
mapcar
(
lambda
(
key
)
(
epg-sub-key-id
(
car
(
epg-key-sub-key-list
key
))))
(
epa-select-keys
(
epg-make-context
)
"Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "
))))
;;;###autoload
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment