Emacs exclude a keyword from indentation (Verilog) - emacs

I have an issue with using the following emacs indentation option
setq verilog-cexp-indent
I want to set it to 4 to apply for 1 line if-else, for, case .. etc
But when I do, it indents the module keyword.
Can I exclude the "module keyword" from this or is there a better way to do it ?

You should look at the instructions to Verilog mode. To do that, do M-x find-library<RET>verilog-mode<RET>. In there you'll see (amongst other information):
;; ;; User customization for Verilog mode
;; (setq verilog-indent-level 3
;; verilog-indent-level-module 3
;; verilog-indent-level-declaration 3
;; verilog-indent-level-behavioral 3
;; verilog-indent-level-directive 1
;; verilog-case-indent 2
;; verilog-auto-newline t
;; verilog-auto-indent-on-newline t
;; verilog-tab-always-indent t
;; verilog-auto-endcomments t
;; verilog-minimum-comment-distance 40
;; verilog-indent-begin-after-if t
;; verilog-auto-lineup 'declarations
;; verilog-linter "my_lint_shell_command"
;; )

Related

Append to default value of a list in emacs-lisp: specifically, dotspacemacs-configuration-layers

Goal
I wish to further extend modularity of my spacemacs configuration by referencing files user-config.org and user-layers.org
Template
I have achieved the former by adding the following to my dotspacemacs/user-config:
(defun dotspacemacs/user-config ()
(org-babel-load-file (expand-file-name
"user-config.org" dotspacemacs-directory)))
I can safely experiment with, clone-sync, organize, version-control user-config.org
Problem
Now,
dotspacemacs/user-layers is a variable (default-)set in a function in the following manner:
(defun dotspacemacs/layers ()
(setq-default
dotspacemacs-distribution 'spacemacs ;; not relevant
;;
;; many such default variable-value lines in between, skipped.
;;
dotspacemacs-configuration-layers
'(
;;
;; many layers auto-added/managed by spacemacs
;;
git
(python :variables python-backend 'lsp
python-lsp-server 'pyright
;; other such python configurations
python-formatter 'yapf))
;; other such default varialbe-value declarations
)
)
Attempt
I tried adding a similar inheretance (as with user-config) at the end of the setq-default in the following manner,
N.B. dotspacemacs-configuration-layers cannot be modified outside the function dotspacemacs/layers, hence, reference to the file has to be called within that function.
(defun dotspacemacs/layers ()
(setq-default
dotspacemacs-distribution 'spacemacs
;;
;; many such default variable-value lines in between, skipped.
;;
dotspacemacs-configuration-layers
'(
;; whatever spacemacs wants to auto-add
)
;; other such default variable-value declarations
)
(org-babel-load-file (expand-file-name
"user-layers.org" dotspacemacs-directory))
)
—such that user-layers.org is of the following form:
Referenced org-mode file:
dotspacemacs layers
#+BEGIN_SRC emacs-lisp
(append dotspacemacs-configuration-layers
'(
;;
;; Other layers managed by the user
;;
git
(python :variables python-backend 'lsp
python-lsp-server 'pyright
;; other such python configurations
python-formatter 'yapf)))
#+END_SRC
Failure
However, append does not appear to add elements to the seq-default value.
I guess it is appending to the variable's local setq value.
(I may be wrong at this, as lisp isn't my motherbored tongue, python is.)
Question:
Is there a way to extend the default value of a list in emacs-lisp by adding elements from another list?
clarification:
—such that after addition, the default value of the list contains the newly added elements.
Something like this should work:
(setq-default dotspacemacs-configuration-layers
(append (default-value 'dotspacemacs-configuration-layers)
'(git ...)))
Note that append doesn't modify the original list - it creates a new list with the extra values added. To add values to a list contained in a variable you need to assign back the new list:
*** Welcome to IELM *** Type (describe-mode) for help.
ELISP> (setq x (list 1 2 3))
(1 2 3)
ELISP> (setq y (list 4 5 6))
(4 5 6)
ELISP> (append x y)
(1 2 3 4 5 6)
ELISP> x
(1 2 3)
ELISP> (setq x (append x y))
(1 2 3 4 5 6)
ELISP> x
(1 2 3 4 5 6)

Spacemacs neo tree all the icons wont work on window 10

i am new to spacemacs and i add neo tree and want to show out it with icons style, but i tried many things it just show me some bunch of code.
here is my file of .spacemacs
i will be very appreciate
i add install all-the-icons at dotspacemacs-additional-packages and put (setq neo-theme 'icons) at user config like wiki told but still no result
here is the link i follow
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
;; Lazy installation of layers (i.e. layers are installed only when a file
;; with a supported type is opened). Possible values are `all', `unused'
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
;; lazy install any layer that support lazy installation even the layers
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
;; installation feature and you have to explicitly list a layer in the
;; variable `dotspacemacs-configuration-layers' to install it.
;; (default 'unused)
dotspacemacs-enable-lazy-installation 'unused
;; If non-nil then Spacemacs will ask for confirmation before installing
;; a layer lazily. (default t)
dotspacemacs-ask-for-lazy-installation t
;; If non-nil layers with lazy install support are lazy installed.
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(
html
python
javascript
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press <SPC f e R> (Vim style) or
;; <M-m f e R> (Emacs style) to install them.
;; ----------------------------------------------------------------
helm
;;auto-completion
;; better-defaults
emacs-lisp
git
markdown
org
;; (shell :variables
;; shell-default-height 30
;; shell-default-position 'bottom)
;;spell-checking
;; syntax-checking
;; version-control
)
;; List of additional packages that will be installed without being
;; wrapped in a layer. If you need some configuration for these
;; packages, then consider creating a layer. You can also put the
;; configuration in `dotspacemacs/user-config'
dotspacemacs-additional-packages '(all-the-icons spaceline-all-the-icons ox-reveal)
;; A list of packages that cannot be updated.
dotspacemacs-frozen-packages '()
;; A list of packages that will not be installed and loaded.
dotspacemacs-excluded-packages '()
;; Defines the behaviour of Spacemacs when installing packages.
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
;; `used-only' installs only explicitly used packages and uninstall any
;; unused packages as well as their unused dependencies.
;; `used-but-keep-unused' installs only the used packages but won't uninstall
;; them if they become unused. `all' installs *all* packages supported by
;; Spacemacs and never uninstall them. (default is `used-only')
dotspacemacs-install-packages 'used-only))
(defun dotspacemacs/init ()
"Initialization function.
This function is called at the very startup of Spacemacs initialization
before layers configuration.
You should not put any user code in there besides modifying the variable
values."
;; This setq-default sexp is an exhaustive list of all the supported
;; spacemacs settings.
(setq-default
;; If non nil ELPA repositories are contacted via HTTPS whenever it's
;; possible. Set it to nil if you have no way to use HTTPS in your
;; environment, otherwise it is strongly recommended to let it set to t.
;; This variable has no effect if Emacs is launched with the parameter
;; `--insecure' which forces the value of this variable to nil.
;; (default t)
dotspacemacs-elpa-https t
;; Maximum allowed time in seconds to contact an ELPA repository.
dotspacemacs-elpa-timeout 30
;; If non nil then spacemacs will check for updates at startup
;; when the current branch is not `develop'. Note that checking for
;; new versions works via git commands, thus it calls GitHub services
;; whenever you start Emacs. (default nil)
dotspacemacs-check-for-update nil
;; If non-nil, a form that evaluates to a package directory. For example, to
;; use different package directories for different Emacs versions, set this
;; to `emacs-version'.
dotspacemacs-elpa-subdirectory nil
;; One of `vim', `emacs' or `hybrid'.
;; `hybrid' is like `vim' except that `insert state' is replaced by the
;; `hybrid state' with `emacs' key bindings. The value can also be a list
;; with `:variables' keyword (similar to layers). Check the editing styles
;; section of the documentation for details on available variables.
;; (default 'vim)
dotspacemacs-editing-style 'vim
;; If non nil output loading progress in `*Messages*' buffer. (default nil)
dotspacemacs-verbose-loading nil
;; Specify the startup banner. Default value is `official', it displays
;; the official spacemacs logo. An integer value is the index of text
;; banner, `random' chooses a random text banner in `core/banners'
;; directory. A string value must be a path to an image format supported
;; by your Emacs build.
;; If the value is nil then no banner is displayed. (default 'official)
dotspacemacs-startup-banner 'official
;; List of items to show in startup buffer or an association list of
;; the form `(list-type . list-size)`. If nil then it is disabled.
;; Possible values for list-type are:
;; `recents' `bookmarks' `projects' `agenda' `todos'."
;; List sizes may be nil, in which case
;; `spacemacs-buffer-startup-lists-length' takes effect.
dotspacemacs-startup-lists '((recents . 5)
(projects . 7))
;; True if the home buffer should respond to resize events.
dotspacemacs-startup-buffer-responsive t
;; Default major mode of the scratch buffer (default `text-mode')
dotspacemacs-scratch-mode 'text-mode
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press <SPC> T n to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
dotspacemacs-themes '(spacemacs-dark
spacemacs-light)
;; If non nil the cursor color matches the state color in GUI Emacs.
dotspacemacs-colorize-cursor-according-to-state t
;; Default font, or prioritized list of fonts. `powerline-scale' allows to
;; quickly tweak the mode-line size to make separators look not too crappy.
dotspacemacs-default-font '("Source Code Pro"
:size 18
:weight normal
:width normal
:powerline-scale 1.1)
;; The leader key
dotspacemacs-leader-key "SPC"
;; The key used for Emacs commands (M-x) (after pressing on the leader key).
;; (default "SPC")
dotspacemacs-emacs-command-key "SPC"
;; The key used for Vim Ex commands (default ":")
dotspacemacs-ex-command-key ":"
;; The leader key accessible in `emacs state' and `insert state'
;; (default "M-m")
dotspacemacs-emacs-leader-key "M-m"
;; Major mode leader key is a shortcut key which is the equivalent of
;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
dotspacemacs-major-mode-leader-key ","
;; Major mode leader key accessible in `emacs state' and `insert state'.
;; (default "C-M-m")
dotspacemacs-major-mode-emacs-leader-key "C-M-m"
;; These variables control whether separate commands are bound in the GUI to
;; the key pairs C-i, TAB and C-m, RET.
;; Setting it to a non-nil value, allows for separate commands under <C-i>
;; and TAB or <C-m> and RET.
;; In the terminal, these pairs are generally indistinguishable, so this only
;; works in the GUI. (default nil)
dotspacemacs-distinguish-gui-tab nil
;; If non nil `Y' is remapped to `y$' in Evil states. (default nil)
dotspacemacs-remap-Y-to-y$ nil
;; If non-nil, the shift mappings `<' and `>' retain visual state if used
;; there. (default t)
dotspacemacs-retain-visual-state-on-shift t
;; If non-nil, J and K move lines up and down when in visual mode.
;; (default nil)
dotspacemacs-visual-line-move-text nil
;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
;; (default nil)
dotspacemacs-ex-substitute-global nil
;; Name of the default layout (default "Default")
dotspacemacs-default-layout-name "Default"
;; If non nil the default layout name is displayed in the mode-line.
;; (default nil)
dotspacemacs-display-default-layout nil
;; If non nil then the last auto saved layouts are resume automatically upon
;; start. (default nil)
dotspacemacs-auto-resume-layouts nil
;; Size (in MB) above which spacemacs will prompt to open the large file
;; literally to avoid performance issues. Opening a file literally means that
;; no major mode or minor modes are active. (default is 1)
dotspacemacs-large-file-size 1
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.
;; (default 'cache)
dotspacemacs-auto-save-file-location 'cache
;; Maximum number of rollback slots to keep in the cache. (default 5)
dotspacemacs-max-rollback-slots 5
;; If non nil, `helm' will try to minimize the space it uses. (default nil)
dotspacemacs-helm-resize nil
;; if non nil, the helm header is hidden when there is only one source.
;; (default nil)
dotspacemacs-helm-no-header nil
;; define the position to display `helm', options are `bottom', `top',
;; `left', or `right'. (default 'bottom)
dotspacemacs-helm-position 'bottom
;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
;; in all non-asynchronous sources. If set to `source', preserve individual
;; source settings. Else, disable fuzzy matching in all sources.
;; (default 'always)
dotspacemacs-helm-use-fuzzy 'always
;; If non nil the paste micro-state is enabled. When enabled pressing `p`
;; several times cycle between the kill ring content. (default nil)
dotspacemacs-enable-paste-transient-state nil
;; Which-key delay in seconds. The which-key buffer is the popup listing
;; the commands bound to the current keystroke sequence. (default 0.4)
dotspacemacs-which-key-delay 0.4
;; Which-key frame position. Possible values are `right', `bottom' and
;; `right-then-bottom'. right-then-bottom tries to display the frame to the
;; right; if there is insufficient space it displays it at the bottom.
;; (default 'bottom)
dotspacemacs-which-key-position 'bottom
;; If non nil a progress bar is displayed when spacemacs is loading. This
;; may increase the boot time on some systems and emacs builds, set it to
;; nil to boost the loading time. (default t)
dotspacemacs-loading-progress-bar t
;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
;; (Emacs 24.4+ only)
dotspacemacs-fullscreen-at-startup t
;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
;; Use to disable fullscreen animations in OSX. (default nil)
dotspacemacs-fullscreen-use-non-native nil
;; If non nil the frame is maximized when Emacs starts up.
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
;; (default nil) (Emacs 24.4+ only)
dotspacemacs-maximized-at-startup nil
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's active or selected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-active-transparency 90
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's inactive or deselected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-inactive-transparency 90
;; If non nil show the titles of transient states. (default t)
dotspacemacs-show-transient-state-title t
;; If non nil show the color guide hint for transient state keys. (default t)
dotspacemacs-show-transient-state-color-guide t
;; If non nil unicode symbols are displayed in the mode line. (default t)
dotspacemacs-mode-line-unicode-symbols t
;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
;; scrolling overrides the default behavior of Emacs which recenters point
;; when it reaches the top or bottom of the screen. (default t)
dotspacemacs-smooth-scrolling t
;; Control line numbers activation.
;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
;; `text-mode' derivatives. If set to `relative', line numbers are relative.
;; This variable can also be set to a property list for finer control:
;; '(:relative nil
;; :disabled-for-modes dired-mode
;; doc-view-mode
;; markdown-mode
;; org-mode
;; pdf-view-mode
;; text-mode
;; :size-limit-kb 1000)
;; (default nil)
dotspacemacs-line-numbers nil
;; Code folding method. Possible values are `evil' and `origami'.
;; (default 'evil)
dotspacemacs-folding-method 'evil
;; If non-nil smartparens-strict-mode will be enabled in programming modes.
;; (default nil)
dotspacemacs-smartparens-strict-mode nil
;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
;; over any automatically added closing parenthesis, bracket, quote, etc…
;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
dotspacemacs-smart-closing-parenthesis nil
;; Select a scope to highlight delimiters. Possible values are `any',
;; `current', `all' or `nil'. Default is `all' (highlight any scope and
;; emphasis the current one). (default 'all)
dotspacemacs-highlight-delimiters 'all
;; If non nil, advise quit functions to keep server open when quitting.
;; (default nil)
dotspacemacs-persistent-server nil
;; List of search tool executable names. Spacemacs uses the first installed
;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
;; (default '("ag" "pt" "ack" "grep"))
dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
;; The default package repository used if no explicit repository has been
;; specified with an installed package.
;; Not used for now. (default nil)
dotspacemacs-default-package-repository nil
;; Delete whitespace while saving buffer. Possible values are `all'
;; to aggressively delete empty line and long sequences of whitespace,
;; `trailing' to delete only the whitespace at end of lines, `changed'to
;; delete only whitespace for changed lines or `nil' to disable cleanup.
;; (default nil)
dotspacemacs-whitespace-cleanup nil
))
(defun dotspacemacs/user-init ()
"Initialization function for user code.
It is called immediately after `dotspacemacs/init', before layer configuration
executes.
This function is mostly useful for variables that need to be set
before packages are loaded. If you are unsure, you should try in setting them in
`dotspacemacs/user-config' first."
)
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a package is loaded,
you should place your code here."
(setq neo-theme 'icons)
)
;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions.
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
(quote
(doom-themes spaceline-all-the-icons smeargle orgit org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download mmm-mode markdown-toc markdown-mode magit-gitflow htmlize helm-gitignore helm-company helm-c-yasnippet gnuplot gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link gh-md fuzzy flyspell-correct-helm flyspell-correct evil-magit magit magit-popup git-commit ghub with-editor company-web web-completion-data company-tern tern company-statistics company-anaconda company auto-yasnippet auto-dictionary auto-complete ox-reveal web-mode tagedit slim-mode scss-mode sass-mode pug-mode helm-css-scss haml-mode emmet-mode yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic web-beautify livid-mode skewer-mode simple-httpd json-mode json-snatcher json-reformat js2-refactor yasnippet multiple-cursors js2-mode js-doc coffee-mode clojure-mode org-plus-contrib all-the-icons memoize ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

Spacemacs auto-complete

Disclaimer: I'm quite new to spacemacs and emacs so I'm probably missing something very obvious. Whenever I attempt to use auto-complete in a javascript file (with js2-mode), I get the following messages:
Error running timer `ac-update-greedy': (error "js2-name-node-name accessing a non-js2-name-node")
Error running timer `ac-show-menu': (error "js2-name-node-name accessing a non-js2-name-node")
Here's my ~/.spacemacs file:
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
;; List of configuration layers to load. If it is the symbol `all' instead
;; of a list then all discovered layers will be installed.
dotspacemacs-configuration-layers
'(
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press <SPC f e R> (Vim style) or
;; <M-m f e R> (Emacs style) to install them.
;; ----------------------------------------------------------------
;; auto-completion
;; better-defaults
emacs-lisp
git
github
markdown
;; org
;; (shell :variables
;; shell-default-height 30
;; shell-default-position 'bottom)
spell-checking
syntax-checking
version-control
react
javascript
osx
company-mode
spotify
emoji
;; autocompletion
colors
semantic
)
;; List of additional packages that will be installed without being
;; wrapped in a layer. If you need some configuration for these
;; packages, then consider creating a layer. You can also put the
;; configuration in `dotspacemacs/user-config'.
dotspacemacs-additional-packages '(
auto-complete
ac-js2
tern-auto-complete
)
;; A list of packages and/or extensions that will not be install and loaded.
dotspacemacs-excluded-packages '(company)
;; If non-nil spacemacs will delete any orphan packages, i.e. packages that
;; are declared in a layer which is not a member of
;; the list `dotspacemacs-configuration-layers'. (default t)
dotspacemacs-delete-orphan-packages t))
(defun dotspacemacs/init ()
"Initialization function.
This function is called at the very startup of Spacemacs initialization
before layers configuration.
You should not put any user code in there besides modifying the variable
values."
;; This setq-default sexp is an exhaustive list of all the supported
;; spacemacs settings.
(setq-default
;; If non nil ELPA repositories are contacted via HTTPS whenever it's
;; possible. Set it to nil if you have no way to use HTTPS in your
;; environment, otherwise it is strongly recommended to let it set to t.
;; This variable has no effect if Emacs is launched with the parameter
;; `--insecure' which forces the value of this variable to nil.
;; (default t)
dotspacemacs-elpa-https t
;; Maximum allowed time in seconds to contact an ELPA repository.
dotspacemacs-elpa-timeout 5
;; If non nil then spacemacs will check for updates at startup
;; when the current branch is not `develop'. (default t)
dotspacemacs-check-for-update t
;; One of `vim', `emacs' or `hybrid'. Evil is always enabled but if the
;; variable is `emacs' then the `holy-mode' is enabled at startup. `hybrid'
;; uses emacs key bindings for vim's insert mode, but otherwise leaves evil
;; unchanged. (default 'vim)
dotspacemacs-editing-style 'vim
;; If non nil output loading progress in `*Messages*' buffer. (default nil)
dotspacemacs-verbose-loading nil
;; Specify the startup banner. Default value is `official', it displays
;; the official spacemacs logo. An integer value is the index of text
;; banner, `random' chooses a random text banner in `core/banners'
;; directory. A string value must be a path to an image format supported
;; by your Emacs build.
;; If the value is nil then no banner is displayed. (default 'official)
dotspacemacs-startup-banner 'official
;; List of items to show in the startup buffer. If nil it is disabled.
;; Possible values are: `recents' `bookmarks' `projects'.
;; (default '(recents projects))
dotspacemacs-startup-lists '(recents projects)
;; Number of recent files to show in the startup buffer. Ignored if
;; `dotspacemacs-startup-lists' doesn't include `recents'. (default 5)
dotspacemacs-startup-recent-list-size 5
;; Default major mode of the scratch buffer (default `text-mode')
dotspacemacs-scratch-mode 'text-mode
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press <SPC> T n to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
dotspacemacs-themes '(spacemacs-dark
spacemacs-light
solarized-light
solarized-dark
leuven
monokai
zenburn)
;; If non nil the cursor color matches the state color in GUI Emacs.
dotspacemacs-colorize-cursor-according-to-state t
;; Default font. `powerline-scale' allows to quickly tweak the mode-line
;; size to make separators look not too crappy.
dotspacemacs-default-font '("Source Code Pro"
:size 13
:weight normal
:width normal
:powerline-scale 1.1)
;; The leader key
dotspacemacs-leader-key "SPC"
;; The leader key accessible in `emacs state' and `insert state'
;; (default "M-m")
dotspacemacs-emacs-leader-key "M-m"
;; Major mode leader key is a shortcut key which is the equivalent of
;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
dotspacemacs-major-mode-leader-key ","
;; Major mode leader key accessible in `emacs state' and `insert state'.
;; (default "C-M-m)
dotspacemacs-major-mode-emacs-leader-key "C-M-m"
;; These variables control whether separate commands are bound in the GUI to
;; the key pairs C-i, TAB and C-m, RET.
;; Setting it to a non-nil value, allows for separate commands under <C-i>
;; and TAB or <C-m> and RET.
;; In the terminal, these pairs are generally indistinguishable, so this only
;; works in the GUI. (default nil)
dotspacemacs-distinguish-gui-tab nil
;; (Not implemented) dotspacemacs-distinguish-gui-ret nil
;; The command key used for Evil commands (ex-commands) and
;; Emacs commands (M-x).
;; By default the command key is `:' so ex-commands are executed like in Vim
;; with `:' and Emacs commands are executed with `<leader> :'.
dotspacemacs-command-key ":"
;; If non nil `Y' is remapped to `y$'. (default t)
dotspacemacs-remap-Y-to-y$ t
;; Name of the default layout (default "Default")
dotspacemacs-default-layout-name "Default"
;; If non nil the default layout name is displayed in the mode-line.
;; (default nil)
dotspacemacs-display-default-layout nil
;; If non nil then the last auto saved layouts are resume automatically upon
;; start. (default nil)
dotspacemacs-auto-resume-layouts nil
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.
;; (default 'cache)
dotspacemacs-auto-save-file-location 'cache
;; Maximum number of rollback slots to keep in the cache. (default 5)
dotspacemacs-max-rollback-slots 5
;; If non nil then `ido' replaces `helm' for some commands. For now only
;; `find-files' (SPC f f), `find-spacemacs-file' (SPC f e s), and
;; `find-contrib-file' (SPC f e c) are replaced. (default nil)
dotspacemacs-use-ido nil
;; If non nil, `helm' will try to minimize the space it uses. (default nil)
dotspacemacs-helm-resize nil
;; if non nil, the helm header is hidden when there is only one source.
;; (default nil)
dotspacemacs-helm-no-header nil
;; define the position to display `helm', options are `bottom', `top',
;; `left', or `right'. (default 'bottom)
dotspacemacs-helm-position 'bottom
;; If non nil the paste micro-state is enabled. When enabled pressing `p`
;; several times cycle between the kill ring content. (default nil)
dotspacemacs-enable-paste-micro-state nil
;; Which-key delay in seconds. The which-key buffer is the popup listing
;; the commands bound to the current keystroke sequence. (default 0.4)
dotspacemacs-which-key-delay 0.4
;; Which-key frame position. Possible values are `right', `bottom' and
;; `right-then-bottom'. right-then-bottom tries to display the frame to the
;; right; if there is insufficient space it displays it at the bottom.
;; (default 'bottom)
dotspacemacs-which-key-position 'bottom
;; If non nil a progress bar is displayed when spacemacs is loading. This
;; may increase the boot time on some systems and emacs builds, set it to
;; nil to boost the loading time. (default t)
dotspacemacs-loading-progress-bar t
;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
;; (Emacs 24.4+ only)
dotspacemacs-fullscreen-at-startup nil
;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
;; Use to disable fullscreen animations in OSX. (default nil)
dotspacemacs-fullscreen-use-non-native nil
;; If non nil the frame is maximized when Emacs starts up.
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
;; (default nil) (Emacs 24.4+ only)
dotspacemacs-maximized-at-startup nil
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's active or selected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-active-transparency 90
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's inactive or deselected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-inactive-transparency 90
;; If non nil unicode symbols are displayed in the mode line. (default t)
dotspacemacs-mode-line-unicode-symbols t
;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
;; scrolling overrides the default behavior of Emacs which recenters the
;; point when it reaches the top or bottom of the screen. (default t)
dotspacemacs-smooth-scrolling t
;; If non nil line numbers are turned on in all `prog-mode' and `text-mode'
;; derivatives. If set to `relative', also turns on relative line numbers.
;; (default nil)
dotspacemacs-line-numbers nil
;; If non-nil smartparens-strict-mode will be enabled in programming modes.
;; (default nil)
dotspacemacs-smartparens-strict-mode nil
;; Select a scope to highlight delimiters. Possible values are `any',
;; `current', `all' or `nil'. Default is `all' (highlight any scope and
;; emphasis the current one). (default 'all)
dotspacemacs-highlight-delimiters 'all
;; If non nil advises quit functions to keep server open when quitting.
;; (default nil)
dotspacemacs-persistent-server nil
;; List of search tool executable names. Spacemacs uses the first installed
;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
;; (default '("ag" "pt" "ack" "grep"))
dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
;; The default package repository used if no explicit repository has been
;; specified with an installed package.
;; Not used for now. (default nil)
dotspacemacs-default-package-repository nil
;; Delete whitespace while saving buffer. Possible values are `all'
;; to aggressively delete empty line and long sequences of whitespace,
;; `trailing' to delete only the whitespace at end of lines, `changed'to
;; delete only whitespace for changed lines or `nil' to disable cleanup.
;; (default nil)
dotspacemacs-whitespace-cleanup nil
))
(defun dotspacemacs/user-init ()
"Initialization function for user code.
It is called immediately after `dotspacemacs/init', before layer configuration
executes.
This function is mostly useful for variables that need to be set
before packages are loaded. If you are unsure, you should try in setting them in
`dotspacemacs/user-config' first."
(setq ac-js2-evaluate-calls t)
(setq projectile-switch-project-action 'neotree-projectile-action)
(setq neo-smart-open t)
(setq tab-width 2)
(setq-default indent-tabs-mode nil)
(setq-default js2-basic-offset 2)
(setq-default git-magit-status-fullscreen t)
(setq js-indent-level 2)
)
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a package is loaded,
you should place your code here."
(add-to-list 'auto-mode-alist '("\\.js$\\'" . js2-mode))
(add-hook 'js2-mode-hook 'ac-js2-mode)
(projectile-global-mode)
(evil-leader/set-key "n" 'neotree-toggle)
(global-git-commit-mode t)
(ac-config-default)
(tern-ac-setup)
;; Vim key bindings
(evil-leader/set-key
"ci" 'evilnc-comment-or-uncomment-lines
"cl" 'evilnc-quick-comment-or-uncomment-to-the-line
"cc" 'evilnc-copy-and-comment-lines
"cp" 'evilnc-comment-or-uncomment-paragraphs
"cr" 'comment-or-uncomment-region
"cv" 'evilnc-toggle-invert-comment-line-by-line
"\\" 'evilnc-comment-operator ; if you prefer backslash key
)
(setq-default dotspacemacs-configuration-layers '(
(colors :variables colors-enable-rainbow-identifiers t)))
)
;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions.
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(paradox-github-token t)
'(git-gutter:update-interval 2)
)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
However, auto-complete does appear to work in emacs-lisp (discovered when editing the spacemacs config file.
If you installed full version of spacemacs and use vim editing style:
1. use <spc> f e d to open .spacemacs file
2. find dotspacemacs-configuration-layers,this should be a list of layers
3. auto-completionshould already be in the list, but commented out. Just enable it by remove the comment mark before.
4. in normal mode, invoke <spc> f e R to install required packages, or simply restart emacs

emacs indentation inconsistent in nesed loops

I am working on C code.
I have a problem same as that in this question.
The solution there is to use spaces instead of tabs. But I'm trying/I'd prefer to use Smart Tabs Mode.
I've tried enabling and disabling both "c-tab-always-indent" and "indent-tabs-mode" (in cc-mode-hook).
The problem I see is that in some parts of the code a nested loop generates two Tabs, as expected(?). But in some cases, it generates only one tab and four spaces, while in other cases it generates only one tab, something like below:
function_name
open brace here
...code indented by 4 spaces (though I want a tab)>
open_brace
_tab_ code under condition
_4spc_ close_brace
some more 4 space aligned code
_tab_ open_brace
_tab+4spc_ code under some block
_tab_ close_brace
some more 4 space aligned code
_tab_ open_brace
_2 tabs_ code aligned as I prefer with two tabs
_tab_ close_brace
Can someone help me with getting the last style in the whole code?
My .emacs file is here (I use a few packages, like cscope and hide-show, but I don't think that should cause problems):
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector [default default default italic underline success warning error])
'(ansi-color-names-vector ["black" "red3" "ForestGreen" "yellow3" "blue" "magenta3" "DeepSkyBlue" "gray50"])
'(c-basic-offset 4)
'(c-cleanup-list (quote (scope-operator space-before-funcall compact-empty-funcall)))
'(c-default-style (quote ((c-mode . "linux") (c++-mode . "linux") (java-mode . "java") (awk-mode . "awk") (other . "gnu"))))
'(c-hanging-braces-alist (quote set-from-style))
; '(c-tab-always-indent t)
'(custom-enabled-themes (quote (tango-dark)))
'(save-place t nil (saveplace))
'(show-paren-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(setq savehist-additional-variables ;; also save...
'(search-ring regexp-search-ring) ;; ... my search entries
savehist-file "~/.emacs.d/savehist") ;; keep my home clean
(defalias 'yes-or-no-p 'y-or-n-p) ; to answer y or n instead of yes or no :-P ...I'm to lazy
(setq search-highlight t ;; highlight when searching...
query-replace-highlight 1) ;; ...and replacing
(add-to-list 'load-path "~/.emacs.d/packages/")
(add-to-list 'load-path "~/share/emacs/site-lisp")
;;;add packages
;;(require 'doxymacs)
;;; turn ons
(ido-mode)
(savehist-mode 1)
(setq show-paren-mode 1)
(global-linum-mode 1)
(setq column-number-mode 1)
;;cc-mode changes
(require 'smart-tabs-mode)
(require 'xcscope)
(cscope-setup)
(autoload 'smart-tabs-mode "smart-tabs-mode"
"Intelligently indent with tabs, align with spaces!")
(autoload 'smart-tabs-mode-enable "smart-tabs-mode")
(autoload 'smart-tabs-advice "smart-tabs-mode")
(autoload 'smart-tabs-insinuate "smart-tabs-mode")
(defun my-c-mode-common-hook ()
(setq require-trailing-newline 1) ;; Always add a final newline
(which-function-mode 1)
(subword-mode 1)
(hs-minor-mode 1)
(setq show-paren-style 'parenthesis)
; (setq indent-tabs-mode t)
(smart-tabs-mode 1)
)
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)

What is the folding method corresponding to {{{ in Emacs?

I have used the following as comments in my .emacs
// {{{
// }}}
My .emacs
;; Basic Characteristics// {{{*/
(setq c-basic-offset 4) ; indents 4 chars
(setq tab-width 4) ; and 4 char wide for TAB
(setq indent-tabs-mode nil) ; And force use of spaces
(turn-on-font-lock) ; same as syntax on in Vim
(setq inhibit-splash-screen t) ; hide welcome screen// }}}*/
;;;; For Emacs' org -mode// {{{*/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The following lines are always needed. Choose your own keys.
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(global-font-lock-mode 1) ; for all buffers
(add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only
;; This is needed for Emacs 22, not for 23
(transient-mark-mode 1)
;; To load Lisp files
;; includes only one folder
;; (add-to-list 'load-path "~/.lisp")
;// }}}*/
;; to include all subdirectories too// {{{*/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 1. color theme
;;; 2. Google hyperlinks
;;; this code includes only one folder
(let ((base "/Users/Masi/.lisp"))
(add-to-list 'load-path base)
(dolist (f (directory-files base))
(let ((name (concat base "/" f)))
(when (and (file-directory-p name)
(not (equal f ".."))
(not (equal f ".")))
(add-to-list 'load-path name)))))
;// }}}*/
; customize hs-minor-mode// {{{*/
(add-hook 'c-mode-common-hook
(lambda()
(local-set-key (kbd "C-c <right>") 'hs-show-block)
(local-set-key (kbd "C-c <left>") 'hs-hide-block)
(local-set-key (kbd "C-c <up>") 'hs-hide-all)
(local-set-key (kbd "C-c <down>") 'hs-show-all)
(hs-minor-mode t)))
;// }}}*/
;; Folds// {{{*/
; to enable folding mode
(load "folding" 'nomessage 'noerror)
(folding-mode-add-find-file-hook)t
;;{{{ LaTeX mode stuff
(add-hook 'TeX-mode-hook
'(lambda ()
(LaTeX-math-mode)
(turn-on-reftex)))
;;// }}}*/
I get the following error
Loading encoded-kb...done
An error has occurred while loading `/Users/Masi/.emacs':
error: Too many arguments
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 debug mode, it says
Debugger entered--Lisp error: (error "Too many arguments")
(defvar folding-package-url-location "Latest folding is available at http://cvs.xemacs.org/-xemacs-p (or (boundp 'xemacs-logo)\n $
eval-buffer(#<buffer *load*<2>> nil "/Users/Masi/.lisp/folding.el" nil t) ; Reading at buffer position 35362
load-with-code-conversion("/Users/Masi/.lisp/folding.el" "/Users/Masi/.lisp/folding.el" t t)
load("folding" nomessage noerror)
eval-buffer(#<buffer *load*> nil "/Users/Masi/.emacs" nil t) ; Reading at buffer position 2224
load-with-code-conversion("/Users/Masi/.emacs" "/Users/Masi/.emacs" t t)
load("~/.emacs" t t)
#[nil "^H\205\276^# \306=\203^Q^#\307^H\310Q\202A^# \311=\2033^#\312\307\313\314#\203#^#\315\202A^#\312\307\313\316#\203/^#\317\202A^#\315\202A^# \32$
command-line()
normal-top-level()
My ~/.lisp/folding.el
;;; folding.el --- A folding-editor-like minor mode.
;; This file is not part of Emacs
;; Copyright (C) 2000-2009
;; Jari Aalto
;; Copyright (C) 1995, 1996, 1997, 1998, 1999
;; Jari Aalto, Anders Lindgren.
;; Copyright (C) 1994
;; Jari Aalto
;; Copyright (C) 1992, 1993
;; Jamie Lokier, All rights reserved.
;;
;; Author: Jamie Lokier <jamie A T imbolc.ucc dt ie>
;; Jari Aalto <jari aalto A T cante dt net>
;; Anders Lindgren <andersl A T csd.uu dt se>
;; Maintainer: Jari Aalto <jari aalto A T cante dt net>
;; Created: 1992
;; Keywords: tools
;;
;; [Latest XEmacs CVS tree commit and revision]
;; VCS-Version: $Revision: 3.42 $
;; VCS-URL: http://savannah.nongnu.org/projects/emacs-tiny-tools/
;; VCS-Date: $Date: 2007/05/07 10:50:05 $
;;
;; [Latest devel: Savannah emacs-tiny-tools revision]
;; Version: git 56b3089
(defconst folding-version-time "2009.0220.1404"
"Last edit time in format YYYY.MMDD.HHMM.")
;;{{{ GPL
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation,
;; or (at your option) any later version.
;;
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with program. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;
;; Visit <http://www.gnu.org/copyleft/gpl.html> for more information
;;}}}
;;; Commentary:
;;{{{ Introduction
;; Preface
;;
;; This package provides a minor mode, compatible with all major
;; editing modes, for folding (hiding) parts of the edited text or
;; program.
;;
;; Folding mode handles a document as a tree, where each branch
;; is bounded by special markers `{{{' and `}}}'. A branch can be
;; placed inside another branch, creating a complete hierarchical
;; structure.
;;
;; Folding mode can CLOSE a fold, leaving only the initial `{{{'
;; and possibly a comment visible.
;;
;; It can also ENTER a fold, which means that only the current
;; fold will be visible, all text above `{{{' and below `}}}'
;; will be invisible.
;;
;; Please note, that the maintainers do not recommend to use only
;; folding for you your code layout and navigation. Folding.el is
;; on its best when it can "chunk" large sections of code inside
;; folds. The larger the chunks, the more the usability of
;; folding will increase. Folding.el is not meant to hide
;; individual functions: you may be better served by hideshow.el
;; or imenu.el (which can parse the function indexes)
;;}}}
;;{{{ Installation
;; Installation
;;
;; To install Folding mode, put this file (folding.el) on your
;; Emacs `load-path' (or extend the load path to include the
;; directory containing this file) and optionally byte compile it.
;;
;; The best way to install folding is the autoload installation,
;; so that folding is loaded into your emacs only when you turn on
;; `folding-mode'. This statement speeds up loading your .emacs
;;
;; (autoload 'folding-mode "folding" "Folding mode" t)
;; (autoload 'turn-off-folding-mode "folding" "Folding mode" t)
;; (autoload 'turn-on-folding-mode "folding" "Folding mode" t)
;;
;; But if you always use folding, then perhaps you want more
;; traditional installation. Here Folding mode starts
;; automatically when you load a folded file.
;;
;; ;; (setq folding-default-keys-function
;; ;; 'folding-bind-backward-compatible-keys)
;;
;; (if (load "folding" 'nomessage 'noerror)
;; (folding-mode-add-find-file-hook))
;;
;; Folding uses a keymap which conforms with the new Emacs
;; (started 19.29) style. The key bindings are prefixed with
;; "C-c#" instead of old "C-c". To use the old keyboard bindings,
;; uncomment the lines in the the above installation example
;;
;; The same folding marks can be used in `vim' editor command
;; "set fdm=marker".
;;
;; Uninstallation
;;
;; To remove folding, call `M-x' `folding-uninstall'.
;;
;; To read the manual
;;
;; At any point you can reach the manual with `M-x'
;; `finder-commentary' RET folding RET.
;;}}}
;;{{{ DOCUMENTATION
;; Compatibility
;;
;; Folding supports following Emacs flavors:
;;
;; Unix Emacs 19.28+ and Win32 Emacs 19.34+
;; Unix XEmacs 19.14+ and Win32 XEmacs 21.0+
;;
;; Compatibility not for old NT Emacs releases
;;
;; NOTE: folding version starting from 2.47 gets around this bug
;; by using adviced kill/yank functions. The advice functions are
;; only instantiated under problematic NT Emacs versions.
;;
;; Windows NT/9x 19.34 - 20.3.1 (i386-*-nt4.0) versions contained
;; a bug which affected using folding. At the time the bug was
;; reported by Trey Jackson <trey A T cs berkeley edu>
;;
;; If you kill folded area and yank it back, the ^M marks are
;; removed for some reason.
;;
;; Before kill
;; packages or modes
;;
;; Folding.el was designed tofor big files. Sometimes people misunderstand the
;; better job. Trying to wrap
;; individual functions insis not where folding is
;; it's best. Grouping several f logical fold-block
;; in the other is. So, to choose a our need,
;; here are some suggestions,:
;;
;; o Naation of imenu.el, speedbar.el and
;; hideshow.el
;; ng.el
;; o For text, `outline-mode' is more non-intrusive.
;; Look at Emacs NEWS file (`C-x' `n') and you can se: `M-x' `folding-mode'
;; `RET'. The mode line should cont When loading a document containing fold marks, Folding mode ised. For example when
;; loading my init file, only the follines
;; of comments) are visible:
;;
;; ;;{{{ Ge ;;{{{ Keyboard...
;; ;;{{{ Packages...
;; ;; ;;{{{ Minor modes...
;; ;;{{{ Debug...
;;
;t entering,
;; use `C-c # C-s', which produces this displa
;; ;;}}}
;;
;; To show everything, just as the fook like if
;; Folding mode hadn't been activated, give thT', normally bound to `C-c' `#'
;; `C-o'. To close all foevel, the
;; command `folding-whole-buffer' could be used.ouse support
;;
;; Folding mode v2.0 introduced mouse support. Folds can be shown
;; or hidden by simply clicking ondidn't click on a
;; fold mark.
;;
;; The menu
;;
;; placed in the "Tools" menu. Should no Tools menu exist
;; he menu will be placed in the menu bar.
;;
;; ISearch
;;
;; incremental search (C-s) facilities,
;; folds will be aut;;
;; Problems
;;
;; Uneven fold marks
;;
;; Oops, I ;;{{{
;; ;;}}}
;;
;; folding-whole-buffer d whole buffer
;;
;; If you call commands `folding-open-bufd
;; `folding-whole-buffer' and notice that there are open;; sections in the buffer, then you have mismatch of foldspen or closing fold mark.
;;
;; Folding and outline modes
;;
;ame as Outline mode, a major and
;; minor mode which is pahe Emacs distribution. The two
;; packages do, however, re other very much. The main
;; differences between the twore:
;;
;; o Folding mode uses explicit marks, `{{{' and `}}}', to
;; mark the beginning and the end of a branch.
;; Outline, on the other other hand, tries to use already
;; existing marks, like the `\section' string in a TeX
;; document.
;;
;; o Outline mode has no end marker which means that it is
;; impossible for text to follow a sub-branch.
;;
;; o Folding mode use the same markers for branches on all depths,
;; Outline mode requires that marks should be longer the
;; further, down in the tree you go, e.g `\chap', \section',
;; `\subsection', `\subsubsection'. This is needed to
;; distinguish the next mark at the current or higher levels
;; from a sub-branch, a problem caused by the lack of
;; end-markers.
;;
;; o Folding mode has mouse suppoyou can navigate through a
;; folded document by clicksion
;; of Outline mode has mouse support.)
;;
;; of Folding is capable of
;; automatically to open folthe the entire
;; document must be opened prior isearcutline mode is useful when the document being
;; edited coers are hard to find, except if you're happy with
;; one fn per fold.
;;
;; Future development ideas
;;
;; The planinning to rewrite the entire package.
;; Including replacithe program, written using
;; old Emacs technology (selectys or text-properties for
;; Emacs and extents for XEmacs.;;
;; It is not likely that any of this will come true coning
;; the time required to rewrite the core of the package. Since
;; the package, in it's current state, is much more powerful than
;; the original, it would be appropriate to write such package
;; from scratch instead of doing surgery on this one.
;;}}}
;;{{{ Customization
;; Customization: general
;;
;; The behavior of Folding mode is controlled mainly by a set of
;; Emacs Lisp variables. This section will discuss the most
;; useful ones, for more details please see the code. The
;; descriptions below assumes that you know a bit about how to
;; use simple Emacs Lisp and kt ~/.emacs, your
;; init file.
;;
;; Customization: hooks a
;; function doing the customization. The function is the see
;; the example section below.) The following hooks lding mode is activated.
;; o `<major mode>-folding-hookjor
;; mode set to <major mode>. (e.g. When editing C the hook `c-mode-folding-hook' is called.)
;; o `fol Called when folding mode is loaded into Emacs.
;;
;; C it is used by outline-minor-mode. It is not likely that fe try to use folding and outline at the same time.
;;
;; Ho. The
;; variable `folding-default-keys-function' specifiing line to your
;; init file:
;;
;; (setq folding-default-keys-function
;; 'folding-bind-backward-compatible-keys)
;;
;; To define keys similar to the keys used by Outline mode, use:
;;
;; (setq folding-defaut-keys-function
;; 'folding-bind-outline-compati-keys)
;;
;; Customization: adding new major modes
;;
;; To add fold marks for a new major mode, use the function
;; `folding-add-to-marks-list'. The command also replaces
;; existing marks. An example:
;;
;; (folding-add-to-marks-list
;; 'c-mode "/* {{{ " "/* }}} */" " */" t)
;;
; Customization: ISearch
;;
;; If you don't like the extension folding.el applies to isearch,
;; set the variable `folding-isearch-install' to nil before
;; loading this pacndard
;; ones, you can do like this:
;;
;; (setqs-function
;; '(folding-bind-backward-compatible- "Folding setup."
;;
;; (folding-install) ;; jus;; ............................................... markers ...
;; ;; sh/perl/awk code
;;
;; (defvar f-marks-alist nil)
;;
;; (let* ((ptr (assq 'text-mode folding-mode-marks-alist)))
;; (setcdr ptr (list "# {{{" "# }}}")))
;;
;; ;; .....................rrent-entry)
;; (define-key folding-mode-prefix-map 'folding-whole-buffer))
;;
;; Example:;; (defun my-folding-load-hook ()
;; "Foldi; Change marks for 'text-mode'
;; (let* ((ptr (assqing-mode-marks-alist)))
;; (setcdr ptr (list "# {{xample: choosing different fold marks for mode
;;
;; Suppoerent fold marks for the
;; major mode: e.g. to alternate (defun my-folding-text-mode-setup (&optional use-cu (interactive
;; (list (y-or-n-p "Us; (let* ((ptr (assq major-mode folding-mode-marks- (when (eq major-mode 'text-mode)
;; (setq begin default-begin end default-end)))
;; (setcdr ptr (list begin end))
;; f these 3 is to be folded at any
;; one time, using a simpomment types, e.g., "unfold
;; everything then fold on \x";;
;; \O ... \endO
;; \L ... \endL
;; "Folding vars setup."
;; (let ((ptr (assq 'te;; (define-key folding-mode-prefix-map "C"
;; 'my-folding-marks-change)))
;;
;; ctive "P")
;; (let ((ptr (assq major-mode folding-mome major-mode))
;; (setq input
;; read-string "Latex \\end(X) Marker (default O): "
;; (setq input (upcase input))
;; (turnncat "\\" input) (concat "\\end" input)))
;; (tu ;; End of example
;;
;; Bugs: Lazy-shot.el conflict in in the minibuffer and XEmacs freezes.
;;
;; The strange phat I have this bug only under Solaris
;; 2.5 sparc (binar.6 x86. (XEmacs 20.4, folding 2.35). I will try to access
;; ;; the XEmacs people I you can reproduce it.
;;}}}
;;{{{ Documentation
;; Old documentation
;;
;; The following s written by Jamie Lokier for the release
;; of Folding V1t is included here for no particular reason:
;;
;; Emacs 1 frames, then move in
;; and out of folds in the buffer. Tnerally in order to
;; avoid some Emacs display "features"ome of it is specific to
;; certain versions of Emacs. By ;;
;; More known bugs
;;
;; *** Needs folding-fold-regionk out what happens when you
;; exit a fold with the file dat sometime.
;;
;; Future features
;;
;; *** I will add a earlier versions does not count line-numbers in the right
;; ve.
;;
;; *** Fold titles should be optionally allowed on invisible text-properties (I hope they are intended to
;; sible; it isn't implemented like that yet), it
;; will be ed text without affecting the
;; text of the buffer. At thrns for line-feeds in the buffer. This isn't such
;; a gooeven more text-properties, it may be possible to track
;; and out of folds, and have Folding mode
;; automatically e necessary to maintain a
;; sensible display. Because the dified (if
;; overlays are used to hide text), this is quiorward-char', `folding-goto-line' or
;; `folding-next-erromight make it possible to
;; avoid using narrowing. This m3cff7]
;; - Minor documentaton fixes.
;; - Add new `python-mode [jari 3.36-3.37 2006.1118]
;; - Jeremy Hankins <nowan An org> sent a patch, which
;; adds variable `folding-narrow-batch affects
;; mostly `folding-shift-in'. This makes it possader to the beginning for canonnical location.
;; Updated maid from bibtex-mode.
;; Changed bib-mode '#comment' => '%'. Clian
;; Bug#282388
;;
;; Sep 10 2004 21.3 [jari0]
;; - (folding-fold-region): caused to indent bottom fold
;; -mode. Disabled
;; running `indent-according-to-mode' while i; Bug reported by Uwe Brauer; oub A T mat dot ucm dot es
;; -whole buffer.
;; - Changed version scheme to date based YYYY.MMed unnecessary 'all rights reserved'.
;; - (folding-check-foldeter, which
;; - protected all email addresses by removing AT-si2.111-2.115]
;; - Merged in changes made by 2003-11-12 Adrian ; using different expansion macros for XEmacs and Emacs.
;; rg/xemacs-beta/199810/msg00039.html
;; - (folding-forward-char- 2.112 Renamed.
;; Was `folding-forward-char'.
;; (folding-ar-1): 2.112 Renamed.
;; Was `folding-backward-char'.
;; (fion with '_p' interactive spec.
;; (folding-backward-char-macolding-interactive-spec-p): 2.112 New.
;;
[...]
There's at least one error in the code in your .emacs, here:
; to enable folding mode
(load "folding" 'nomessage 'noerror)
(folding-mode-add-find-file-hook)t
That t is a syntax error as it stands. Might just be a type frpom cut and paste though.
On the error, Trey'd right, and in fact I think I know what the error probably is: somehow the trailing quote mark in the string
"Latest folding is available at http://cvs.xemacs.org/-xemacs-p
has gone missing. From the two of these issues, I suspect your source is corrupt.
It looks like your folding file /Users/Masi/.lisp/folding.el has a problem, we'd need to see the contents of that to determine the error. The reason I say so is that the stack trace goes through a call to load-with-code-conversion - which shows the folding.el file being loaded.
If you take a look at the latest version, found here (version 3.42), the line that begins
(defvar folding-package-url...
is properly formed. However, the stack trace in yours looks like there is some lisp code that somehow made it into the string. Namely the:
(or (boundp 'xemacs-logo)
Try downloading a fresh copy.