ENH: fix bug where sharedforward would not work if there was a space in the path...
[cmake.git] / Utilities / cmcurl-7.19.0 / curl-style.el
blobf3076dcdf4b9f3da679256487984fd46cd7b41f2
1 ;;;; Emacs Lisp help for writing curl code. ;;;;
2 ;;;; $Id: curl-style.el,v 1.1 2008-09-23 16:32:05 hoffman Exp $
4 ;;; The curl hacker's C conventions.
5 ;;; See the sample.emacs file on how this file can be made to take
6 ;;; effect automatically when editing curl source files.
8 (defconst curl-c-style
9 '((c-basic-offset . 2)
10 (c-comment-only-line-offset . 0)
11 (c-hanging-braces-alist . ((substatement-open before after)))
12 (c-offsets-alist . ((topmost-intro . 0)
13 (topmost-intro-cont . 0)
14 (substatement . +)
15 (substatement-open . 0)
16 (statement-case-intro . +)
17 (statement-case-open . 0)
18 (case-label . 0)
21 "Curl C Programming Style")
23 (defun curl-code-cleanup ()
24 "no docs"
25 (interactive)
26 (untabify (point-min) (point-max))
27 (delete-trailing-whitespace)
30 ;; Customizations for all of c-mode, c++-mode, and objc-mode
31 (defun curl-c-mode-common-hook ()
32 "Curl C mode hook"
33 ;; add curl style and set it for the current buffer
34 (c-add-style "curl" curl-c-style t)
35 (setq tab-width 8
36 indent-tabs-mode nil ; Use spaces. Not tabs.
37 comment-column 40
38 c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t" "in_addr_t" "CURLSHcode" "CURLMcode" "Curl_addrinfo"))
40 ;; keybindings for C, C++, and Objective-C. We can put these in
41 ;; c-mode-base-map because of inheritance ...
42 (define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
43 (define-key c-mode-base-map "\M-m" 'curl-code-cleanup)
44 (setq c-recognize-knr-p nil)
45 ;;; (add-hook 'write-file-hooks 'delete-trailing-whitespace t)
46 (setq show-trailing-whitespace t)
49 ;; Set this is in your .emacs if you want to use the c-mode-hook as
50 ;; defined here right out of the box.
51 ; (add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)