[Misc] Remove some more byte compiler warnings

This commit is contained in:
Daniel - 2018-01-16 18:20:24 +01:00
parent c962fc94d4
commit 18dd29d7e2
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
3 changed files with 29 additions and 28 deletions

29
gnus
View File

@ -39,6 +39,7 @@ SMTP user."
;; Requires ;; Requires
(require 'dash)
(require 'gnus) (require 'gnus)
(require 'message) (require 'message)
(require 'gnus-util) (require 'gnus-util)
@ -329,8 +330,7 @@ SMTP user."
gnus-message-replysign t gnus-message-replysign t
gnus-message-replyencrypt t gnus-message-replyencrypt t
gnus-message-replysignencrypted t gnus-message-replysignencrypted t
mml-secure-cache-passphrase nil mml-secure-cache-passphrase nil)
mml-smime-cache-passphrase nil)
;; Automatic encryption if all necessary keys are present ;; Automatic encryption if all necessary keys are present
@ -357,9 +357,9 @@ ADDRESS is a string containing exactly one email address."
METHOD specifies the encrypt method used. Can be either METHOD specifies the encrypt method used. Can be either
\"smime\" or \"pgpmime\"." \"smime\" or \"pgpmime\"."
(every (lambda (recipient) (cl-every (lambda (recipient)
(not (null (db/public-key recipient method)))) (not (null (db/public-key recipient method))))
recipients)) recipients))
(defun db/message-recipients () (defun db/message-recipients ()
"Return all recipients of the email in the current buffer." "Return all recipients of the email in the current buffer."
@ -403,6 +403,7 @@ METHOD specifies the encrypt method used. Can be either
;; inspired by https://www.emacswiki.org/emacs/ExtendSMIME ;; inspired by https://www.emacswiki.org/emacs/ExtendSMIME
(use-package ldap (use-package ldap
:commands (ldap-search)
:config (progn :config (progn
(setq ldap-default-host "") (setq ldap-default-host "")
(setq ldap-default-base "O=DFN-Verein,C=DE" (setq ldap-default-base "O=DFN-Verein,C=DE"
@ -440,20 +441,20 @@ If found, imports the certificate via gpgsm."
(insert-buffer-substring (mm-handle-buffer handle)) (insert-buffer-substring (mm-handle-buffer handle))
(setq verified (epg-verify-string (epg-make-context 'CMS) (setq verified (epg-verify-string (epg-make-context 'CMS)
(base64-decode-string (buffer-string))))) (base64-decode-string (buffer-string)))))
;; FIXME: insert valid signature ;; FIXME: insert valid signature
;; use openssl ;; use openssl
(progn (progn
(insert "MIME-Version: 1.0\n") (insert "MIME-Version: 1.0\n")
(mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m") (mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m")
(insert-buffer-substring (mm-handle-buffer handle)) (insert-buffer-substring (mm-handle-buffer handle))
(setq verified (smime-verify-region (point-min) (point-max)))))) (setq verified (smime-verify-region (point-min) (point-max))))))
(goto-char (point-min)) (goto-char (point-min))
(mm-insert-part handle) (mm-insert-part handle)
(if (search-forward "Content-Type: " nil t) (if (search-forward "Content-Type: " nil t)
(delete-region (point-min) (match-beginning 0))) (delete-region (point-min) (match-beginning 0)))
(goto-char (point-max)) (goto-char (point-max))
(if (re-search-backward "--\r?\n?" nil t) (if (re-search-backward "--\r?\n?" nil t)
(delete-region (match-end 0) (point-max))) (delete-region (match-end 0) (point-max)))
(unless verified (unless verified
(insert-buffer-substring smime-details-buffer))) (insert-buffer-substring smime-details-buffer)))
(goto-char (point-min)) (goto-char (point-min))

18
init.el
View File

@ -324,8 +324,9 @@ _h_ _l_ _o_k _y_ank
;; Fixes ;; Fixes
(eval-after-load "enriched" (eval-after-load "enriched"
'(defun enriched-decode-display-prop (start end &optional param) '(defun enriched-decode-display-prop (start end &optional params)
(list start end))) (ignore params)
(list start end)))
;; Start Server when not running already ;; Start Server when not running already
@ -360,7 +361,7 @@ _h_ _l_ _o_k _y_ank
;; * Builtin Variables ;; * Builtin Variables
(setq custom-file (setq custom-file
(expand-file-name (concat "private/custom." system-name ".el") (expand-file-name (concat "private/custom." (system-name) ".el")
emacs-d)) emacs-d))
(use-package cl-lib) (use-package cl-lib)
@ -863,7 +864,7 @@ Certificates are assumed to be of the form *.crt."
helm-ff-file-name-history-use-recentf t helm-ff-file-name-history-use-recentf t
helm-ff-search-library-in-sexp t helm-ff-search-library-in-sexp t
helm-ff-skip-boring-files nil helm-ff-skip-boring-files nil
helm-split-window-in-side-p t helm-split-window-inside-p t
helm-move-to-line-cycle-in-source nil helm-move-to-line-cycle-in-source nil
helm-scroll-amount nil helm-scroll-amount nil
helm-locate-command nil helm-locate-command nil
@ -1164,13 +1165,14 @@ Certificates are assumed to be of the form *.crt."
(defun org-babel-execute:hy (body params) (defun org-babel-execute:hy (body params)
;; http://kitchingroup.cheme.cmu.edu/blog/2016/03/30/OMG-A-Lisp-that-runs-python/ ;; http://kitchingroup.cheme.cmu.edu/blog/2016/03/30/OMG-A-Lisp-that-runs-python/
(ignore params)
(let* ((temporary-file-directory ".") (let* ((temporary-file-directory ".")
(tempfile (make-temp-file "hy-"))) (tempfile (make-temp-file "hy-")))
(with-temp-file tempfile (with-temp-file tempfile
(insert body)) (insert body))
(unwind-protect (unwind-protect
(shell-command-to-string (shell-command-to-string
(format "hy %s" tempfile)) (format "hy %s" tempfile))
(delete-file tempfile)))))) (delete-file tempfile))))))
@ -1311,9 +1313,6 @@ Certificates are assumed to be of the form *.crt."
mc/mark-previous-like-this mc/mark-previous-like-this
mc/mark-all-like-this)) mc/mark-all-like-this))
(use-package nxml
:defer t)
(use-package org-ref (use-package org-ref
:defer t :defer t
:config (progn :config (progn
@ -1345,6 +1344,7 @@ Certificates are assumed to be of the form *.crt."
(eval-after-load 'semantic/bovine/el (eval-after-load 'semantic/bovine/el
`(semantic-elisp-setup-form-parser `(semantic-elisp-setup-form-parser
,(lambda (form start end) ,(lambda (form start end)
(ignore start end)
(semantic-tag-new-include (symbol-name (nth 1 form)) nil)) (semantic-tag-new-include (symbol-name (nth 1 form)) nil))
use-package)))) use-package))))

View File

@ -61,7 +61,7 @@ If already in `*ansi-term*' buffer, bury it."
(if-let ((eshell-window (db/find-window-by-buffer-mode 'eshell-mode))) (if-let ((eshell-window (db/find-window-by-buffer-mode 'eshell-mode)))
(select-window eshell-window) (select-window eshell-window)
;; open eshell ;; open eshell
(let ((current-dir (expand-file-name (dired-default-directory))) (let ((current-dir (expand-file-name default-directory))
(height (/ (window-total-height) 3))) (height (/ (window-total-height) 3)))
(split-window-vertically (- height)) (split-window-vertically (- height))
(other-window 1) (other-window 1)
@ -72,10 +72,10 @@ If already in `*ansi-term*' buffer, bury it."
(insert (format "cd %s" current-dir)) (insert (format "cd %s" current-dir))
(eshell-send-input)))))) (eshell-send-input))))))
(defun db/run-or-hide-shell (arg) (defun db/run-or-hide-shell ()
"Opens an shell buffer if not already in one, and otherwise "Opens an shell buffer if not already in one, and otherwise
returns to where we have been before." returns to where we have been before."
(interactive "P") (interactive "")
(if (string= "shell-mode" major-mode) (if (string= "shell-mode" major-mode)
(progn (progn
(bury-buffer) (bury-buffer)
@ -205,13 +205,13 @@ lispy."
(defun dired-back-to-top () (defun dired-back-to-top ()
"Jump to first non-trivial line in dired." "Jump to first non-trivial line in dired."
(interactive) (interactive)
(beginning-of-buffer) (goto-char (point-min))
(dired-next-line 2)) (dired-next-line 2))
(defun dired-jump-to-bottom () (defun dired-jump-to-bottom ()
"Jump to last non-trivial line in dired." "Jump to last non-trivial line in dired."
(interactive) (interactive)
(end-of-buffer) (goto-char (point-max))
(dired-next-line -1)) (dired-next-line -1))
(defun dired-get-size () ; from emacswiki, via oremacs (defun dired-get-size () ; from emacswiki, via oremacs