1 ;; linux-kernel.el --- Linux kernel related bits 'n' pieces -*- Emacs-Lisp -*-
3 ;; Copyright (C) 2003 Steve Youngs
5 ;; RCS: $Id: linux-kernel.el,v 1.1 2003-12-15 08:39:02+10 steve Exp $
6 ;; Author: Steve Youngs <sryoungs@bigpond.net.au>
7 ;; Maintainer: Steve Youngs <sryoungs@bigpond.net.au>
8 ;; Created: <2003-12-15>
9 ;; Last-Modified: <2014-03-25 18:04:25 (steve)>
11 ;; Keywords: kernel linux
13 ;; This file is part of linux-kernel.
15 ;; Redistribution and use in source and binary forms, with or without
16 ;; modification, are permitted provided that the following conditions
19 ;; 1. Redistributions of source code must retain the above copyright
20 ;; notice, this list of conditions and the following disclaimer.
22 ;; 2. Redistributions in binary form must reproduce the above copyright
23 ;; notice, this list of conditions and the following disclaimer in the
24 ;; documentation and/or other materials provided with the distribution.
26 ;; 3. Neither the name of the author nor the names of any contributors
27 ;; may be used to endorse or promote products derived from this
28 ;; software without specific prior written permission.
30 ;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
31 ;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
32 ;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
33 ;; DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
34 ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35 ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36 ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
37 ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38 ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
39 ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
40 ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 ;; Here is a collection of things I find useful in the land of Linux
47 ;; Currently implemented features:
49 ;; - Check the latest kernel versions `linux-kernel-check-latest'
53 ;; o View kernel ChangeLog-<version> files.
55 ;; o Download official kernel patches (possibly entire kernels
58 ;; o Apply/revert patches to local workspace.
60 ;; o Create a TAGS table file that will actually work in XEmacs
61 ;; (the kernel's `make tags' doesn't work for me and my XEmacs
64 ;; o Ensure that cc-mode is set up the way Linus likes when hacking
67 ;; o Configure the kernel from within XEmacs
68 ;; (`make ([xg]|menu)?config').
72 ;; $Log: linux-kernel.el,v $
73 ;; Revision 1.1 2003-12-15 08:39:02+10 steve
80 (autoload 'with-electric-help "ehelp"))
83 (defun linux-kernel-commentary ()
84 "*Display the commentary section of linux-kernel.el."
91 (insert (lm-commentary (locate-library "linux-kernel.el")))
92 (goto-char (point-min))
93 (while (re-search-forward "^;+ ?" nil t)
94 (replace-match "" nil nil))
95 (buffer-string (current-buffer)))))
96 "*Linux-Kernel Commentary*"))
99 (defun linux-kernel-copyright ()
100 "*Display the copyright notice for Linux-Kernel."
107 (insert-file-contents (locate-library "linux-kernel.el"))
108 (goto-char (point-min))
109 (re-search-forward ";;; Commentary" nil t)
111 (narrow-to-region (point-min) (point))
112 (while (re-search-backward "^;+ ?" nil t)
113 (replace-match "" nil nil))
114 (buffer-string (current-buffer)))))
115 "*Linux-Kernel Copyright Notice*"))
118 (defun linux-kernel-check-latest ()
119 "Display a list of the latest kernel versions."
121 (let ((finger_banner (expand-file-name "finger_banner" (temp-directory)))
122 (obuf (get-buffer-create "*Linux Kernels*")))
123 (curl:download "https://www.kernel.org/finger_banner"
127 (insert "The Latest Linux Kernels\n========================\n\n")
128 (goto-char (point-min))
130 (insert-file-contents finger_banner)
131 (delete-file finger_banner)
132 (buffer-string (current-buffer)))
135 (provide 'linux-kernel)
136 ;;; linux-kernel.el ends here
139 ;time-stamp-start: "Last-Modified:[ ]+\\\\?[\"<]+"
140 ;time-stamp-end: "\\\\?[\">]"
141 ;time-stamp-line-limit: 10
142 ;time-stamp-format: "%4y-%02m-%02d %02H:%02M:%02S (%u)"