Måns Rullgård <[email protected]> writes: > The rules are simple: if several core developers say they dislike your > patch, you should FUCKING DROP IT. If you continue pushing for this, I > will dislike not only your patch but YOU as well.
I'm sorry I didn't want to push too much, I just wanted to understand why it was such a problem. Anyway I moved to tools/emacs and added some doc as attached if still interested..
>From d019a0ee5c4a2cc05298d7275e5d47da82de757b Mon Sep 17 00:00:00 2001 From: Andrea Crotti <[email protected]> Date: Wed, 27 Apr 2011 20:39:00 +0200 Subject: [PATCH] emacs settings for libav --- tools/emacs/.dir-locals.el | 26 ++++++++++++++++++++++++++ tools/emacs/elisp.el | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 0 deletions(-) create mode 100644 tools/emacs/.dir-locals.el create mode 100644 tools/emacs/elisp.el diff --git a/tools/emacs/.dir-locals.el b/tools/emacs/.dir-locals.el new file mode 100644 index 0000000..9d133b6 --- /dev/null +++ b/tools/emacs/.dir-locals.el @@ -0,0 +1,26 @@ +;; This file contains some compatible setting to the libav policies +;; create a link to the root directory +;; ln -s tools/emacs/.dir-locals.el .dir-locals.el +;; +;; to enable a correct make command set the LIBAV_DIR to the path of +;; the libav root directory, and set the MAKEOPTS variable if you want +;; to pass extra arguments to make +;; +;; load the file tools/emacs/elisp.el for a few additional functions + +((c-mode . + ((compile-command . (concat "cd $LIBAV_DIR && make -k " (getenv "MAKEOPTS"))) + (c-basic-offset . 4) + (indent-tabs-mode . nil) + ;; sentinel variable + (libav-c-mode . t) + (c-indentation-style . "k&r"))) + + (asm-mode . + ((tab-width . 4) + (tab-stop-list . '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80)) + (indent-tabs-mode . nil)))) + +;; evaluate this line or add it to your .emacs to recompile the whole +;; project with only one key +;; (global-set-key [f5] 'recompile) diff --git a/tools/emacs/elisp.el b/tools/emacs/elisp.el new file mode 100644 index 0000000..ea43529 --- /dev/null +++ b/tools/emacs/elisp.el @@ -0,0 +1,32 @@ +(defun libav-untabify-buffer () + "Remove tabs from the buffer" + (interactive) + (untabify (point-min) (point-max))) + +(defun libav-indent-buffer () + "Reindent the whole buffer" + (interactive) + (indent-region (point-min) (point-max))) + +(defun libav-cleanup-buffer () + "Clean whitespace status" + (interactive) + (when libav-c-mode + (message "Cleaning up whitespaces") + (libav-indent-buffer) + (libav-untabify-buffer) + (delete-trailing-whitespace))) + +(defun libav-pre-cleanup-buffer () + "Clean the whitespaces and set it to read-only if the buffer was changed" + (libav-cleanup-buffer) + (when (buffer-modified-p) + (message "File modified, setting it to read-only, change it back to read-write after committing the white-space changes") + (toggle-read-only))) + +;; !! emacs automatic indentation does not give always a desired result, but it's +;; a good way to start fixing some wrongly indented code + +;; uncomment this to enable automatic space cleanup when visiting and before saving +;; (add-hook 'find-file-hook 'libav-pre-cleanup-buffer) +;; (add-hook 'before-save-hook 'libav-cleanup-buffer) -- 1.7.1
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
