This file is indexed.

/usr/share/emacs/site-lisp/ferret.el is in ferret-vis 6.9.3-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
;;; ferret.el --- Ferret mode for GNU Emacs

;; Copyright (c) 1999 by Mark A. Verschell <verschell@neptune.gsfc.nasa.gov>

;; Author: Mark A. Verschell <verschell@neptune.gsfc.nasa.gov>
;; Maintainer: Mark A. Verschell <verschell@neptune.gsfc.nasa.gov>
;; Version 0.03.0 (February 2, 2000)
;; Keywords: languages

;; Ferret.el is free software; you can redistribute it and/or modify it under
;; the terms of the GNU General Public License, version 2, published by the
;; Free Software Foundation.

;; You should have received a copy of the GNU General Public License along
;; with GNU Emacs; see the file COPYING.  If not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA,
;; or refer to the WWW document "http://www.gnu.org/copyleft/gpl.html";.

;; Ferret.el 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.

;; Information about "Ferret", a graphical analysis tool for gridded data, can
;; be found at "http://ferret.wrc.noaa.gov/Ferret/";

;; Documentation
;; -------------
;; IMPORTANT NOTE: This only works with X-windows emacs, and only for
;; semi-recent versions of emacs (18.xx and above)
;;
;; This is Ferret mode for GNU emacs, a major mode designed to facilitate the
;; writing of journal files for "Ferret", a graphical analysis tool for
;; gridded data.
;;
;; Ferret mode for emacs is limited at this time to font-lock coverage
;; This means that the following is supported:
;;   Commands, subcommands, and aliases with most abbreviations
;;   Command and subcommand qualifiers with most abbreviations
;;   Comments starting with ! anywhere on line are supported
;;   Subroutines (go calls) are supported
;;   Shell command called by spawn is supported
;;   Strings are supported between ""
;;   Functions, operators, and transformations are supported
;;   Font-lock mode is case-insensitive
;;
;; Version updates
;;   0.02.2 - Corrected small error to make vector a recognized command
;;   0.02.3 - Allowed function and shell commands with embedded "_"
;;            Added noaxis to list of qualifiers
;;            Allowed abbreviation can for cancel
;;   0.03.0 - Added PPLUS commands
;;            Added PPLUS qualifiers
;;            Added symbol name highlighting
;;            Added version update history
;;            Allowed function and shell commands with embedded "."
;;            Fixed problem with 0.02.03 that broke comments
;;            Files highlighted for USE and SET DATA (except with qualifiers)
;;            Removed ca as abbreviation for cancel
;;
;; I will take (friendly-worded) suggestions for improvements. Obviously, if I
;; get no comments, then I will only update this as I find it useful.

;; Usage
;; -----
;; - You need a local directory to store the ferret.el file, I call mine Emacs,
;;   so in the following block replace the /d9/verschell/Emacs with your local
;;   directory
;; - Place the ferret.el file in this directory
;; - Compile the ferret.el file
;;     Enter emacs while in the ferret.el directory
;;     ESC x byte-compile-file RETURN ferret.el RETURN
;; - This gives you ferret.elc
;; - Make the following modifications to your .emacs file
;;
;; <<<CUT HERE AND REMOVE BEGINNING ;; ON EACH LINE>>>
;; ;;; Add local function directory to emacs search path
;; (setq load-path (cons "/d9/verschell/Emacs" load-path))
;;
;; ;;; Add automatic ferret-mode for .jnl suffix
;; (setq auto-mode-alist (cons '("\.jnl$" . ferret-mode) auto-mode-alist))
;;
;; ;;; Load Ferret major-mode (modified text mode)
;; (load "ferret")
;;
;; ;;; Font lock mode
;; (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)))
;; <<<CUT HERE>>>
;;
;; - exit emacs
;; - the next time you edit a ferret file, you should get lots of pretty colors

;; Bugs to verschell@neptune.gsfc.nasa.gov

;;; Code:

(defconst ferret-mode-version "version 0.03.0")

(defgroup ferret nil
  "Ferret mode for Emacs"
  :group 'languages)

;; font-lock-comment-face        - COMMENTS
;; font-lock-function-name-face  - FUNCTION NAMES, SHELL COMMANDS
;; font-lock-keyword-face        - COMMANDS, SUBCOMMANDS, OPERATORS, FUNCTIONS,
;;                                 TRANSFORMATIONS
;; font-lock-reference-face
;; font-lock-string-face         - STRINGS
;; font-lock-type-face           - QUALIFIERS
;; font-lock-variable-name-face

(let ((comment-chars "!")
      (ferret-keywords
;      ("alias" "animate" "axis" "cancel" "commands" "contour" "data_set"
;       "dataset" "define" "elif" "else" "endif" "exit" "expression" "file"
;       "fill" "frame" "function" "grid" "help" "if" "label" "let" "list"
;       "load" "memory" "message" "mode" "movie" "palette" "plot" "pplus"
;       "queries" "query" "quit" "region" "repeat" "save" "say" "set" "shade"
;       "show" "statistics" "symbol" "then" "transform" "unalias" "use" "user"
;       "variable" "vector" "viewport" "window" "wire"))
       (concat "a\\(lias?\\|nima?t?e?\\|xis\\)\\|"
          "c\\(anc?e?l?\\|o\\(mma?n?d?s?\\|nto?u?r?\\)\\)\\|"
          "d\\(ata[_]*?s?e?t?\\|efi?n?e?\\)\\|"
          "e\\(l\\(if\\|se\\)\\|ndif?\\|x\\(it\\|pre?s?s?i?o?n?\\)\\)\\|"
          "f\\(i\\(le\\|ll\\)\\|rame?\\|unct?i?o?n?\\)\\|"
          "grid\\|help\\|if\\|"
          "l\\(abe?l?\\|et\\|ist\\|oad\\)\\|"
          "m\\(e\\(mo?r?y?\\|ssa?g?e?\\)\\|o\\(de\\|vi?e?\\)\\)\\|"
          "p\\(ale?t?t?e?\\|lot\\|plu?s?\\)\\|"
          "qu\\(e\\(ri?e?s?\\|ry?\\)\\|it\\)\\|"
          "re\\(gio?n?\\|pe?a?t?\\)\\|"
          "s\\(a\\(ve\\|y\\)\\|et\\|h\\(ade?\\|ow\\)\\|tati?s?t?i?c?s?"
          "\\|ymbo?l?\\)\\|"
          "t\\(hen\\|rans?f?o?r?m?\\)\\|"
          "u\\(nali?a?s?\\|ser?\\)\\|"
          "v\\(ari?a?b?l?e?\\|ect?o?r?\\|iewp?o?r?t?\\)\\|"
          "wi\\(ndo?w?\\|re\\)"))
      (ferret-qualifiers
;       "all" "append" "aspect" "bad" "brief" "clear" "clip" "clobber"
;       "columns" "command" "compress" "continue" "d" "data_set" "dataset"
;       "default" "depth" "di" "diag" "dj" "dk" "dl" "dt" "dx" "dy" "dynamic"
;       "dz" "external" "ez" "file" "fill" "format" "frame" "free" "from_data"
;       "fromdata" "full" "grid" "heading" "help" "i" "ignore" "ilimits" "j"
;       "jlimits" "k" "key" "klimits" "l" "laser" "last" "length" "levels"
;       "like" "line" "llimits" "location" "modulo" "name" "new" "noaxes"
;       "noaxis" "noerror" "nohead" "nokey" "nolabel" "npoints" "nouser" "opt1"
;       "opt2" "order" "origin" "overlay" "palette" "pen" "permanent"
;       "precision" "quiet" "reset" "restore" "rigid" "save" "set_up" "single"
;       "size" "skip" "start" "symbol" "t" "t0" "temporary" "text" "title"
;       "tlimits" "tranpose" "units" "user" "variable" "viewpoint" "vs" "x"
;       "xlimits" "xskip" "y" "ylimits" "yskip" "z" "zlimits" "zscale"
       (concat "a\\(ll\\|ppe?n?d?\\|spe?c?t?\\)\\|"
          "b\\(ad\\|rief?\\)\\|"
          "c\\(l\\(ear?\\|ip\\|obb?e?r?\\)\\|o\\(lu?m?n?s?\\|m\\(ma?n?d?"
          "\\|mpr?e?s?s?\\)\\|nti?n?u?e?\\)\\)\\|"
          "d\\(\\|ata[_]*s?e?t?\\|e\\(fa?u?l?t?\\|pt?h?\\)\\|i\\(\\|ag\\)"
          "\\|j\\|k\\|l\\|t\\|x\\|y\\(\\|na?m?i?c?\\)\\|z\\)\\|"
          "e\\(xte?r?n?a?l?\\|z\\)\\|"
          "f\\(il[el]\\|orm?a?t?\\|r\\(ame?\\|ee\\|om[_]*d?a?t?a?\\)"
          "\\|ull\\)\\|"
          "grid\\|"
          "he\\(adi?n?g?\\|lp\\)\\|"
          "i\\(\\|gno?r?e?\\|li?m?i?t?s?\\)\\|"
          "j\\(\\|li?m?i?t?s?\\)\\|"
          "k\\(\\|ey\\|li?m?i?t?s?\\)\\|"
          "l\\(\\|as\\(er?\\|t\\)\\|e\\(ngt?h?\\|ve?l?s?\\)\\|i\\(ke\\|ne"
          "\\)\\|li?m?i?t?s?\\|oca?t?i?o?n?\\)\\|"
          "modu?l?o?\\|"
          "n\\(ame\\|ew\\|o\\(ax\\(e?\\i?\\)s?\\|err?o?r?\\|hea?d?\\|key?"
          "\\|lab?e?l?\\|use?r?\\)\\|poin?t?s?\\)\\|"
          "o\\(p\\(t1\\|t2\\)\\|r\\(der?\\|igi?n?\\)\\|verl?a?y?\\)\\|"
          "p\\(ale?t?t?e?\\|e\\(n\\|rma?n?e?n?t?\\)\\|reci?s?i?o?n?\\)\\|"
          "quiet?\\|"
          "r\\(e\\(s\\(et?\\|to?r?e?\\)\\)\\|igi?d?\\)\\|"
          "s\\(ave?\\|et_?u?p?\\|i\\(ngl?e?\\|ze\\)\\|kip\\|tart?"
          "\\|ymb?o?l?\\)\\|"
          "t\\(\\|0\\|e\\(mpo?r?a?r?y?\\|xt\\)\\|itl?e?\\|li?m?i?t?s?"
          "\\|ranp?o?s?e?\\)\\|"
          "u\\(nits?\\|ser?\\)\\|"
          "v\\(ari?a?b?l?e?\\|iewp?o?i?n?t?\\|s\\)\\|"
          "x\\(\\|li?m?i?t?s?\\|ski?p?\\)\\|"
          "y\\(\\|li?m?i?t?s?\\|ski?p?\\)\\|"
          "z\\(\\|li?m?i?t?s?\\|sca?l?e?\\)"))
      (ferret-operators
;       "and" "eq" "ge" "gt" "le" "lt" "ne" "or"
       (concat "and\\|eq\\|g[et]\\|l[et]\\|ne\\|or"))
      (ferret-functions
;       "abs" "acos" "asin" "atan" "atan2" "cos" "days1900" "exp" "ignore0"
;       "int" "ln" "log" "max" "min" "missing" "mod" "randn" "randu" "reshape"
;       "rho_un" "sin" "tan" "theta_fo" "times2" "unravel" "zaxreplace"
       (concat "a\\(bs\\|cos\\|sin\\|tan2?\\)\\|cos\\|days1900\\|exp\\|"
          "i\\(gnore0\\|nt\\)\\|l\\(n\\|og\\)\\|m\\(ax\\|i\\(n\\|ssing\\)"
          "\\|od\\)\\|r\\(and[nu]\\|eshape\\|ho_un\\)\\|sin\\|t\\(an\\|"
          "heta_fo\\|imes2\\)\\|unravel\\|zaxreplace"))
      (ferret-transformations
;       "asn" "ave" "ave" "cda" "cdb" "cia" "cib" "ddb" "ddc" "ddf" "din"
;       "fav" "fln" "fnr" "iin" "itp" "lin" "loc" "max" "max" "min" "min"
;       "mod" "modmax" "modmin" "modngd" "modsum" "modvar" "nbd" "ngd" "ngd"
;       "rsum" "sbn" "sbx" "shf" "shn" "spz" "sum" "sum" "swl" "var" "var"
;       "weq" "xact"
       (concat "a\\(sn\\|ve\\)\\|c\\(d[ab]\\|i[ab]\\)\\|d\\(d[bcf]\\|in\\)\\|"
          "f\\(av\\|l[nr]\\)i\\(in\\|tp\\)\\|l\\(in\\|oc\\)\\|m\\(ax\\|in"
          "\\|od\\(\\|m\\(ax\\|in\\)\\|ngd\\|sum\\|var\\)\\)\\|n[bg]d"
          "\\|rsum\\|s\\(b[nx]\\|h[fn]\\|pz\\|um\\|wl\\)\\|var\\|weq"
          "\\|xact"))
      (pplus-keywords
;      ("aline" "axatic" "axlabp" "axlen" "axlint" "axlsze" "axnmtc" "axnsig"
;      "axset" "axtype" "box" "clsplt" "color" "conpre" "conpst" "conset"
;      "contour" "cross" "datpt" "dfltfnt" "fill" "hlabs" "labs" "labset" "lev"
;      "line" "list" "llabs" "markh" "origin" "pen" "plot" "plotuv" "plotv"
;      "pltnme" "rlabs" "shade" "shakey" "shaset" "taxis" "tics" "time" "title"
;      "txlabp" "txlint" "txlsze" "txnmtc" "txtype" "veckey" "vecset" "vector"
;      "velvct" "view" "vpoint" "xaxis" "xfor" "xlab" "yaxis" "yfor" "ylab"))
       (concat "a\\(line\\|x\\(atic\\|l\\(abp\\|en\\|int\\|sze\\)\\|n\\(mtc\\|"
          "sig\\)\\|set\\|type\\)\\)\\|"
          "box\\|"
          "c\\(lsplt\\|o\\(lor\\|n\\(p\\(re\\|st\\)\\|set\\)\\)\\|"
          "ross\\)\\|"
          "d\\(atpt\\|fltfnt\\)\\|"
          "hlabs\\|"
          "l\\(abs\\(\\|et\\)\\|ev\\|ine\\|labs\\)\\|"
          "markh\\|"
          "origin\\|"
          "p\\(en\\|l\\(ot\\(\\|uv\\|v\\)\\|tnme\\)\\)\\|"
          "rlabs\\|"
          "sha\\(key\\|set\\)\\|"
          "t\\(axis\\|i\\(cs\\|me\\|tle\\)\\|x\\(l\\(abp\\|int\\|sze\\)"
          "\\|nmtc\\|type\\)\\)\\|"
          "v\\(e\\(c\\(key\\|set\\)\\|lvct\\)\\|iew\\|point\\)\\|"
          "x\\(axis\\|for\\|lab\\)\\|"
          "y\\(axis\\|for\\|lab\\)"))
      (pplus-qualifiers
;       "nooverlay" "nowait" "noyaxis" "wait" "yaxis"
       (concat "no\\(overlay\\|wait\\|yaxis\\)\\|wait\\|yaxis"))
      )

  (setq ferret-font-lock-keywords
   (list
    '("\"[^'\n]*'?" . font-lock-comment-face)
    (cons (concat "$[A-Za-z0-9$]*") 'font-lock-variable-name-face)
    (list (concat
      "\\<\\(data[_]*?s?e?t?\\|go\\|spawn?\\|use\\)\\>[ \t]*\\(\\sw+\\)?")
       '(1 font-lock-keyword-face)
       '(2 font-lock-function-name-face nil t))
   (cons (concat "\\/\\(" ferret-qualifiers "\\)\\>") 'font-lock-type-face)
   (cons (concat "\\/\\(" pplus-qualifiers "\\)\\>") 'font-lock-type-face)
   (concat "\\<\\(" ferret-keywords "\\)\\>")
   (concat "\\<\\(" pplus-keywords "\\)\\>")
   (concat "\\<\\(" ferret-operators "\\)\\>")
   (concat "\\<\\(" ferret-functions "\\)\\>")
   (concat "\\@\\(" ferret-transformations "\\)\\>")
   ))
  "Default expressions to highlight in Ferret mode.")

;; -------------------------------------------------------------------------------
;;;###autoload
(require 'derived)

(define-derived-mode ferret-mode text-mode "Ferret"
  "Major mode for editing ferret .jnl files.
Special commands:
\\{ferret-mode-map}"
  (set (make-local-variable 'comment-start) "! ")
  (set-syntax-table (copy-syntax-table))
  (modify-syntax-entry ?! "<")
  (modify-syntax-entry ?\n ">")
  (modify-syntax-entry ?_ "w")
  (modify-syntax-entry ?. "w")
  (set (make-local-variable 'font-lock-defaults)
       '(ferret-font-lock-keywords nil t)))

(provide 'ferret)

;;; ferret.el ends here