Last update: 2012/05/29      

Older Changelogs of GAMS mode for Emacs.

Home (en) > GAMS > GAMS mode for Emacs > Older Changelogs of GAMS mode for Emacs

Older Changelogs of GAMS mode.

1.10: Sun Feb 16, 2003

  • Added the new function `gams-comment-region'' (C-cC-;). This function is an alias for `comment-region''. Select an region and type C-cC-;, then you can comment out it. You can also uncomment the commented-out region by attaching the universal argument like (C-uC-cC-;).

  • Added the new function `gams-replace-statement'' which replaces the existing statements or dollar control options with the new one. If you execute this command on the existing GAMS statements or dollar control options, you can replace them with the new onew. To execute this command, attach the universal argument to C-cC-k and C-cC-d (i.e. C-uC-cC-k, C-uC-cC-d).

  • Added the new function `gams-ol-refresh'' (binded to r in GAMS-OUTLINE mode). Refresh the GAMS-OL buffer if the LST file is updated.

  • Modified `gams-insert-parens''. In the previous version, typing `('' inserted a pair of parenthesis if `gams-close-paren-always'' is non-nil. Now, if you attach the prefix argument to `('' [i.e. typing `C-u (''], just insert `(''.

  • Added the new variable `gams-ol-item-name-width'' (its default value is 18). The width of item name field in GAMS-OUTLINE.

  • Modified display in GAMS-OUTLINE mode.

1.9: Tue Jan 14, 2003

  • Added the new variable `gams-sd-included-file'' (its default value is t). If this variable is assigned non-nil, `gams-show-identifier-defintion'' searches the identifier definition also in the files included through $include or $batinclude. If nil, search the identifier definition only in the current file.

  • Fixed the bug in coloring.

  • Fixed the bug in `gams-show-identifier-defintion''.

1.8: Sat Dec 7, 2002

  • Added the new function `gams-open-included-file'' (binded C-cC-w). If you execute this command on the file name after $include or $batinclude, you can open the included file.

  • Added the new function `gams-goto-matched-paren'' (binded to F8). This command is the same as F8 in GAMSIDE and you can jump to the matched parenthesis. This command is vaild only if the cursor is on the parenthesis.

    The position of the cursor where this command is valid (e.g)

          (a + b + c + d * f * h)
          -                      -
          Here        and        here

    Note that with respect to the right parenthesis ), the cursor should be placed at the _next_ point after the ).

  • Fixed the bug in `gams-ol-view-next''. Until the previous, in Emacs 20 and XEmacs, the `gams-ol-view-next'' (binded to `N'' by default) sometimes doesn''t work properly in GAMS-OUTLINE buffer: a window doesn''t scroll if you type `N'' on the last line of the window. I fixed this bug for Emacs 20. But XEmacs still has this bug.

  • Added the new function `gams-show-identifier-defintion'' (binded to F7 and C-c. by default).

    While you are reading or editing a GAMS program, you may often go back to the declaration part of an identifier so as to see its definition. In such a case, you could use, for example, `isearch-backward'' command or something. But if the identifier is used many times at the different parts of the program, it is difficult to find the declaration part of the identifier.

    This command enables you to see the declaration part of the identifier under the cursor. See "gams-sample.gms" file about how this command is used. The new face `gams-highline-face'' is also added.

  • Added the new function `gams-outline-external'' (binded to O in GAMS-LST mode).

    When a LST file is very large, it often takes much time to start GAMS-OUTLINE mode. In stead of the lisp code, this command uses the external program to create GAMS-OUTLINE buffer.

    When a LST file is large, this command _may_ take much less time than `gams-outline''. Generally speaking,

    Small LST files => `gams-outline'' is a little faster. Large LST files => `gams-outline-external'' is faster.

    But it depends on the type of LST files. `gams-outline'' may be faster than `gams-outline-external'' even for large LST files. If you are satisfied with the speed of GAMS-OUTLINE mode, you need not use this command. Just use `gams-outline''.

    As the external program, you can use the C program (gamsolc.exe) or the Perl script ( The C program works faster than the Perl script, but the C program is offered only for MS windows (I cannot compile the program with gcc on Unix). The Perl script works both on MS windows and Unix systems as long as Perl5 is installed in that system. If you are MS windows user, use gamsolc.exe. If you are Unix user, use

    To use this command, you need to set the proper values to the variable `gams-ol-external-program''. If you use the Perl script, `gams-perl-command'' also must be assign the value (the default values of two variables above are set to nil). See the help discription of these variables. Moreover, gamsolc.exe or must be placed at the proper place.

  • Fixed the various bugs of codes for XEmacs (thanks to H. Kremers). Now, the full coloring works also on XEmacs. But generally speaking this program is likely to work better on GNU Emacs.

  • Fixed various minor bugs.

1.7.1: Thu Oct 31, 2002

  • Fixed several bugs.

  • In version 1.7, GAMS-OUTLINE mode doesn''t work well. I fixed this.

1.7: Wed Oct 23, 2002

  • Binded `gams*start-processor'' to C-cC-s and F9. Now, you can run gams by typing these keys.

  • Added the new function `gams-from-gms-to-outline'' (binded to C-cC-i and F10 by default). With this command, you can jump directly to the OUTLINE buffer from gms file buffer.

  • Added the new function `gams-from-outline-to-gms'' (binded to `;'' by default). With this command, you can jump directly to the gms file buffer from the OUTLINE buffer.

  • Fixed the bugs in automatic indent.

  • Added the new variable `gams-always-popup-process-buffer'' (its default value is t) and the new function `gams-popup-process-buffer'' (binded to C-cC-l by default). If `gams-always-popup-process-buffer'' is assigned nil, the process buffer does not popup. `gams-popup-process-buffer'' makes the process buffer popup.

  • Changed the default value of `gams-template-cont-color'' to nil. Non-nil makes the program very slow. If you want to make the template content buffer colored, set it by yourself.

  • If you are an Emacs21 user, set `gams-display-small-logo'' to t. Something may happen on the modeline :-)

  • Supported XEmacs. But it is incomplete in the following aspects.

    (1) I do not support the level 2 coloring (e.g., no color on explanatory text etc.). So, even if you select the level 2 coloring with `gams-choose-font-lock-level'', the coloring level is 1.

    (2) Many commands may not work on XEmacs. As far as I know, `gams-comment-dwim'', `gams-comment-dwim-inline'' do not work.

    I tested the program only with XEmacs 21.4 on MS windows.

  • Fixed the bug in GAMS-TEMPLATE mode.

1.6: Sat Sep 7, 2002

  • Modified `gams-comment-dwim'' and `gams-comment-dwim-inline'' (M-; and C-; respectively). Now, you can select the position of end-of-line and inline comment when you insert them.

  • Until the previous version, coloring doesn''t work when you edit already written set elements in a slash pair. I modified the program so that coloring works in such a situation.

  • Changed key-bindings.

    Emacs Lisp Manual says

    "The key sequences bound in a major mode keymap should usually start with `C-c'', followed by a control character, a digit, or `{'', `}'', `<'', `>'', `:'' or `;''. The other punctuation characters are reserved for minor modes, and ordinary letters are reserved for users."

    The previous key-bindings in GAMS mode are against this rule. So, I have changed the default key-bindings. In the new key-bindings, I attached C- (control key) to the old ones.

    For example,

          Old binding       New binding
           C-ck     =>   C-cC-k
           C-cd     =>   C-cC-d
           C-ce     =>   C-cC-e 

    If you don''t like these key-bindings, please change them by yourself. Key-bindings in other modes remain the same. Please see the help in each mode or see the refcard "refcard-gams.pdf".

  • Added the new variable `gams-indent-number-equation''.

  • Fixed the bug in "dot-emacs-sample". Until the previous version, (require ''gams) is located at the beginning of "dot-emacs-sample". But some of settings are not valid if they are located after (require ''gams). So, if you use (require ''gams) in ".emacs.el", you must put it at the end of all GAMS settings. But I recommend `autoload'' rather than `require''. See the new "dot-emacs-sample".

  • Fixed the bug in `gams-ol-mark''.

  • Changed the default value of `gams-docs-view-program'' to "c:/Program Files/Adobe/Acrobat 5.0/Reader/AcroRd32.exe".

  • Changed the default coloring.

  • Fixed various minor bugs.

1.5: Fri Aug 23, 2002.

  • Modified `gams-font-lock-keywords-1'' and `gams-font-lock-keywords-2''.

  • Until the version 1.4, the automatic indent has many bugs and does not work well in various situations. It is mainly because my rule and program for indent are ad-hoc. In this version, I have modifed the large part of codes for automatic indent. New codes may include (new) bugs, but they will generally work better than old ones.

  • Added the refcard.

1.4: Mon Aug 5, 2002.

  • Added the new function `gams-insert-on-off-text'' which is binded to C-cc by default. This command inserts an ontext-offtext pair. If you attach universal-argument, this encloses the specified region with an ontext-offtext pair.

  • Added the new face `gams-title-face''.

  • Fixed the bugs in `gams-comment-dwim'' and `gams-comment-dwim-inline''.

  • Fixed bugs in automatic indent and coloring. Thanks to Marko Loparik.

  • Added the new variable `gams-indent-equation-on'' Non-nil means indent equation blocks. If nil, already written equations are not affected by TAB. Its default value is t.

  • The values of `gams-inlinecom-symbol-start-default'', `gams-inlinecom-symbol-end-default'', and `gams-eolcom-symbol-default'' are used as default inline and end-of-line comment symbols The default values of these variables are "{", "}", "!" respectively.

  • If $inlinecom or $eolcom do not exists in the file, `gams-comment-dwim'' and `gams-comment-dwim-inline'' insert their default values determined by the variables `gams-inlinecom-symbol-start-default'', `gams-inlinecom-symbol-end-default'', and `gams-eolcom-symbol-default''. If you attach the universal argument when executing `gams-comment-dwim'' and `gams-comment-dwim-inline'', you are asked which symbol to be inserted.

  • Added the new function `gams-ol-item'' binded to T in GAMS-OUTLINE mode. You can select viewable item combination from registered list. You can register a new item combination in GAMS-ITEM-SELECT mode (`gams-ol-select-item'').

  • Added the new function `gams-ol-select-quit'' and `gams-ol-select-select'' in GAMS-ITEM-SELECT mode.

  • Fixed the bug in automatic indent.

1.3.1: Sun Apr 14, 2002.

  • Fixed the bug in GAMS-OUTLINE mode. Now, the values of REPORT SUMMARY field are displayed correctly.

  • Modified `gams-calculate-indent-decl''. Indent rule for declaration type block is modified.

  • Fixed the bug in colorization for inline and eol comments.

  • Fixed the bug in colorization for explanatory text.

1.3: Mon Apr 1, 2002.

  • Supported automatic indent. You can indent GAMS program according to GAMS syntax.

    As in most major modes in Emacs, the indent-line function (`gams-indent-line'') is binded to TAB key. By typing TAB key, you can indent the current line. To indent whole lines in a region, use M-C-\\ (`indent-region''). When you type RET and make a new line, indent is automatically inserted (`gams-newline-and-indent'').

    If you want to use TAB key to insert TAB itself and bind `gams-indent-line'' to another key, put the following setting in your "~/.emacs.el".

    (add-hook ''gams-mode-hook
          ''(lambda ()
             (let ((map gams-mode-map))
               (define-key map [f2] ''gams-indent-line)
               (define-key map "\\t" ''gams-insert-tab))))

    In this example, `gams-indent-line'' is binded to F2 key and the command for inserting TAB (`gams-insert-tab'') is binded to TAB key.

    Automatic indent is off in the following cases: (i) In table blocks. Since in table blocks format matters, I make indent off there. (ii) In a ontext-offtext pair. (iii) For already written equations in normal part (not in equations block).

    Four new customizable variables for indent are added. `gams-indent-on'', `gams-indent-number'', `gams-indent-number-loop'' and `gams-indent-number-mpsge''. If you want to make automatic indent off, set `gams-indent-on'' to nil. Its default value is of course t :-)

    Although I have tested indent in several GMS files, it is likely not to work in various cases. If you encounter odd behaviors of automatic indent, please let me know it and send me an example program in which indent does not work well.

    To make automatic indent in GAMS mode work well, please end a reserved word block (e.g. parameter, table, set blocks etc.) with a semicolon (;) although it may not be necessarily required in GAMS syntax.

    I am a beginner of GAMS and don''t know proper programming style in GAMS. So indent rule is determined mainly by my tastes. If you have suggestions or requests for indent rule, please let me know it!

  • Added the new customizable variable `gams-insert-dollar-control-on''. Until the previous version, $ key is binded to executing `gams-insert-dollar-control''. But now $ key is binded to inserting $ itself by default. If you want to use $ key to execute `gams-insert-dollar-control'', set this variable to non-nil.

  • Supported the rich coloring like GAMSIDE. Newly introduced customizable faces are `gams-string-face'', `gams-slash-face'', `gams-operator-face'', `gams-explanation-face'', `gams-oth-cont-face''. If you encounter odd behaviors of coloring, please let me know them with an example GAMS program in which coloring does not work well. I''ll fix them. For Emacs 21 users, please read BUGS file.

  • Speed up coloring in GAMS mode! Now, coloring (font-lock) requires much less time in GAMS mode. In the previous version of gams.el, coloring requires extra time because of my silly mistake in the program :-)

  • Added the new function `gams-choose-font-lock-level''. This command changes the font-lock (coloring) level in GAMS, GAMS-LST, GAMS-OUTLINE modes. By default, it is binded to C-cf in all three modes. GAMS program files or LST files are often very large and font-lock requires much time to color such big files. So before you open a big file, you had better change the font-lock level by this command. The number of levels is three: 0, 1, and 2: 0 means no color (font-lock-mode is off), 1 means minimum color, and 2 means maximum color. If you want to open a big file, you had better set the font-lock level to 0. The default font-lock level in each mode is determined by the value of customizable variables `gams-font-lock-level'', `gams-lst-font-lock-level'', and `gams-ol-font-lock-level''. All default values are 2 (maximum).

  • Supported `font-lock-fontify-block'' (binded to M-gM-g). With this command, you can re-color a part around the cursor (not an entire buffer).

  • Added the new variable `gams-mode-load-hook''. The content of this hook variable is run after "gams.el" is loaded.

  • Changed `gams-outline'' to make GAMS-OUTLINE mode faster.

  • Added the new variable `gams-system-directory''.

  • Added the new function `gams-modlib'' (binded to C-cz). With this command, you can extract a model from GAMS model library. To use this, you must set the GAMS system directory to the variable `gams-system-directory''.

  • Added the new function `gams-option'' which is evoked through `gams-start-menu'' (C-ct). By selecting "Change option" in the process start menu, you can change and register several combinations of options. Registered option combinations are stored in the file `gams-statement-file''.

  • Fixed the typo in "dot-emacs-sample". Thanks to Steven Dirkse.

  • Modified GAMS-OUTLINE mode so that the values of items in REPORT SUMMARY (NONOPT, INFEASIBLE, etc.) are displayed.

  • Modified GAMS-OUTLINE mode coloring for SOLVER STATUS and REPORT SUMMARY. I assume that 1, 2, and 8 of the value of MODEL STATUS mean no error (I am not sure whether this is appropriate or not). If SOLVER STATUS and REPORT SUMMARY parts indicate some errors, they are colored.

  • Fixed the bug in coloring for copied program listing in GAMS-LST mode.

  • Thanks to Marko Loparik for his bug reports and suggestions.

  • Fixed the bugs in coloring of GAMS-LST mode and added new coloring.

  • Modified `gams-insert-single-quotation''. Until the previous version, this command inserts "`''" if `gams-close-single-quotation-always'' is non-nil. The new one inserts "''''". The default value of `gams-close-single-quotation-always'' has changed to nil.

  • Added new functions `gams-comment-dwim'' and `gams-comment-dwim-inline'' (binded to M-; and C-; respectively). With these commands, you can easily insert end-of-line or inline comments. The end-of-line and inline comment symbols are determined by $eolcom and $inlinecom dollar control options in the file. If comment symbols have already been specified in the file, they are used for these two commands. Otherwise, you will be asked which comment symbols to use and $eolcon or $inlinecom will be inserted at the first line in the file automatically. In MPSGE block, "!" is always used as the end-of-line comment symbol. The default comment symbols are determined by the variables `gams-inlinecom-symbol-start-default'', `gams-inlinecom-symbol-end-default'', and `gams-eolcom-symbol-default''. The default values of these variables are "{", "}", "!" respectively. There is one more new variable `gams-comment-column''.

  • Added the new variable `gams-template-cont-color''. If this variable is assigned non-nil, the *Template Content* buffer is colorized. The default value is t. If you set nil to this variable, TEMPLATE mode works faster.

1.2: Tue Feb 5, 2002.

  • Added new functions `gams-ol-widen-one-line'' and `gams-ol-narrow-one-line'' (binded to `o'' and `l'' respectively). This command changes the widow height in GAMS-OUTLINE mode.

  • Added a new function `gams-comment-on-off-text'' (binded to `C-cC''). When this command is executed on a $ontext or $offtext, both $ontext and $offtext are commented out (or uncommented out if they are already commented out).

  • Added a new function `gams-remove-on-off-text'' (binded to `C-cG''). When this command is executed on a $ontext or $offtext, both $ontext and $offtext are removed.

  • Changed the default value of `gams-recenter-font-lock'' to nil because it takes much time to recenter a relatively large buffer.

  • Supported comment prefix other than *. If you use $comment control to set your own comment prefix, it is automatically used in GAMS mode. But a comment prefix other than * may not be recommended (?)

  • Fixed the bug of font-lock in GAMS. Until the previous version, the ontext-offtext region which includes dollar mark is not colored in Emacs 20. Now, such a region can be colored both in Emacs 20 and 21.

  • Fixed the typo in dot-emacs-sample file. Thanks to C. Starkweather.

  • Several minor changes.

1.1: Sun Jan 20, 2002.

  • The name of GAMS-OVERVIEW mode is changed to GAMS-OUTLINE mode. overview or ov in the names of functions and variables are changed to outline or ol respectively.

      For example,
    • `gams-overview'' => `gams-outline''.

    • `gams-ov-height'' => `gams-ol-height''.

    Especially, take care of the customizable variables such as `gams-ol-height'', `gams-ol-height-two'', `gams-ol-view-item''.
  • Supported `customize''. You can change the values of customizable variables in GAMS mode by customize command. Try to type M-x customize-apropos-groups [RET], gams [RET].

  • Added the original faces for GAMS mode. If you want to change default faces, use `custom-set-faces'' (see "dot-emacs-sample" file) or M-x customize-face.

  • Added the new function `gams-view-docs'' (binded to `C-cm'' by default) which enables you to view GAMS pdf manuals from Emacs. Set proper values to the customizable variables `gams-docs-dir'' and `gams-docs-view-program''.

  • Added the new function `gams-jump-on-off-text'' (binded to `C-cg'' by default). If you execute this command on $ontext ($offtext), then you jump to the corresponding $offtext ($ontext).

  • The author''s email address is changed.

1.08: Mon Dec 3, 2001

  • Sorry, but I changed the name of the program from "gams-mode.el" to "gams.el" again. It is because the name "gams-mode.el" is already used in the lisp written by Winston C. Yang.

  • Added the GAMS-OVERVIEW mode. Newly added custumizable variables are `gams-ov-height'', `gams-ov-height-two'', and `gams-ov-view-item''.

  • Changed a lot of default keybindings in the GAMS-LST mode so that similar keybindings are applied to both the LST and OVERVIEW mode. See the help in both modes for keybindings.

  • Added the variable `gams-recenter-font-lock''. Non-nil means font-lock again with recentering. If your computer is slow, you had better set this to nil.

  • Changed the default values of `gams-statement-upcase'' and `gams-dollar-control-upcase'' to nil.

  • Changed the regular expression for `gams-font-lock-keywords''.

  • Fixed various minor bugs.

  • Modified the "dot-emacs-sample" file. Thanks to Steven Dirkse.

1.07.1: Wed Oct 24, 2001.

  • The name of the program is changed from "gams.el" to "gams-mode.el".

  • Fixed the bug of `gams-fill-paragraph'', `gams-view-lst'' and `gams-jump-to-lst''. Thanks to Collin Starkweather.

1.07, Mon Sep 24, 2001.

  • Added Easy templates handling (GAMS-TEMPLATE). `gams-template'' is binded to `C-ce'' by default.

  • Multi processes. Until ver 1.06, you can run only one process of GAMS in an Emacs. But from this version, you can run multiple GAMS processes simultaneously if you set a variable `gams-multi-process'' to non-nil.

  • Added `gams-indent-line-function''.

  • Several minor changes.