Emacs: moved some 'require' inside functions
parent
fb378d16d2
commit
d5170b14ac
|
@ -2,8 +2,6 @@
|
||||||
;; MAIN
|
;; MAIN
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(require 'functions)
|
|
||||||
|
|
||||||
;; Remember last cursor position.
|
;; Remember last cursor position.
|
||||||
(require 'saveplace)
|
(require 'saveplace)
|
||||||
(setq save-place-file (concat emacs-cache-folder "saveplace"))
|
(setq save-place-file (concat emacs-cache-folder "saveplace"))
|
||||||
|
@ -308,7 +306,6 @@
|
||||||
|
|
||||||
(defadvice pop-to-buffer (before cancel-other-window first)
|
(defadvice pop-to-buffer (before cancel-other-window first)
|
||||||
(ad-set-arg 1 nil))
|
(ad-set-arg 1 nil))
|
||||||
|
|
||||||
(ad-activate 'pop-to-buffer)
|
(ad-activate 'pop-to-buffer)
|
||||||
|
|
||||||
;; GMP documentation
|
;; GMP documentation
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
;;==============================================================================
|
;;==============================================================================
|
||||||
;; C/C++
|
;; C/C++
|
||||||
;;==============================================================================
|
;;==============================================================================
|
||||||
(require 'compile)
|
|
||||||
|
|
||||||
;; We need some functions:
|
;; TODO: require compile is not needed?
|
||||||
;; (get-closest-pathname)
|
;; (require 'compile)
|
||||||
;; (count-percents)
|
|
||||||
(require 'functions)
|
|
||||||
|
|
||||||
(defcustom mode-cc-ldlibs "-lm -pthread"
|
(defcustom mode-cc-ldlibs "-lm -pthread"
|
||||||
"[Local variable] Custom linker flags for C/C++ linkage."
|
"[Local variable] Custom linker flags for C/C++ linkage."
|
||||||
|
@ -17,9 +14,11 @@
|
||||||
:safe 'stringp)
|
:safe 'stringp)
|
||||||
|
|
||||||
(defun cc-set-compiler ()
|
(defun cc-set-compiler ()
|
||||||
"Set C/C++ compile command to be nearest Makefile found in
|
"Set compile command to be nearest Makefile.
|
||||||
parent folders. If no Makefile is found, then a configurable
|
The Makefile is looked up in parent folders. If no Makefile is
|
||||||
command line is provided."
|
found, then a configurable command line is provided.\n
|
||||||
|
Requires `get-closest-pathname'."
|
||||||
|
(require 'functions)
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (get-closest-pathname)
|
(if (get-closest-pathname)
|
||||||
(set (make-local-variable 'compile-command) (format "make -k -f %s" (get-closest-pathname)))
|
(set (make-local-variable 'compile-command) (format "make -k -f %s" (get-closest-pathname)))
|
||||||
|
@ -116,13 +115,12 @@ restored."
|
||||||
;; skeleton-further-elements '((q "\"")))
|
;; skeleton-further-elements '((q "\"")))
|
||||||
|
|
||||||
(define-skeleton cc-printf
|
(define-skeleton cc-printf
|
||||||
"fprintf/printf snippet
|
"fprintf/printf snippet.
|
||||||
|
|
||||||
If no file descriptor is provided, switch do printf. The format
|
If no file descriptor is provided, switch do printf. The format
|
||||||
string is properly parsed (%% are not taken into account).
|
string is properly parsed (%% are not taken into account).\n
|
||||||
|
Requires `count-percents'."
|
||||||
Requires the `count-percents' function."
|
|
||||||
nil
|
nil
|
||||||
|
(require 'functions)
|
||||||
'(setq v1 (skeleton-read "File desc: " "stderr"))
|
'(setq v1 (skeleton-read "File desc: " "stderr"))
|
||||||
(if (string= v1 "") "printf (" (concat "fprintf (" v1 ", "))
|
(if (string= v1 "") "printf (" (concat "fprintf (" v1 ", "))
|
||||||
"\"" (setq v1 (skeleton-read "Format string: " "%s\\n")) "\""
|
"\"" (setq v1 (skeleton-read "Format string: " "%s\\n")) "\""
|
||||||
|
|
Loading…
Reference in New Issue