Skip to content

Commit

Permalink
Remove unused call to `with-current-buffer' - fixes #95.
Browse files Browse the repository at this point in the history
`jdee-current-buffer' that holds the current JDEE buffer may not be available
during installation or pointing to a killed buffer. Anyway, switching to such
buffer did nothing and all the work was done below.
  • Loading branch information
pwojnowski committed Jun 8, 2018
1 parent 21fc96c commit d54c545
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions jdee-gen.el
Expand Up @@ -4031,17 +4031,14 @@ time to enable or disable eelctric return mode."
:type 'boolean
:set '(lambda (sym val)
(if (featurep 'jdee)
(let ((curr-project
(with-current-buffer jdee-current-buffer
jdee-current-project)))
(mapc
(lambda (buf)
(with-current-buffer buf
(let ((key (car (read-from-string "[return]"))))
(if val
(define-key (current-local-map) key 'jdee-electric-return)
(local-unset-key key)))))
(jdee-get-project-source-buffers))))
(mapc
(lambda (buf)
(with-current-buffer buf
(let ((key (car (read-from-string "[return]"))))
(if val
(define-key (current-local-map) key 'jdee-electric-return)
(local-unset-key key)))))
(jdee-get-project-source-buffers)))
(setq jdee-electric-return-mode val)
(set-default sym val)))

Expand Down

0 comments on commit d54c545

Please sign in to comment.