Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
57e61e37
Commit
57e61e37
authored
22 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
This is the new Emacs style for curl hacking, based on work written by
Mats Lidell in project Rockbox.
parent
a6c395c1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
curl-style.el
+54
-0
54 additions, 0 deletions
curl-style.el
with
54 additions
and
0 deletions
curl-style.el
0 → 100644
+
54
−
0
View file @
57e61e37
;;;; Emacs Lisp help for writing curl code. ;;;;
;;;; $Id$
;;; The curl hacker's C conventions.
;;; After loading this file and added the mode-hook you can in C
;;; files, put something like this to use the curl style
;;; automatically:
;;
;; /* -----------------------------------------------------------------
;; * local variables:
;; * eval: (set c-file-style "curl")
;; * end:
;; */
;;
(
defconst
curl-c-style
'
((
c-basic-offset
.
2
)
(
c-comment-only-line-offset
.
0
)
(
c-hanging-braces-alist
.
((
substatement-open
before
after
)))
(
c-offsets-alist
.
((
topmost-intro
.
0
)
(
topmost-intro-cont
.
0
)
(
substatement
.
+
)
(
substatement-open
.
0
)
(
statement-case-intro
.
+
)
(
statement-case-open
.
0
)
(
case-label
.
0
)
))
)
"Curl C Programming Style"
)
;; Customizations for all of c-mode, c++-mode, and objc-mode
(
defun
curl-c-mode-common-hook
()
"Curl C mode hook"
;; add curl style and set it for the current buffer
(
c-add-style
"curl"
curl-c-style
t
)
(
setq
tab-width
8
indent-tabs-mode
nil
; Use spaces. Not tabs.
comment-column
40
c-font-lock-extra-types
(
append
'
(
"bool"
))
)
;; We like auto-newline and hungry-delete
(
c-toggle-auto-hungry-state
1
)
;; keybindings for C, C++, and Objective-C. We can put these in
;; c-mode-base-map because of inheritance ...
(
define-key
c-mode-base-map
"\M-q"
'c-fill-paragraph
)
;; Cleanups
(
setq
c-cleanup-list
'
(
list-close-comma
defun-close-semi
empty-defun-braces
brace-else-brace
brace-elseif-brace
scope-operator
))
(
setq
c-recognize-knr-p
nil
)
)
;; Set this is in your .emacs if you want to use the c-mode-hook as
;; defined here right out of the box.
; (add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment