Skip to content

Commit

Permalink
Fix problem with variable name ending in “…-map”
Browse files Browse the repository at this point in the history
As CyberDomovoy points out, such a name within a mode misleads Emacs
into treating the variable as a keymap for the mode.

Rename “smart-tabs-mode-map” to “smart-tabs-insinuate-alist”,
which is more accurate anyway.

Fixes #16.
  • Loading branch information
baby-gnu authored and jcsalomon committed Dec 2, 2012
1 parent 03dcdde commit e8a9a20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions smart-tabs-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
(defvar smart-tabs-mode nil
"Define if smart-tabs-mode is enabled")

(defvar smart-tabs-mode-map
(defvar smart-tabs-insinuate-alist
'((c . (lambda ()
(add-hook 'c-mode-hook
(lambda ()
Expand Down Expand Up @@ -203,11 +203,11 @@ Smarttabs is enabled in mode hook.")
(defun smart-tabs-insinuate (&rest languages)
"Enable smart-tabs-mode for LANGUAGES.
LANGUAGES is a list of SYMBOL or NAME as defined in
'smart-tabs-mode-map' alist or a language using standard named
'smart-tabs-insinuate-alist' alist or a language using standard named
indent function and indent level.
"
(mapc (lambda (lang)
(let ((lang-map (assoc lang smart-tabs-mode-map))
(let ((lang-map (assoc lang smart-tabs-insinuate-alist))
(lang-param (smart-tabs-get-standard-language lang)))
(cond ((and (null lang-map)
(not (null (car lang-param)))
Expand Down

0 comments on commit e8a9a20

Please sign in to comment.