nschum / guess-style Goto Github PK
View Code? Open in Web Editor NEWEmacs: automatic setting of code style variables
Home Page: nschum.de/src/emacs/guess-style/
Emacs: automatic setting of code style variables
Home Page: nschum.de/src/emacs/guess-style/
Running Emacs 24.3 with the following setup
(autoload 'guess-style-set-variable "guess-style" nil t)
(autoload 'guess-style-guess-variable "guess-style")
(autoload 'guess-style-guess-all "guess-style" nil t)
(setq guess-style-info-mode 1)
(add-hook 'prog-mode-hook 'guess-style-guess-all)
yields the following error message when loading python-mode:
File mode specification error: (error "Don't know how to make a localized variable an alias")
and python-mode will not load, which is fairly annoying.
Replacing the deprecated python-indent
by python-indent-offset
in guess-style-guesser-alist
did the trick for me.
It would be much easier than downloading it from github.
I am not sure if the following is an issue with emacs-24.4.1 or guess-style. But dropping guess-style/ inside .emacs.d raises the following error upon opening a python file. I moved it out else where to solve the problem.
Could not guess variable 'indent-tabs-mode' (Cannot open load file: is a directory, /home/XXX/.emacs.\
d/guess-style)
Could not guess variable 'tab-width' (Not enough lines to guess variable)
Could not guess variable 'c-basic-offset' (Not a cc-mode)
Could not guess variable 'nxml-child-indent' (Not certain enough to guess variable)
Could not guess variable 'css-indent-offset' (Not certain enough to guess variable)
Could not guess variable 'python-indent-offset' (Not certain enough to guess variable)
My .emacs file looks as below:
(add-to-list 'load-path (expand-file-name "~/.emacs.d/guess-style"))
(require 'guess-style)
(autoload 'guess-style-set-variable "guess-style" nil t)
(autoload 'guess-style-guess-variable "guess-style")
(autoload 'guess-style-guess-all "guess-style" nil t)
(add-hook 'python-mode-hook 'guess-style-guess-all)
Feel free to ignore/close the issue if you deem it's irrelevant.
The instructions for installation suggest using "add-to-path" to add to the load-path. Should this be "add-to-list"?
lisps/guess-style.el: flet' is an obsolete macro (as of 24.3); use either
cl-flet' or `cl-letf'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.