~ubuntu-branches/ubuntu/feisty/curl/feisty-updates

« back to all changes in this revision

Viewing changes to curl-style.el

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-03-23 18:41:29 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050323184129-le70d05a0hk5w62j
Tags: 7.12.3-2ubuntu3
Fix the version numbers internal to debian/rules.  Closes; #8088

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;;; Emacs Lisp help for writing curl code. ;;;;
2
 
;;;; $Id: curl-style.el,v 1.8 2004/03/24 22:24:03 bagder Exp $
 
2
;;;; $Id: curl-style.el,v 1.13 2004/10/06 07:50:18 bagder Exp $
3
3
 
4
4
;;; The curl hacker's C conventions.
5
5
;;; See the sample.emacs file on how this file can be made to take
20
20
    )
21
21
  "Curl C Programming Style")
22
22
 
 
23
(defun curl-code-cleanup ()
 
24
  "no docs"
 
25
  (interactive)
 
26
  (untabify (point-min) (point-max))
 
27
  (delete-trailing-whitespace)
 
28
)
 
29
 
23
30
;; Customizations for all of c-mode, c++-mode, and objc-mode
24
31
(defun curl-c-mode-common-hook ()
25
32
  "Curl C mode hook"
28
35
  (setq tab-width 8
29
36
        indent-tabs-mode nil            ; Use spaces. Not tabs.
30
37
        comment-column 40
31
 
        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"))
 
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"))
32
39
        )
33
40
  ;; keybindings for C, C++, and Objective-C.  We can put these in
34
41
  ;; c-mode-base-map because of inheritance ...
35
42
  (define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
 
43
  (define-key c-mode-base-map "\M-m" 'curl-code-cleanup)
36
44
  (setq c-recognize-knr-p nil)
 
45
  ;;; (add-hook 'write-file-hooks 'delete-trailing-whitespace t)
 
46
  (setq show-trailing-whitespace t)
37
47
  )
38
48
 
39
49
;; Set this is in your .emacs if you want to use the c-mode-hook as