Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am learning emacs lisp. One of the things I was playing with was setting variables. So I go and set fill-column to 50 (setq fill-column 60). After this evaluating fill-column does give me 60, but the function fill-paragraph ignores this. How would I go about figuring out why this happens?

Thanks.

Best, Bart

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

To instrument an Elisp function for debugging, load its source code, put point inside the function, and type M-x edebug-defun. Then, when the function is executed, the debugger will activate automatically.

In your particular case, fill-column becomes buffer local when set (see make-variable-buffer-local). You probably set it in the wrong buffer.

share|improve this answer
    
I run the code for setting the variable in the buffer I was running fill-paragraph. –  kasterma Oct 26 '10 at 19:13
add comment

Or, you could use debug-on-entry ^Hfdebug-on-entry

debug-on-entry is an interactive autoloaded Lisp function.

(debug-on-entry FUNCTION)

Request FUNCTION to invoke debugger each time it is called.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.