"X windows are not in use or not initialized"

Discussion of Emacs Lisp

"X windows are not in use or not initialized"

Postby navidof » Fri Feb 19, 2010 7:32 am

Hi,

I need some help.
I downloaded verilog mode here :
http://www.veripool.org/ftp/verilog-mode.el

and here is my .emacs :
Code: Select all
(defvar my-font
  "-*-lucidatypewriter-medium-*-*-sans-12-*-*-*-*-*-*-*"
  "Default Normal Font"
)

(defvar my-bold-font
  "-*-lucidatypewriter-bold-*-*-sans-12-*-*-*-*-*-*-*"
  "Default Bold Font"
)
;;Coloration syntaxique de plus haut niveau par defaut
(global-font-lock-mode 1)


;; appropriate fonts
(set-face-font 'default                my-font)
(set-face-font 'italic                 my-font)
(set-face-font 'modeline               my-font)
(set-face-font 'bold                   my-bold-font)
(set-face-font 'bold-italic            my-bold-font)


;;Directory to look into for lisp files

(defun prepend-path ( my-path ) (setq load-path (cons (expand-file-name my-path) load-path)))
(defun append-path ( my-path ) (setq load-path (append load-path (list (expand-file-name my-path)))))

;;  ~/.elisp for elisp files
(prepend-path "~/.elisp")


;; Auto load modes
;; verilog mode only when needed
(autoload 'verilog-mode "verilog-mode" "Verilog mode" t )

;; Criteres de detection des modes
;; Any files that end in .v, .dv or .sv should be in verilog mode
(add-to-list 'auto-mode-alist '("\\.[ds]?v\\'" . verilog-mode))

;; Any files in verilog mode should have their keywords colorized
;;(add-hook 'verilog-mode-hook '(lambda () (font-lock-mode 1)))


(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )


I put the verilog file in the hidden folder ~/.elisp

It works well, without errors in a window.
But emacs -nw (that I often use) doesn't colorate and says "X windows are not in use or not initialized"

Does anyone know where is the issue ?
Thanks !
navidof
 
Posts: 2
Joined: Fri Feb 19, 2010 7:24 am

Re: "X windows are not in use or not initialized"

Postby schoppenhauer » Fri Feb 26, 2010 3:58 am

Seems like some confusion with the different Font-Handlings under X11 and Terminals. In http://www.gnu.org/software/emacs/elisp ... ments.html I found the command "command-line-args" - maybe you could (as a workaround) use it to determine wether "nw" was given to the commandline, and then not evaluating your font-settings.
schoppenhauer
 
Posts: 99
Joined: Sat Jul 26, 2008 2:30 pm
Location: Germany

Re: "X windows are not in use or not initialized"

Postby navidof » Mon Mar 08, 2010 1:20 pm

Seems like some confusion with the different Font-Handlings under X11 and Terminals. In http://www.gnu.org/software/emacs/elisp ... ments.html I found the command "command-line-args" - maybe you could (as a workaround) use it to determine wether "nw" was given to the commandline, and then not evaluating your font-settings.


Thank you, the font definition were indeed a problem in the no window mode. I commented them and it now works fine. Maybe I'll check out the command-line-args later if thre is the need !

Problem solved anyway.

Thanks again schoppenhauer
navidof
 
Posts: 2
Joined: Fri Feb 19, 2010 7:24 am


Return to Emacs Lisp

Who is online

Users browsing this forum: No registered users and 0 guests