Integrate emacs23 with emacsen on Debian

I’m quite disappointed about the unicode support of emacs22 so I decided to give emacs23 pretest a try. It turns out to be quite nice but it doesn’t include Debian’s debian-startup.diff patch and I don’t want to add it to the source code. So, I decided to solve it in my .emacs file. Here is the related script:

1
2
3
4
5
6
7
8
9
10
11
12
;; hacks to use debian emacsen in emacs23                                                                                     
(if (not (string-match "^23." emacs-version)) nil
(setq load-path
;; more paths could be added here
(append (list "/usr/share/emacs/site-lisp"
"/usr/share/emacs/site-lisp/global") load-path)
)
(defconst debian-emacs-flavor 'emacs22
"A symbol representing the particular debian flavor of emacs running.
Something like 'emacs21, 'xemacs21, etc.")
(load-library "debian-startup")
(debian-startup debian-emacs-flavor))

And I also realized the GUI version of emacs doesn’t bring me any good then the console version, so I’m running it without X now. Much easier to use.