glogglog

Install aspell dictionary on Windows

Step 1:

Get aspell installation directory by this command:

aspell dump config prefix

assume it's C:/Program Files/Aspell

Step 2:

mkdir C:/Program Files/Aspell/dict

mkdir C:/Program Files/Aspell/data

Step 3:

cd to dictionary source directory, like D:\software\aspell-en-0.50-2

for each .cwl file run

word-list-compress.exe d < <some>.cwl | aspell --lang=<the language code, here is "en"> create master ./<some>.rws

Step 4:

copy all .rws files, .alias files, .multi files to C:/Program Files/Aspell/dict

Step 5:

copy all .dat files to C:/Program Files/Aspell/data

 

 



Tags: windows | aspell | emacs |

use emacs+cscope to browse kernel code(II)

Here is a patch to xcscope to make you browse kernel code easier.

Two changes:

1. xcscope dose not support cscope "-k" (kernel mode) option, this patch add a variable named "cscope-kernel-mode" to xcscope, if it's non-nil, the "-k" option will be passed to cscope to prevent include "/usr/include" in #include files.

 

2. xcscope overwrite cscope.files everytime it builds index, even you had generated a cscope.files file which exclude arch-related source, driver source. this patch add a variable named "cscope-reuse-list-file" to xcscope, if it's non-nil, the xcscope will try to reuse cscope.files if it's exists and readable, instead of re-generating and overwriting this file.

 

Usage:

1. apply this patch to xcscope

2. add lines below to .emacs, you know:

(setq cscope-kernel-mode t)

(setq cscope-reuse-list-file t)

3.generate list file:

export LNX=/home/seven/linux-2.6/linux-2.6-2.6.32
find  $LNX                                                                \
    -path "$LNX/arch/*" ! -path "$LNX/arch/x86*" -prune -o               \
    -path "$LNX/include/asm-*" ! -path "$LNX/include/asm-i386*" -prune -o \
    -path "$LNX/tmp*" -prune -o                                           \
    -path "$LNX/Documentation*" -prune -o                                 \
    -path "$LNX/scripts*" -prune -o                                       \
    -path "$LNX/drivers*" -prune -o                                       \
        -name "*.[chxsS]" -print > $LNX/cscope.files

4. C-c s I or (cscope-index-files) rebuild index

 

 



Tags: kernel | cscope | emacs |

use emacs+cscope to browse kernel code

export LNX=/home/seven/linux-2.6/linux-2.6-2.6.32

find $LNX \
-path "$LNX/arch/*" ! -path "$LNX/arch/i386*" -prune -o \
-path "$LNX/include/asm-*" ! -path "$LNX/include/asm-i386*" -prune -o \
-path "$LNX/tmp*" -prune -o \
-path "$LNX/Documentation*" -prune -o \
-path "$LNX/scripts*" -prune -o \
-path "$LNX/drivers*" -prune -o \
-name "*.[chxsS]" -print >/home/jru/cscope/cscope.files

cscope -b -q -k

maybe -q is not necessary cause xcscope dosenot support inverted index.

export CSCOPE_DB=/home/seven/linux-2.6/cscope.out

emacs



see:
http://cscope.sourceforge.net/large_projects.html
http://cscope.sourceforge.net/cscope_man_page.html


Tags: kernel | cscope | emacs |

Use emacs23 and xft on debian

  1. add

    deb http://emacs.orebokech.com sid main

    to apt repository /etc/apt/sources.list

  2. install

    apt-get install emacs-snapshot

  3. edit ~/.Xresources
    Emacs.font: bitstream vera sans mono-12
    Emacs.FontBackend: xft
    Xft.dpi: 96
    Xft.hinting: None
    Xft.antialias: 1
    Xft.rgba: rgb
  4. edit ~/.emacs
    (set-fontset-font (frame-parameter nil 'font)
                       'han '("STHeiti" . "unicode-bmp"))

below is snapshot:



Tags: font | emacs | debian | xft |
sevenever@gmail.com
Copyright © 2008. All rights reserved.