The error buffer was not getting filled when Curl_wait_for_resolv() fails.
[platform/upstream/curl.git] / curl-style.el
1 ;;;; Emacs Lisp help for writing curl code. ;;;;
2 ;;;; $Id$
3
4 ;;; The curl hacker's C conventions.
5
6 ;;; After loading this file and added the mode-hook you can in C
7 ;;; files, put something like this to use the curl style
8 ;;; automatically:
9 ;;
10 ;;   /* -----------------------------------------------------------------
11 ;;    * local variables:
12 ;;    * eval: (set c-file-style "curl")
13 ;;    * end:
14 ;;    */
15 ;;
16
17 (defconst curl-c-style
18   '((c-basic-offset . 2)
19     (c-comment-only-line-offset . 0)
20     (c-hanging-braces-alist     . ((substatement-open before after)))
21     (c-offsets-alist . ((topmost-intro        . 0)
22                         (topmost-intro-cont   . 0)
23                         (substatement         . +)
24                         (substatement-open    . 0)
25                         (statement-case-intro . +)
26                         (statement-case-open  . 0)
27                         (case-label           . 0)
28                         ))
29     )
30   "Curl C Programming Style")
31
32 ;; Customizations for all of c-mode, c++-mode, and objc-mode
33 (defun curl-c-mode-common-hook ()
34   "Curl C mode hook"
35   ;; add curl style and set it for the current buffer
36   (c-add-style "curl" curl-c-style t)
37   (setq tab-width 8
38         indent-tabs-mode nil            ; Use spaces. Not tabs.
39         comment-column 40
40         c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set" "time_t"))
41         )
42   ;; keybindings for C, C++, and Objective-C.  We can put these in
43   ;; c-mode-base-map because of inheritance ...
44   (define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
45   (setq c-recognize-knr-p nil)
46   )
47
48 ;; Set this is in your .emacs if you want to use the c-mode-hook as
49 ;; defined here right out of the box.
50 ; (add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)