X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/961b79aba3fe032584d43c5a83d8ad5951e721a6..9b6931c8eb467c55783d444b2f96b9ecf9e68b17:/packages/jgraph-mode/jgraph-mode.el diff --git a/packages/jgraph-mode/jgraph-mode.el b/packages/jgraph-mode/jgraph-mode.el index 8f211aa82..a56449e76 100644 --- a/packages/jgraph-mode/jgraph-mode.el +++ b/packages/jgraph-mode/jgraph-mode.el @@ -1,9 +1,10 @@ -;;; jgraph-mode.el --- Major mode for Jgraph files +;;; jgraph-mode.el --- Major mode for Jgraph files -*- lexical-binding:t -*- -;; Copyright (C) 2006, 2011-2012 Free Software Foundation, Inc +;; Copyright (C) 2006, 2011-2012, 2014 Free Software Foundation, Inc ;; Author: Stefan Monnier ;; Version: 1.0 +;; Package-Requires: ((cl-lib "0.5")) ;; Keywords: tex, wp ;; This file is part of GNU Emacs. @@ -28,6 +29,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defgroup jgraph-mode () "Major mode for Jgraph files." :group 'tools) @@ -81,8 +84,8 @@ (setq section (intern section)) (while (re-search-forward "^\\.TP\n\\(?:\\.B \\|\\\\fB\\)\\([^ :\t\n\\]+\\)\\([ {\\fI]*token\\)?" end 'move) (let ((cmd (match-string-no-properties 1))) - (if (match-end 2) (add-to-list 'tok-cmds cmd)) - (add-to-list 'commands cmd))) + (if (match-end 2) (cl-pushnew cmd tok-cmds :test #'equal)) + (cl-pushnew cmd commands :test #'equal))) (setq commands (nreverse commands)) (let ((sec (assoc section sections))) (if sec (nconc sec commands)