2009-08-19 40 views
1

我已經安裝了A +並使用aplus-fsf-dev和aplus-fsf-el軟件包在Debian中設置了XEmacs; XEmacs作爲依賴項安裝。A +和Emacs(但不* * XEmacs)

我檢查了A +站點(http://www.aplusdev.org/),似乎沒有關於在普通Emacs(而不是XEmacs)上運行A +的問題。

有誰知道是否有ELISP文件的某處設置A +在普通(FSF)Emacs上?

謝謝!

PS:所以,XEmacs的elisp文件不能在Emacs上運行。我試圖轉換它們,但我不得不更遠離代碼,所以我放棄了。

PS2:在Emacs中,當我(需要「Aplus的),這是我得到:

Debugger entered--Lisp error: (wrong-type-argument arrayp (super 97)) 
    define-key((keymap) (super 97) a-self-insert) 
    (let ((key ...) (apl ...)) (define-key a-minor-map (append a-modifier-list ...) (quote a-self-insert)) (define-key a-minor-map (vector ... key) (quote a-self-insert)) (aset a-key-string (char-to-int key) apl)) 
    a-insert-map((97 . 193)) 
    mapcar(a-insert-map ((97 . 193) (98 . 194) (99 . 195) (100 . 196) (101 . 197) (102 . 95) (103 . 199) (104 . 200) (105 . 201) (106 . 202) (107 . 39) (108 . 204) (109 . 124) (110 . 206) (111 . 207) (112 . 42) (113 . 63) (114 . 210) (115 . 211) (116 . 126) (117 . 213) (118 . 214) (119 . 215) (120 . 216) (121 . 217) (122 . 218) (49 . 161) (50 . 162) (51 . 60) (52 . 164) (53 . 61) (54 . 166) (55 . 62) (56 . 168) (57 . 169) (48 . 94) (45 . 171) (61 . 223) (92 . 220) (96 . 254) (44 . 172) (91 . 251) (93 . 253) (59 . 219) (39 . 221) (46 . 220) (47 . 175) (33 . 224) (64 . 230) (35 . 231) ...)) 
    eval-buffer(#<buffer *load*<3>> nil "/usr/share/emacs/site-lisp/aplus-fsf-el/keyb.el" nil t) ; Reading at buffer position 3754 
    load-with-code-conversion("/usr/share/emacs/site-lisp/aplus-fsf-el/keyb.el" "/usr/share/emacs/site-lisp/aplus-fsf-el/keyb.el" nil t) 
    require(keyb) 
    eval-buffer(#<buffer *load*<2>> nil "/usr/share/emacs/site-lisp/aplus-fsf-el/xa.el" nil t) ; Reading at buffer position 16 
    load-with-code-conversion("/usr/share/emacs/site-lisp/aplus-fsf-el/xa.el" "/usr/share/emacs/site-lisp/aplus-fsf-el/xa.el" nil t) 
    load("xa" nil t) 
    (if aplus-setup-global-bindings (load "xa" nil t)) 
    eval-buffer(#<buffer *load*> nil "/usr/share/emacs/site-lisp/aplus-fsf-el/aplus.el" nil t) ; Reading at buffer position 1373 
    load-with-code-conversion("/usr/share/emacs/site-lisp/aplus-fsf-el/aplus.el" "/usr/share/emacs/site-lisp/aplus-fsf-el/aplus.el" nil t) 
    require(aplus) 
    eval((require (quote aplus))) 
    eval-last-sexp-1(nil) 
    eval-last-sexp(nil) 
    call-interactively(eval-last-sexp nil nil) 

這是因爲在keyb.el,有這樣的功能:

(defun a-insert-map (akeydef) 
    (let ((key (car akeydef)) 
     (apl (cdr akeydef))) 
    (define-key a-minor-map (append a-modifier-list (list key)) 'a-self-insert) 
    (define-key a-minor-map (vector '(control c) key) 'a-self-insert) 
    (aset a-key-string (char-to-int key) apl))) 

我將append更改爲vconcat,然後在該函數的最後一行出現錯誤,因爲Emacs沒有char-to-int函數。我刪除了函數調用,並由參數(「key」)本身取代,因爲我知道Emacs已經將該字符視爲一個數字。

然後在其他函數中還有其他不太明顯的錯誤;其中大多數處理define-key和keymaps。

我猜Emacs和XEmacs處理鍵盤映射的方式不同嗎?

+0

您是否試過在Emacs上運行它?如果是這樣,那麼失敗是什麼?他們不是*不同*。 – 2009-08-19 22:58:52

+0

是的,我試過...(請參閱我剛剛添加到問題的P.S.) – Jay 2009-08-19 23:02:11

+1

如果您報告遇到的問題並獲得有關這些具體事情的幫助,則可能會獲得更多里程。看起來這是目前僅有的標籤[a +]的第二個問題。 – 2009-08-20 00:34:12

回答

2

讓答案開始。 SO並不是專爲運行調試會話而設計的,但是這裏就是這樣。

取決於是否要使Emacs和XEmacs都可以加載相同的.el文件,您必須確定要如何區分差異。

在Emacs中定義鍵的最(?)便攜方式是使用宏'kbd。因此,'define-key調用應該是這個樣子:

(define-key a-minor-map (kbd (format "C-c %c" key)) 'a-self-insert) 

我不知道一個變性劑的名單是什麼,但大概可以按摩到一個字符串傳遞給'kbd'kbd'read-kbd-macro的一個很好的介紹可以找到here。 Emacs鍵盤上的文檔可以在here找到。它涵蓋了鍵綁定的各種符號,也許它可以用來解碼一些XEmacs的東西。