New answers tagged

0

This is a feature of global minor modes. define-minor-mode declares a default custom1 :set value for the mode variable like so: (unless set (setq set '(:set #'custom-set-minor-mode))) That function is: (defun custom-set-minor-mode (variable value) ":set function for minor mode variables. Normally, this sets the default value of VARIABLE to nil if VALUE ...


2

Emacs version 26.1 and higher allows you to trigger the debugger when a variable changes. Place the following code near the beginning of your init.el: (debug-on-variable-change 'semantic-lex-c-preprocessor-symbol-file) Restart your emacs. Each time the variable is changed, you'll enter the debugger with the corresponding backtrace. After each occurence you ...


1

In a comment to @Drew's answer you've said: Doesn't this require the user to use customize-set-variable instead of setq or setq-default ? Indicating that you want your function to be called even when a variable is set by the likes of setq, which means you're looking for the variable-watcher functionality. Refer to C-hig (elisp)Watching Variables for ...


0

It's not true that :set is used only for interactive use of Customize. Functions customize-set-variable and customize-save-variable respect the :set function of the defcustom. customize-set-variable is an interactive autoloaded compiled Lisp function in cus-edit.el. (customize-set-variable VARIABLE VALUE &optional COMMENT) Set the default ...


0

It sounds like you have done both of the following for some options, i.e., you've done them both for at least one option: Used Customize to set and save the option. Tried to call customize functions to set the option in your init file. If so, it's you who introduced the redundancy. For a given option, choose one or the other. For example, if you want to ...


1

The list of packages you have selected is automatically kept in the variable package-selected-packages (which is saved via Customize into your ~/.emacs).


1

M-x package-list-packages At the end of the list are installed packages (printed in red).


Top 50 recent answers are included