Hello Michael,
Thanks for the reply. Apparently, the issue is somewhere else though. The issue seems to be related with the abntex, or tex, mode for it happens only when a file of this kind is open. In case you wish to check it out, my .emacs (big) is below.
Best,
Andre Luiz
Post by AndreLTRHello,
Post by AndreLTRI'm trying to define the crasis key in my .emacs as follows,
(global-set-key (kbd "`") '`)
(global-set-key (kbd "`") #'self-insert-command) should do it - unless
C-h k ` tells you that it's a dead key. Then you can either disable
dead keys in your window system if you don't want them at all (setxkbmap
in X), or key-bind the according symbol in Emacs.
Regards,
Michael.
;; File name: ` ~/.emacs
;; General configuration
;; Text and the such
;; Use colors to highlight commands, etc.
(global-font-lock-mode t)
;; Disable the welcome message
(setq inhibit-startup-message t)
;; Format the title-bar to always include the buffer name
(setq frame-title-format "emacs - %b")
;; Display date and time
(setq display-time-day-and-date 't)
;; Make the mouse wheel scroll Emacs
(mouse-wheel-mode t)
;; Always end a file with a newline
(setq require-final-newline t)
;; Stop emacs from arbitrarily adding lines to the end of a file when the
;; cursor is moved past the end of it:
(setq next-line-add-newlines nil)
;; Flash instead of that annoying bell
(setq visible-bell t)
;; Remove icons toolbar
(if (> emacs-major-version 20)
(tool-bar-mode -1))
;; Use y or n instead of yes or not
(fset 'yes-or-no-p 'y-or-n-p)
(set-input-mode (car (current-input-mode))
(nth 1 (current-input-mode)) 0)
(setq line-number-mode t)
(setq column-number-mode t)
;; (global-set-key (kbd "`") '`)
;; (global-set-key (kbd "`") #'self-insert-command)
(global-set-key (kbd "C-z") 'undo)
(global-set-key (kbd "C-<right>") 'forward-word)
(global-set-key (kbd "C-<left>") 'backward-word)
;;;;;;;;;;;;Emacs customizations in general;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;(set-foreground-color "black")
(set-background-color "wheat")
(set-cursor-color "red")
(cond ((fboundp 'global-font-lock-mode)
;; turn on font-lock in all modes that support it
(global-font-lock-mode t)
;; maximum colors
(setq font-lock-maximum-decoration t)))
;; auto save and backup setup
;; disable backup
(setq backup-inhibited t)
;; disable auto save
(setq auto-save-default nil)
;; disable cua-mode
;; (setq cua-mode nil)
;; keyword configuration
;; I know that string is in my Emacs somewhere!
(require 'cl)
(defcustom search-all-buffers-ignored-files (list (rx-to-string '(and bos (or ".bash_history" "TAGS") eos)))
"Files to ignore when searching buffers via \\[search-all-buffers]."
:type 'editable-list)
(require 'grep)
(defun search-all-buffers (regexp prefix)
"Searches file-visiting buffers for occurence of REGEXP. With
prefix > 1 (i.e., if you type C-u \\[search-all-buffers]),
searches all buffers."
(interactive (list (grep-read-regexp)
current-prefix-arg))
(message "Regexp is %s; prefix is %s" regexp prefix)
(multi-occur
(if (member prefix '(4 (4)))
(buffer-list)
(remove-if
(lambda (b) (some (lambda (rx) (string-match rx (file-name-nondirectory (buffer-file-name b)))) search-all-buffers-ignored-files))
(remove-if-not 'buffer-file-name (buffer-list))))
regexp))
(global-set-key [f5] 'query-replace-in-open-buffers) ;; replace word(s) em todos buffers
(defun query-replace-in-open-buffers (arg1 arg2)
"query-replace in open files"
(interactive "sQuery Replace in open Buffers: \nsquery with: ")
(mapcar
(lambda (x)
(find-file x)
(save-excursion
(beginning-of-buffer)
(query-replace arg1 arg2)))
(delq
nil
(mapcar
(lambda (x)
(buffer-file-name x))
(buffer-list)))))
(global-set-key [f6] 'search-all-buffers) ;; search word(s) em todos buffers
(defun query-replace-in-open-buffers (arg1 arg2)
"query-replace in open files"
(interactive "sQuery Replace in open Buffers: \nsquery with: ")
(mapcar
(lambda (x)
(find-file x)
(save-excursion
(beginning-of-buffer)
(query-replace arg1 arg2)))
(delq
nil
(mapcar
(lambda (x)
(buffer-file-name x))
(buffer-list)))))
;; alternative version
(defun px-query-replace-in-open-buffers (arg1 arg2)
"query-replace in all open files"
(interactive "sRegexp:\nsReplace with:")
(mapcar
(lambda (x)
(find-file x)
(save-excursion
(goto-char (point-min))
(query-replace-regexp arg1 arg2)))
(delq
nil
(mapcar
(lambda (x)
(buffer-file-name x))
(buffer-list)))))
(global-set-key [f5] 'query-replace-in-open-buffers)
(global-set-key [f7] 'spell-buffer) ;; spell buffer
(global-set-key [f8] 'spell-region) ;; spell region
(global-set-key [f9] 'spell-word) ;; spell word
;; font size and type
(set-face-attribute 'default nil :font "Droid Sans Mono-13")
;;; line width
(setq-default fill-column 80)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;;; frame size and position
(defun arrange-frame (w h x y)
"Set the width, height, and x/y position of the current frame"
(let ((frame (selected-frame)))
(delete-other-windows)
(set-frame-position frame x y)
(set-frame-size frame w h)))
(arrange-frame 125 110 80 80)
;; Load CEDET.
;; See cedet/common/cedet.info for configuration details.
;; IMPORTANT: For Emacs >= 23.2, you must place this *before* any
;; CEDET component (including EIEIO) gets activated by another
;; package (Gnus, auth-source, ...).
(load-file "/usr/share/emacs/site-lisp/cedet-1.1/common/cedet.el")
;; (load-file "~/cedet-VERSION/common/cedet.el")
;; Enable EDE (Project Management) features
(global-ede-mode 1)
;; Enable EDE for a pre-existing C++ project
;; (ede-cpp-root-project "NAME" :file "~/myproject/Makefile")
;; Enabling Semantic (code-parsing, smart completion) features
;; Select one of the following:
;; * This enables the database and idle reparse engines
(semantic-load-enable-minimum-features)
;; * This enables some tools useful for coding, such as summary mode,
;; imenu support, and the semantic navigator
(semantic-load-enable-code-helpers)
;; * This enables even more coding tools such as intellisense mode,
;; decoration mode, and stickyfunc mode (plus regular code helpers)
;; (semantic-load-enable-gaudy-code-helpers)
;; * This enables the use of Exuberant ctags if you have it installed.
;; If you use C++ templates or boost, you should NOT enable it.
;; (semantic-load-enable-all-exuberent-ctags-support)
;; Or, use one of these two types of support.
;; Add support for new languages only via ctags.
;; (semantic-load-enable-primary-exuberent-ctags-support)
;; Add support for using ctags as a backup parser.
;; (semantic-load-enable-secondary-exuberent-ctags-support)
;; Enable SRecode (Template management) minor-mode.
;; (global-srecode-minor-mode 1)
;; TeX
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
;;; AUCTeX
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-parse-self t) ; Enable parse on load
;; (setq-default TeX-master nil) ; multi-document structure
(setq TeX-PDF-mode t) ; pdflatex default
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) ; enable math mode default
;; (setq-default TeX-master "master") ; All master files called "master"
(setq TeX-view-program-list '(("Acrobat Reader" "acroread %o")))
(setq TeX-view-program-selection '((output-pdf "Acrobat Reader")))
;; ;; latexmk
(add-hook 'LaTeX-mode-hook (lambda ()
(push
'("Latexmk" "latexmk -pdf %(mode) %s" TeX-run-command nil t
:help "Run Latexmk on file")
TeX-command-list)))
;; Configuracao de teclado
;; traducao automatica de acentos p/ LaTeX
(require 'iso-cvt)
;; beamer frames
(require 'latex-frame-mode)
;; owl mode
;; (setq load-path (append '("/usr/share/emacs/site-lisp/owl/" "/usr/share/emacs/23.4/lisp/org/") load-path)
;;; autoload declaration
(autoload 'owl-mode "owl-mode" "OWL mode." t)
(push (cons "\\.owl" 'owl-mode) auto-mode-alist)
;; C mode
;; (add-hook 'c-mode-common-hook
;; (lambda () (define-key c-mode-base-map (kbd "C-c C-l") 'compile)))
;; (c-mode . "gcc -02 -Wall -o %n %f")
;; Java mode
;; ("\\.java$" . "javac %f")
;; Protégé and Jess
;; Jess mode
;; where jess-mode is
;; (setq load-path
;; (cons "/usr/share/emacs/site-lisp" load-path))
;; "auto load" the functions jess-mode and run-jess
(autoload 'jess-mode "jess-mode" "Jess Editing Mode" t nil)
;; jess-mode font lock
(add-hook 'jess-mode-hook #'(lambda()
(turn-on-font-lock)))
;; start 'jess-mode' whenever you visit a Jess source file:
(setq auto-mode-alist
(append auto-mode-alist '(("\\.clp$" . jess-mode))))
;; running a Jess Process Within Emacs
;; jess via a shell script, do something like
(add-hook 'inferior-jess-load-hook #'(lambda ()
(setq inferior-jess-program "/usr/local/bin/jess.sh")))
;; ARDUINO MODE
(setq auto-mode-alist (cons '("\\.\\(pde\\|ino\\)$" . arduino-mode) auto-mode-alist))
(autoload 'arduino-mode "arduino-mode" "Major mode for editing Arduino." t)
;; SML/NJ MODE
;; path names will probably need to be changed
;; (setq load-path (cons "c:/.emacs.d/sml" load-path))
;; (setq sml-mode-info "c:/.emacs.d/sml/sml-mode")
(setq load-path (cons "~/.emacs.d/sml" load-path))
(setq sml-mode-info "~/.emacs.d/sml/sml-mode")
;; load sml-mode setup code
(load "/usr/share/emacs/site-lisp/sml-mode/sml-mode-startup")
(setq sml-mode-info "/usr/info/sml-mode")
(autoload 'sml-mode "sml-mode" "Major mode for editing ML programs." t)
(autoload 'sml "sml-proc" "Run an inferior ML process." t)
(autoload 'cpn-mode "cpn-mode" "CPN-ML interface" t)
(setq auto-mode-alist
(append '(("\\.sig$" . sml-mode)
("\\.cml$" . sml-mode)
("\\.sml$" . sml-mode)) auto-mode-alist))
(setq sml-load-hook
'(lambda() "Highlights." (require 'sml-hilite)))
;; SVN
(require 'psvn)
;; Git
;; (setq load-path (cons (expand-file-name "/usr/share/doc/git-core/contrib/emacs") load-path))
;; (require 'vc-git)
;; (when (featurep 'vc-git) (add-to-list 'vc-handled-backends 'git))
;; (require 'git)
;; (autoload 'git-blame-mode "git-blame"
;; "Minor mode for incremental blame for Git." t)
;; MATLAB mode
;; Replace path below to be where your matlab.el file is.
;; Add matlab location
(add-to-list 'load-path "/opt/MATHWORKS_R2009B/bin")
(add-to-list 'load-path "/opt/matlab/bin")
(add-to-list 'load-path "~/.emacs.d/matlab-emacs")
(load-library "matlab-load")
(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.
'(ede-project-directories (quote ("/home/andreltr")))
'(ispell-program-name "aspell")
'(matlab-shell-command-switches (quote ("-nodesktop -nosplash"))))
(add-to-list 'load-path "/usr/share/emacs/site-lisp/emacs-goodies-el")
;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/matlab-emacs")
;; (add-to-list 'load-path "/home/andreltr/Documents/matlab/matlab-emacs/")
(require 'matlab-load)
(autoload 'matlab-mode "matlab" "Enter MATLAB mode." t)
(setq auto-mode-alist
(cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
(autoload 'matlab-shell "matlab" "Interactive MATLAB mode." t)
;; Turn off Matlab desktop
;; (setq matlab-shell-command-switches '("-nodesktop -nojvm"))
;; User Level customizations (You need not use them all):
(setq matlab-indent-function-body t) ; if you want function bodies indented
(setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save
(defun my-matlab-mode-hook ()
(setq fill-column 76)) ; where auto-fill should wrap
(add-hook 'matlab-mode-hook 'my-matlab-mode-hook)
(defun my-matlab-shell-mode-hook ()
'())
(add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook)
;; Enable CEDET feature support for MATLAB code. (Optional)
(matlab-cedet-setup)
;; (autoload 'tlc-mode "tlc" "tlc Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.tlc$" . tlc-mode))
(setq tlc-indent-function t)
;;; octave setup
;;; octave
;;; NEW
;; (autoload 'octave-mode "octave-mod" nil t)
;; (add-to-list 'auto-mode-alist '("\\.m\\'" . octave-mode))
;; ;;(setq auto-mode-alist
;; ;; (cons '("\\.m$" . octave-mode) auto-mode-alist))
;; (add-hook 'octave-mode-hook
;; (lambda ()
;; (abbrev-mode 1)
;; (auto-fill-mode 1)
;; (if (eq window-system 'x)
;; (font-lock-mode 1))))
;; (setq octave-help-files '("octave" "octave-LG"))
;; (add-hook 'inferior-octave-mode-hook
;; (lambda ()
;; (turn-on-font-lock)
;; (define-key inferior-octave-mode-map [up]
;; 'comint-previous-input)
;; (define-key inferior-octave-mode-map [down]
;; 'comint-next-input)))
;; (setq octave-auto-indent t)
;; (setq octave-auto-newline t)
;; (setq octave-send-echo-input t)
;; (setq octave-send-line-auto-forward t)
;; (autoload 'octave-help "octave-hlp" nil t)
;; (setq octave-send-echo-input t)
;; if `gnuserv' is installed, add the lines
;; (server-start)
;; (require 'gnuserv)
;; (gnuserv-start)
;; SLIME
;; SLIME setup
(setq inferior-lisp-program "/opt/cmucl/bin/lisp")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime/")
(require 'slime)
(require 'slime-autoloads)
(add-hook 'lisp-mode-hook
(lambda ()
(slime-mode t)))
(add-hook 'inferior-lisp-mode-hook
(lambda ()
(inferior-slime-mode t)))
;; SQL Mode
(require 'sql)
(autoload 'sql-mode "sql-mode" "SQL Editing Mode" t)
(setq auto-mode-alist
(append '(("\\.sql$" . sql-mode)
("\\.tbl$" . sql-mode)
("\\.sp$" . sql-mode))
auto-mode-alist))
;; ignore user data
;; (defalias 'sql-get-login 'ignore)
;; save SQL history in ~/.emacs.d/sql/
(defun my-sql-save-history-hook ()
(let ((lval 'sql-input-ring-file-name)
(rval 'sql-product))
(if (symbol-value rval)
(let ((filename
(concat "~/.emacs.d/sql/"
(symbol-name (symbol-value rval))
"-history.sql")))
(set (make-local-variable lval) filename))
(error
(format "SQL history will not be saved because %s is nil"
(symbol-name rval))))))
(add-hook 'sql-interactive-mode-hook 'my-sql-save-history-hook)
;; just make db output look nice
(defun sql-add-newline-first (output)
"Add newline to beginning of OUTPUT for `comint-preoutput-filter-functions'"
(concat "\n" output))
(defun sqli-add-hooks ()
"Add hooks to `sql-interactive-mode-hook'."
(add-hook 'comint-preoutput-filter-functions
'sql-add-newline-first))
(add-hook 'sql-interactive-mode-hook 'sqli-add-hooks)
;; perl mode
;; Use cperl-mode instead of the default perl-mode
(add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
(add-hook 'cperl-mode-hook 'n-cperl-mode-hook t)
(defun n-cperl-mode-hook ()
(setq cperl-indent-level 4)
(setq cperl-continued-statement-offset 0)
(setq cperl-extra-newline-before-brace t)
(set-face-background 'cperl-array-face "wheat")
(set-face-background 'cperl-hash-face "wheat")
)
(setq indent-line-function 'indent-relative-maybe)
(setq standard-indent 2)
;; GAMS
;; This is a "~/.emacs.el" sample for gams.el
;;
;; First-written: <2001/08/13>
;; Time-stamp: <2010-10-17 23:05:56 >
;;
;; This file is created for gams.el version 3.5.
;;
;; Copy and paste the content of this file into "~/.emacs.el" file.
;;
;; You can see the detailed explanation of each variable with
;; M-x describe-variable.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Necessary settings.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; The following settings are necessary to use GAMS mode.
;; Load path setting. Suppose that c:/home/gams is a directory in which gams.el
;; is installed. Then you should add the following.
(add-to-list
'load-path
;; Please change the directory name according to your environment.
"/usr/share/emacs/site-lisp/gams-4.1"
)
;; By default, GAMS mode will automatically start only when you open a file with
;; an extension `gms'. If you want to add files with another extensions (for
;; example, `dat'), you need to set the following. NB: This setting must be
;; placed before (require 'gams) below.
(setq gams-file-extension '("gms" "dat"))
;; If you are an experienced user of Emacs, you may prefer the following
;; `auto-mode-alist' and `autoload' instead of (require 'gams).
;;
;; Add gms and lst files to auto-mode-alist.
(setq auto-mode-alist
(cons (cons "\\.\\(GMS\\|gms\\|DAT\\|dat\\)$" 'gams-mode) auto-mode-alist))
(setq auto-mode-alist
(cons (cons "\\.\\(LST\\|lst\\)$" 'gams-lst-mode) auto-mode-alist))
;; autoload setting.
(autoload 'gams-mode "gams" "Enter GAMS mode" t)
(autoload 'gams-lst-mode "gams" "Enter GAMS-LST mode" t)
;; The place of GAMS program.
;;
;; If you do not include GAMS system directory in your PATH environmental
;; variable, specify the place of gams program like
(setq gams:process-command-name "/opt/gams/gams")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Important settings.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; The following settings are not necessarily required, but they decide the
;; important behavior of GAMS mode.
;;
;; Log file. If non-nil, GAMS log (the content of process buffer) is written
;; down to log file even without lo=2 option.
(setq gams-process-log-to-file t)
; The extension of GAMS log file
(setq gams-log-file-extension "glg")
;; Template file name for GAMS-TEMPLATE.
;;
; A sample template file "gams-template.txt" is distributed with this file. If
; you want to try a sample file, you must save it in your HOME directory. Or
; you should specify the explicit name of your template file name like
;;
(setq gams-template-file "~/gams-template.txt")
;; Command line options passed to gams. The default value is
(setq gams:process-command-option "ll=0 lo=3 pw=100 ps=9999")
;;
;; Notice: If you are a NTEmacs user, you should include lo=3 option!!!
;; GAMS system directory. The directory where gams.exe exists. This is
;; necessary for `gams-model-library' and `gams-view-docs' command.
(setq gams-system-directory "/opt/gams/")
;; Use upper case or lower case for GAMS statements and dollar control options?
(setq gams-statement-upcase t) ; Use upper case for GAMS statements
(setq gams-dollar-control-upcase t) ; Use upper case for dollar operations.
;; Use MPSGE?
(setq gams-use-mpsge t) ; Yes (default)
; (setq gams-use-mpsge nil) ; No
;; Allow multiple GAMS processes?
; (setq gams-multi-process nil) ; No
(setq gams-multi-process t) ; Yes (default)
;; Initial values of statement and dollar control.
(setq gams-statement-name "parameter")
(setq gams-dollar-control-name "exit")
;; Re-coloring with recentering (C-l)?
(setq gams-recenter-font-lock t) ; Yes (default)
;; (setq gams-recenter-font-lock nil) ; No
;; The window height in the GAMS-OUTLINE mode.
;;
; This is the window height when two windows exist.
(setq gams-ol-height 4)
;;
;; This is the window height when three windows exist.
(setq gams-ol-height-two 20)
;; This is the window width of the GAMS-OUTLINE buffer.
(setq gams-ol-width 10)
;; The default display style in the GAMS-OUTLINE mode.
(setq gams-ol-display-style '(t t))
;; The default viewable items in the GAMS-OUTLINE mode.
(setq gams-ol-view-item
'(
("SUM" . t) ; SUMMARY
("VAR" . t) ; VAR
("EQU" . t) ; EQU
("PAR" . t) ; PARAMETER
("SET" . t) ; SET
("VRI" . t) ; VARIABLE. Not viewable by default.
("LOO" . t) ; LOOP
("OTH" . t) ; Other strings
("COM" . t) ; COMMENT
("INF" . t) ; E x e c u t i o n, C o m p i l a t i o n etc.
))
;; The default alist of viewable items.
;;
;; Each list consists of a pair of the item name and its flag
;;
;; ("ITEM_NAME" . flag)
;;
;; Non-nil (t) of the flag means the item is viewable by default. The order of
;; items in this alist has the meaning. Items are listed in the SELECT-ITEM
;; buffer according to this order. So, if you want to show COM on the top in the
;; SELECT-ITEM mode, you must write COM at the fisrt in this alist.
;; External program for GAMS-OUTLINE mode.
;;
;; The variables below matters only if you use the command
;; `gams-outline-external'. See the explanation of
;; `gams-outline-external'.
;;
;; If you use the C program (gamsolc.exe). and it is localted at the directory
;; "c:/home/gams"
;; (setq gams-ol-external-program "c:/home/gams/gamsolc.exe")
;;
;; If you use the Perl script gamsolperl.pl and it is located at the directory
;; "c:/home/gams" and perl.exe is localted at "c:/Perl/bin/"
;; (setq gams-ol-external-program "c:/home/gams/gamsperl.pl")
;; (setq gams-perl-command "c:/Perl/bin/perl.exe")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Other customizations.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; If you want to try the default values, please uncomment all the settings
;; below.
;; My comment template.
(setq gams-user-comment
"* ----------------------------------------------------------------------
* %
")
;; Close parenthesis and quotation?
;;
;; For example, if you want ) to be inserted automatically when you insert (,
;; then set t to `gams-close-paren-always'.
;;
;; (setq gams-close-paren-always nil) ; Not insert ) automatically.
(setq gams-close-paren-always t) ; Insert ) automatically (default)
;; (setq gams-close-double-quotation-always nil) ; No
(setq gams-close-single-quotation-always t) ; Yes
;; The default height of GAMS process buffer
(setq gams-default-pop-window-height 8) ; Default value is 10
;; Column number in GAMS mode.
(setq gams-fill-column 80)
;; Setting for viewing GAMS pdf documents.
;;
;; The GAMS document directory.
(setq gams-docs-directory "/opt/gams/docs")
;; By default, it is set to `gams-system-directory' + docs."
;;
;; The PDF file viewer.
(setq gams-docs-view-program "/opt/Adobe/Reader9/acroread")
;;; Setting for GAMS-TEMPLATE mode.
;;
;; Without a special reason, you had better set nil to the following variable.
;; (setq gams-save-template-change t) ; default is nil
;; Colorize the *Template Content* buffer in GAMS-TEMPLATE. nil makes
;; GAMS-TEMPLATE mode faster.
;;
(setq gams-template-cont-color t) ; Color (default)
;; (setq gams-template-cont-color nil) ; No color
;;; Setting for Automatic indentation.
;; Use automatic indent or not?
;; (setq gams-indent-on nil) ; No automatic indent.
(setq gams-indent-on t) ; Use automatic indent (default)
;; Column number for automatic indentation. All default values are 8.
;; Column number for normal lines.
(setq gams-indent-number 4)
;; Column number for lines in loop type enviroment (i.e, loop, if, while,
;; for etc.).
(setq gams-indent-number-loop 4)
;;
;; Column number for MPSGE block
(setq gams-indent-number-mpsge 4)
;;
;; Column number for equation definition.
(setq gams-indent-number-equation 4)
;; Indent equation blocks or not?
;;
;; For equation definition block
(setq gams-indent-equation-on t) ; Automatic indent (default)
;; (setq gams-indent-equation-on nil) ; No automatic indent
;; Use tabs for indent.
;;
;; Use only spaces for indent or allow tabs?
;; (setq indent-tabs-mode nil) ; Not use tabs for indent
(setq indent-tabs-mode t) ; Use tabs (default) fot indent
;;
;; To convert all tabs in region to multiple spaces, use M-x untabify.
;; Change the indentation style.
;;
;; If the `gams-indent-more-indent' is assigned non-nil value, the indentation
;; style is changed slightly.
(setq gams-indent-more-indent t) ; nil is default.
;; Insert dollar control options.
;;
;; Use $ key for inserting dollar control options?
;;
;; t => $ key is binded to `gams-insert-dollar-control'.
;; nil => $ key is binded to inserting $ itself
;;
; (setq gams-insert-dollar-control-on nil) ; No (default)
(setq gams-insert-dollar-control-on t) ; Yes
;; The default font-lock (coloring) level.
;; 0 = No coloring
;; 1 = Minumun coloring
;; 2 = Maximum coloring
;; All default values are 2.
;;
(setq gams-font-lock-level 2) ; GAMS mode
(setq gams-lst-font-lock-level 2) ; GAMS-LST mode
(setq gams-ol-font-lock-level 2) ; GAMS-OUTLINE mode.
;; Default inline and end-of-line comment symbols.
(setq gams-inlinecom-symbol-start-default "/*") ; default
(setq gams-inlinecom-symbol-end-default "*/") ; default
(setq gams-eolcom-symbol-default "#") ; default
;; Popup the GAMS process buffer?
;; When you run GAMS, the process buffer popups by default.
(setq gams-always-popup-process-buffer t) ; Popup (default)
;; (setq gams-always-popup-process-buffer nil) ; Not popup.
;; Search identifier definition in included files?
;;; Setting for GAMS-LXI mode.
;; (setq gams-lxi-command-name "c:/home/lisp/gamslxi.exe")
;; (setq gams-lxi-import-command-name "c:/home/lisp/gamslxi-import.exe")
;; Hook settings. For example,
;; (add-hook 'gams-mode-hook
;; '(lambda ()
;; (let ((map gams-mode-map))
;; ;; Bind indent-line to F2.
;; (define-key map [f2] 'gams-indent-line)
;; ;; Bind inserting TAB to TAB key.
;; (define-key map "\t" 'gams-insert-tab)
;; ;; Bind inserting GAMS statement to C-ca.
;; (define-key gams-mode-map "\C-ca" 'gams-insert-statement))
;; ))
;; (add-hook 'gams-lst-mode-hook
;; '(lambda ()
;; ;; a = widen the window.
;; (define-key gams-lst-mode-map "a" 'gams-lst-kill-buffer)
;; ))
;; (add-hook 'gams-ol-mode-hook
;; '(lambda ()
;; (font-lock-mode t)
;; (define-key gams-ol-mode-map "a" 'delete-other-windows)
;; (define-key gams-ol-mode-map [down] 'gams-ol-view-next)
;; (define-key gams-ol-mode-map [up] 'gams-ol-view-prev)
;; ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Other configuration for Emacs.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; The configurations below change the behavior of Emacs in general.
;;
;;; Shell setting.
;; If you use cygwin bash.exe as the shell (and install it in "c:/cygwin/bin/")
;; File name to load inferior shells from.
;; (setq shell-file-name "c:/cygwin/bin/bash.exe")
;; explicit-shell-file-name.
;; (setq explicit-shell-file-name "c:/cygwin/bin/bash.exe")
;; (modify-coding-system-alist 'process ".*sh//exe" 'undecided-unix)
;; (setq shell-command-option "-c")
;; Completion with shell-mode
;; Get rid of ^M in shell mode.
;; (setq shell-file-name-chars "~/A-Za-z0-9_^$!#%&{}@`'.,:()-")
;; If you use cmdproxy.exe as the shell. cmdproxy.exe is placed at the
;; same directory as runemacs.exe.
;; (setq shell-file-name "c:/Emacs/bin/cmdproxy.exe")
;; (setq explicit-shell-file-name "c:/Emacs/bin/cmdproxy.exe")
;; (setq shell-command-option "/c")
;; (setq shell-file-name-chars "~/A-Za-z0-9_^$!#%&{}@`'.,:()-")
;; (setq w32-quote-process-args t)
;; (setq w32-start-process-show-window nil)
;;; Font lock.
(when (and window-system (not (featurep 'font-lock)))
(require 'font-lock)
(if (featurep 'xemacs)
(font-lock-mode 1)
(global-font-lock-mode t)))
;;; font-lock-support-mode (See BUGS_PROBLEMS.txt for the details)
;; The default setting for font-lock-support-mode in Emacs 21-23 is
;; `jit-lock-mode'. But `jit-lock-mode' often interferes with GAMS mode. To
;; resolve this problem, you had better set a large value to
;; `jit-lock-chunk-size' (its default value is 500).
;;
(setq jit-lock-chunk-size 50000)
;;; Emacs/W3 Configuration
(setq load-path (cons "/usr/share/emacs/site-lisp" load-path))
(condition-case ()
(require 'w3-auto "w3-auto") (error nil))
; --------------------
(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.
)
;; Load the program file `gams.el'.
(require 'gams)
;; NB: If you use this (require 'gams), you had better put this at the end
;; of all configurations about gams.el. Because of the bug, the
;; configurations after (require 'gams) may not come into effect.
(put 'upcase-region 'disabled nil)
;; spell options
(setq ispell-program-name "aspell")
(setq-default ispell-program-name "aspell")
(setq-default ispell-extra-args '("--reverse"))
;; ;; dicionario brasileiro ispell
(setq ispell-dictionary "brasileiro")
(global-set-key (kbd "C-c C-x") 'spell-buffer)
; Local Variables:
; mode: emacs-lisp
; fill-column: 60
; End: