;; linux-kernel.el --- Linux kernel related bits 'n' pieces -*- Emacs-Lisp -*- ;; Copyright (C) 2003 Steve Youngs ;; RCS: $Id: linux-kernel.el,v 1.1 2003-12-15 08:39:02+10 steve Exp $ ;; Author: Steve Youngs ;; Maintainer: Steve Youngs ;; Created: <2003-12-15> ;; Last-Modified: <2014-03-25 18:04:25 (steve)> ;; Homepage: None ;; Keywords: kernel linux ;; This file is part of linux-kernel. ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; ;; 1. Redistributions of source code must retain the above copyright ;; notice, this list of conditions and the following disclaimer. ;; ;; 2. Redistributions in binary form must reproduce the above copyright ;; notice, this list of conditions and the following disclaimer in the ;; documentation and/or other materials provided with the distribution. ;; ;; 3. Neither the name of the author nor the names of any contributors ;; may be used to endorse or promote products derived from this ;; software without specific prior written permission. ;; ;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ;; DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;; Commentary: ;; ;; Here is a collection of things I find useful in the land of Linux ;; kernels. ;; ;; Currently implemented features: ;; ;; - Check the latest kernel versions `linux-kernel-check-latest' ;;; Todo: ;; ;; o View kernel ChangeLog- files. ;; ;; o Download official kernel patches (possibly entire kernels ;; too). ;; ;; o Apply/revert patches to local workspace. ;; ;; o Create a TAGS table file that will actually work in XEmacs ;; (the kernel's `make tags' doesn't work for me and my XEmacs ;; :-( ). ;; ;; o Ensure that cc-mode is set up the way Linus likes when hacking ;; the kernel. ;; ;; o Configure the kernel from within XEmacs ;; (`make ([xg]|menu)?config'). ;;; ChangeLog: ;; ;; $Log: linux-kernel.el,v $ ;; Revision 1.1 2003-12-15 08:39:02+10 steve ;; Initial revision ;; ;;; Code: (eval-and-compile (require 'working) (autoload 'with-electric-help "ehelp")) ;;;###autoload (defun linux-kernel-commentary () "*Display the commentary section of linux-kernel.el." (interactive) (with-electric-help '(lambda () (insert (with-temp-buffer (erase-buffer) (insert (lm-commentary (locate-library "linux-kernel.el"))) (goto-char (point-min)) (while (re-search-forward "^;+ ?" nil t) (replace-match "" nil nil)) (buffer-string (current-buffer))))) "*Linux-Kernel Commentary*")) ;;;###autoload (defun linux-kernel-copyright () "*Display the copyright notice for Linux-Kernel." (interactive) (with-electric-help '(lambda () (insert (with-temp-buffer (erase-buffer) (insert-file-contents (locate-library "linux-kernel.el")) (goto-char (point-min)) (re-search-forward ";;; Commentary" nil t) (beginning-of-line) (narrow-to-region (point-min) (point)) (while (re-search-backward "^;+ ?" nil t) (replace-match "" nil nil)) (buffer-string (current-buffer))))) "*Linux-Kernel Copyright Notice*")) ;;;###autoload (defun linux-kernel-check-latest () "Display a list of the latest kernel versions." (interactive) (let ((finger_banner (expand-file-name "finger_banner" (temp-directory))) (obuf (get-buffer-create "*Linux Kernels*"))) (curl:download "https://www.kernel.org/finger_banner" finger_banner) (with-electric-help #'(lambda () (insert "The Latest Linux Kernels\n========================\n\n") (goto-char (point-min)) (center-line 2) (insert-file-contents finger_banner) (delete-file finger_banner) (buffer-string (current-buffer))) obuf))) (provide 'linux-kernel) ;;; linux-kernel.el ends here ;Local Variables: ;time-stamp-start: "Last-Modified:[ ]+\\\\?[\"<]+" ;time-stamp-end: "\\\\?[\">]" ;time-stamp-line-limit: 10 ;time-stamp-format: "%4y-%02m-%02d %02H:%02M:%02S (%u)" ;End: