Emacs: fixed tex-clean

master
Pierre Neidhardt 2014-03-08 17:45:29 +01:00
parent ac4abd5e7f
commit 34d951ef83
2 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,7 @@
;;============================================================================== ;;==============================================================================
;; C/C++ ;; C/C++
;;============================================================================== ;;==============================================================================
;; Note: maybe this should be split in mode-c and mode-c++.
(defcustom cc-ldlibs "-lm -pthread" (defcustom cc-ldlibs "-lm -pthread"
"Custom linker flags for C/C++ linkage." "Custom linker flags for C/C++ linkage."

View File

@ -67,18 +67,20 @@ WARNING: the -shell-escape option is a potential security issue."
but there is no warranty." but there is no warranty."
(interactive) (interactive)
(hack-local-variables) (hack-local-variables)
(let* ((local-master (if (not masterfile) buffer-file-name masterfile))) (let ((master (concat
;; Concatate file name to list. (if masterfile
(file-name-sans-extension masterfile)
(file-name-sans-extension buffer-file-name))
".")))
(mapcar (mapcar
;; Delete file if exist ;; Delete file if it exists.
(lambda (argfile) (interactive) (lambda (argfile)
(if (not (and (file-exists-p argfile) (file-writable-p argfile))) (when (and (file-exists-p argfile) (file-writable-p argfile))
(message "[%s] not found." argfile)
(delete-file argfile) (delete-file argfile)
(message "[%s] deleted." argfile))) (message "[%s] deleted." argfile)))
(mapcar (mapcar
;; Concat file name with extensions. ;; Concat file name with extensions.
(lambda (arg) (interactive) (concat file arg)) (lambda (arg) (concat master arg))
tex-extension-list)))) tex-extension-list))))
(defun tex-pdf-compress () (defun tex-pdf-compress ()