all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Need Help on Whitespace-mode in Emacs 24.1.1
@ 2012-08-26  3:15 Fan
  2012-08-26  8:17 ` Peter Dyballa
       [not found] ` <mailman.7595.1345969075.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Fan @ 2012-08-26  3:15 UTC (permalink / raw)
  To: help-gnu-emacs

Hi

I had the following lines in my ~/.emacs and the whitespace mode worked fine in Emacs 23.1.1 previously.

  (message "Enabling whitespace mode ...")
  (require 'whitespace)
  (set-face-background 'whitespace-tab "lime green")
  (setq-default whitespace-style '(tabs trailing))
  (global-whitespace-mode t)
  (message "Enabled whitespace mode.")

However, when I switched to Emacs 24.1.1, the whitespace mode no longer worked.  It won't highlight, even if I tried exec whitespace-mode to toggle it on and off again.

From reading help on whitespace-style variable, it appears both 'tabs & 'trailing now also require 'face, i.e.

  (setq-default whitespace-style '(face tabs trailing))

When I tested by eval it and followed by exec whitespace-mode interactively, it worked.

BTW, somehow, the mode line now shows my buffer has both WS major mode & ws minor mode after exec whitespace-mode.  Why are there 2 whitespace modes?  Previously, whitespace works with just only WS major mode in Emacs 23.1.1.

I then replaced the old whitespace-style line with the above line in my ~/.emacs.

Unfortunately, when I tried to start a new Emacs session, it failed to open properly.  Here are the contents displayed in *Warnings* and *Messages* buffers.

In *Warnings* buffer:

  Warning (initialization): An error occurred while loading `/home/.emacs':
  
  Symbol's value as variable is void: font-lock-defaults-alist
  
  To ensure normal operation, you should investigate and remove the
  cause of the error in your initialization file.  Start Emacs with
  the `--debug-init' option to view a complete error backtrace.

In *Messages* buffer:

  Enabling whitespace mode ...
  let: Symbol's value as variable is void: font-lock-defaults-alist
  Error in post-command-hook (global-font-lock-mode-check-buffers): (void-variable font-lock-defaults-alist)

I'm clueless to what went wrong, and how to debug.  Please help.

If setting whitespace-style variable interactively worked, why would it fail when set in ~/.emacs?  Is there something else I need to set to get whitespace mode working in Emacs 24.1.1?

Thanks for your help in advance.

Fan


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-08-26 23:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-26  3:15 Need Help on Whitespace-mode in Emacs 24.1.1 Fan
2012-08-26  8:17 ` Peter Dyballa
     [not found] ` <mailman.7595.1345969075.855.help-gnu-emacs@gnu.org>
2012-08-26 14:46   ` Fan
2012-08-26 15:04     ` Peter Dyballa
2012-08-26 15:17     ` Drew Adams
2012-08-26 15:57       ` Peter Dyballa
2012-08-26 16:20         ` Drew Adams
2012-08-26 16:22           ` Drew Adams
     [not found]     ` <mailman.7604.1345994243.855.help-gnu-emacs@gnu.org>
2012-08-26 22:45       ` Fan
2012-08-26 22:54         ` Drew Adams
2012-08-26 23:31           ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.