* ido.el: Many doc fixes.
(ido-complete): Fix message.
-2003-01-25 Taro Kawagishi <tarok@transpulse.org>
+2003-01-25 Taro Kawagishi <tarok@transpulse.org>
* arc-mode.el (archive-unixdate): Corrected the date field string.
(archive-lzh-summarize): Extended it to allow the LZH level 2 header
* iso8859-1.el: Call set-case-..., not standard-case-...
-1993-05-23 Paul Eggert (eggert@twinsun.com)
+1993-05-23 Paul Eggert (eggert@twinsun.com)
* calendar.el (calendar-daylight-savings-starts,
calendar-daylight-savings-ends): Default to nil if the locale
* vc.el (vc-version-diff): Match parens.
-1993-05-14 Paul Eggert (eggert@twinsun.com)
+1993-05-14 Paul Eggert (eggert@twinsun.com)
* vc.el (vc-revert-buffer1): Don't assume that compilation-error-list
is a list; it might be t.
(emerge-diff-ok-lines-regexp): Renamed from emerge-diff-ok-lines.
(emerge-diff3-ok-lines-regexp): Renamed from emerge-diff3-ok-lines.
-1993-05-13 Paul Eggert (eggert@twinsun.com)
+1993-05-13 Paul Eggert (eggert@twinsun.com)
* vc.el (vc-version-diff): Don't move point in current buffer.
(terminal-mode): Don't make meta-flag local.
(te-stty-string): Quote the args that have ^. Add pass8.
-1993-05-08 Paul Eggert (eggert@twinsun.com)
+1993-05-08 Paul Eggert (eggert@twinsun.com)
* vc.el (vc-diff): Report an error if the buffer isn't registered.
(vc-registration-error): New function.
* menu-bar.el: Don't add menu bar to minibuffer-only frames.
-1993-05-07 Paul Eggert (eggert@twinsun.com)
+1993-05-07 Paul Eggert (eggert@twinsun.com)
* vc.el (vc-directory-18): New function.
If Emacs 18, make vc-directory alias to this.
ring is now a separate buffer from *VC-log*; editing of old comments
is no longer destructive.
-1993-03-16 Paul Eggert (eggert@twinsun.com)
+1993-03-16 Paul Eggert (eggert@twinsun.com)
* vc.el (vc-version-diff): Use (message ...), not (message (format
...)). (vc-backend-checkout, vc-backend-assign-name): Correct
(isearch-unread): Don't call it here.
(isearch-mode-map): Bind the ASCII-equivalent function keys.
-1993-03-07 Paul Eggert (eggert@twinsun.com)
+1993-03-07 Paul Eggert (eggert@twinsun.com)
* vc.el (vc-update-change-log): Check that ChangeLog is writable
before starting the expensive rcs2log process.
(ange-ftp-read-passwd, ange-ftp-process-filter): Uncomment out the
calls to ange-ftp-repaint-buffer.
-1992-11-11 Eric S. Raymond (eric@mole.gnu.ai.mit.edu)
+1992-11-11 Eric S. Raymond (eric@mole.gnu.ai.mit.edu)
* c-mode.el (c-style-alist): Add quotes around C++ style name.
* paths.el (Info-default-directory-list): Define instead of
Info-directory-list.
-1991-08-13 Ken Raeburn (raeburn@watch.com)
+1991-08-13 Ken Raeburn (raeburn@watch.com)
* time.el (display-time-24hr-format): New variable.
(display-time-filter): If display-time-24hr-format is non-nil,
* fill.el (justify-current-line): Handle extra indent after prefix.
-1991-03-14 Robert J. Chassell (bob@gnu.ai.mit.edu)
+1991-03-14 Robert J. Chassell (bob@gnu.ai.mit.edu)
* info.el (Info-forward-node): Go up several levels, if necessary.
Add two new arguments.
* help.el (help-for-help): Call delete-other-windows.
-1991-01-21 Mike Newton (newton@fig)
+1991-01-21 Mike Newton (newton@fig)
* bibtex.el: updated to conform better with bibtex 0.99c by:
bibtex-mode : updated comments to indicate new use of
* compile.el (compilation-last-error): Remove this variable.
(next-error): Don't set it.
-1990-12-12 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-12-12 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el (calendar-end-of-year): Delete extraneous statement
in let.
* fill.el (fill-region-as-paragraph): New feature: Adaptive Fill mode.
(adaptive-fill-mode, adaptive-fill-regexp): New user options.
-1990-11-30 Mike Newton (newton@gumby.cs.caltech.edu)
+1990-11-30 Mike Newton (newton@gumby.cs.caltech.edu)
* bibtex.el (start comments): added earlier comments of Bengt
Martensson. Some of the changes listed below are originally his
(byte-compile-normal-call): Don't alter byte-compile-depth.
(byte-compile-funcall): New function.
-1990-11-27 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-27 Ed Reingold (reingold@emr.cs.uiuc.edu)
* diary.el (diary-float): Allow month to be a list of months, a
single month, or t (for all months).
* appt.el: Fixed if construct for midnight update.
-1990-11-25 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-25 Ed Reingold (reingold@emr.cs.uiuc.edu)
* diary.el (insert-block-diary-entry): Change reference to
mark-ring to calendar-mark-ring.
* appt.el: Changed list-diary-entries-hook to diary-display-hook
to be compatible with new version of the calendar/diary packgage.
-1990-11-20 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-20 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el (calendar-version): New constant, with date
(calendar-count-days-region, calendar-not-available): New functions.
(calendar-mode-map): Put them on keys.
(calendar-mode): Describe them.
-1990-11-11 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-11 Ed Reingold (reingold@emr.cs.uiuc.edu)
* diary.el (make-diary-entry): New function.
(insert-diary-entry, insert-weekly-diary-entry,
(calendar-mode-map): Put them on keys.
(calendar-mode): Describe them.
-1990-11-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el (calendar-set-mark,
calendar-exchange-point-and-mark): New functions.
(calendar-mode-map): Put them on keys.
(calendar-mode): Describe them.
-1990-11-06 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-06 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el (sexp-diary-entry-symbol): New variable.
(cursor-to-iso-calendar-date): Simplified, slightly.
more appropriately.
-1990-10-23 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-10-23 Ed Reingold (reingold@emr.cs.uiuc.edu)
* diary.el (list-diary-entries): Added a separate hook to do the
display, so that the diary entries can be obtained without
calendar.el: Add default definition of diary-display-hook.
-1990-10-20 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-10-20 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el (describe-calendar-mode): Rewrote to give just a
brief description of the mode instead of calling describe-mode.
* appt.el: Using copy modified by rms.
-1990-10-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-10-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
* holiday.el (calendar-holiday-function-hebrew): Fixed minor
problem with the code to short-circuit the calculations to save
* history.el: Specify `(provide 'history)'.
-1990-11-20 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-20 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el:
Added constant calendar-version with date
(calendar-mode-map): Put them on keys.
(calendar-mode): Describe them.
-1990-11-11 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-11 Ed Reingold (reingold@emr.cs.uiuc.edu)
* diary.el:
(make-diary-entry): New function.
(calendar-mode-map): Put them on keys.
(calendar-mode): Describe them.
-1990-11-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el:
(calendar-set-mark), (calendar-exchange-point-and-mark): New functions.
(calendar-mode-map): Put them on keys.
(calendar-mode): Describe them.
-1990-11-06 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-11-06 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el: Added new variable sexp-diary-entry-symbol.
(cursor-to-iso-calendar-date): Simplified, slightly.
more appropriately.
-1990-10-23 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-10-23 Ed Reingold (reingold@emr.cs.uiuc.edu)
* diary.el
(list-diary-entries): Added a separate hook to do the display, so
calendar.el: Add default definition of diary-display-hook.
-1990-10-20 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-10-20 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el
(describe-calendar-mode): Rewrote to give just a brief description
of the mode instead of calling describe-mode.
-1990-10-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-10-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
* holiday.el:
(calendar-holiday-function-hebrew): Fixed minor problem with the
(mark-hebrew-calendar-date-pattern): Fixed minor problem with the
code to short-circuit the calculations to save time.
-1990-09-10 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-09-10 Ed Reingold (reingold@emr.cs.uiuc.edu)
* diary.el:
(list-diary-entries), (list-hebrew-diary-entries),
(list-islamic-diary-entries): Fixed to use add-to-diary-list.
-1990-09-07 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-09-07 Ed Reingold (reingold@emr.cs.uiuc.edu)
* holiday.el
(filter-visible-calendar-holidays): New function.
when there are no diary entries but lots of holidays.
(ordinary-list-diary-hook), (add-to-diary-list): New functions.
-
-1990-09-06 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-09-06 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el:
Changed reference at beginning of file from the report to the
* bytecomp.el (symbol-function, fset, read-char): Don't open code them.
1990-10-11 Richard Stallman (rms@mole.ai.mit.edu)
-
+
* simple.el: Kill commands on read-only buffers, just copy to
kill-ring.
(kill-region): If read-only, just copy to kill-ring.
lines with @-sign commands for @chapter, @section and the like,
but not @node lines.
-1990-06-27 Richard Stallman (rms@mole.ai.mit.edu)
+1990-06-27 Richard Stallman (rms@mole.ai.mit.edu)
* paragraphs.el (start-of-paragraph-text): Avoid infinite loop.
* dired.el (dired-diff): New command.
(dired-mode-map): Put on `='.
-1990-03-28 Jim Kingdon (kingdon@mole.ai.mit.edu)
+1990-03-28 Jim Kingdon (kingdon@mole.ai.mit.edu)
* rmail.el (rmail-insert-rmail-file-header, rmail-convert-file):
Put in "-*- rmail -*-".
* inf-lisp.el: inferior-lisp-program can be a list of the programme
name and its arguments.
-1990-02-06 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-02-06 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el:
(french-calendar-leap-year-p): Rewritten with corrected rule.
* texinfmt.el (batch-texinfo-format): Paren error on (setq error 1).
-1990-01-27 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-01-27 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el:
(scroll-calendar-left): Fixed so it works when the cursor is not
* rfc822.el (rfc822-addresses): Barf, don't loop, on > in host name.
-1990-01-16 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-01-16 Ed Reingold (reingold@emr.cs.uiuc.edu)
* diary.el:
(insert-diary-entry): New function.
(calendar-mode-map): Put them on keys.
(calendar-mode): Describe them.
-1990-01-11 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-01-11 Ed Reingold (reingold@emr.cs.uiuc.edu)
* diary.el
(list-diary-entries): Deleted several lines of extraneous code
* term/x-win.el (x-pop-up-window): Set global-minibuffer-screen.
-1990-01-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-01-08 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el (calendar-date-is-visible-p):
Fixed so it does not switch to the calendar buffer.
displayed in the calendar. This saves an enormous amount of time in
the fancy diary display for multiple days.
-1990-01-07 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1990-01-07 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el: Fixed the value of list-diary-entries-hook.
(regenerate-calendar-window): Changed (update-display) to (sit-for 0).
* view.el (View-scroll-lines-forward):
Exit@end only if view-scroll-forward-exits is non-nil.
-1989-12-29 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1989-12-29 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el (mark-diary-entries): Made "sticky" so effect continues
whenever the calendar is redisplayed.
(mark-calendar-holidays, calendar-unmark): Likewise.
-1989-12-26 Ed Reingold (reingold@emr.cs.uiuc.edu)
+1989-12-26 Ed Reingold (reingold@emr.cs.uiuc.edu)
* calendar.el: Fixed many minor bugs throughout the code. The major
changes are as follows.
* paths.el: Changed rmail-file-name from const to a var.
-1989-11-16 Ed Reingold (reingold@cs.uiuc.edu)
+1989-11-16 Ed Reingold (reingold@cs.uiuc.edu)
* tex-mode.el (slitex-mode):
New alternative to plain-tex-mode and latex-mode.
* replace.el (perform-replace): make ! undo as a unit.
-1989-04-17 Chris Smith (csmith@mozart)
+1989-04-17 Chris Smith (csmith@mozart)
* icon-mode.el (icon-comment-indent): When auto-fill breaks a
line in a bol comment, start the continued line in column 1
* loaddefs.el: Autoload ftp-list-directory.
-1989-04-06 Edward M. Reingold (reingold@cs.uiuc.edu)
+1989-04-06 Edward M. Reingold (reingold@cs.uiuc.edu)
Hook added to list-diary-entries, along with a possible
value for that hook which prepares a fancy diary buffer
* server.el (server-kill-emacs-query-function): Ignore killed buffers.
-1994-05-24 Kenneth Manheimer (ken.manheimer@nist.gov)
+1994-05-24 Kenneth Manheimer (ken.manheimer@nist.gov)
* allout.el (outline-chart-subtree): include outline-next-
heading in loop conditions to detect end-of-buffer (and avoid
* skeleton.el (mirror-mode): Commented out.
-1994-05-06 Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
+1994-05-06 Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
* asm-mode.el (asm-comment): Don't match newline.
* ange-ftp.el (ange-ftp-add-file-entry-alist): Fix typo in prev change.
-1994-04-22 Jamie Zawinski (jwz@lucid.com)
+1994-04-22 Jamie Zawinski (jwz@lucid.com)
* mail-extr.el: Major changes by jwz and drw.
* paths.el (manual-program): Deleted.
-1993-01-01 Martin Boyer <mboyer@ireq-robot.hydro.qc.ca>
+1993-01-01 Martin Boyer <mboyer@ireq-robot.hydro.qc.ca>
* bibtex.el (bibtex-field-name, bibtex-field-const, bibtex-field-text):
Adapted to Emacs 19 regex rules.
* rmailsum.el (rmail-summary-delete-forward): Move to next or prev msg
among those included in the summary.
-1993-12-29 Ken Manheimer (klm@nist.gov)
+1993-12-29 Ken Manheimer (klm@nist.gov)
* icomplete.el (icomplete-pre-command-hook): Reconciled with
keyboard macro operation.
* gnuspost.el (gnus-post-news): Call gnus-read-distributions-file.
-1993-12-06 Anders Holst (aho@sans.kth.se)
+1993-12-06 Anders Holst (aho@sans.kth.se)
* hippie-exp.el (;; Keywords:): Changed to "abbrev".
(hippie-expand-ignore-buffers): New variable.
* comint.el (comint-read-input-ring, comint-write-input-ring):
Treat "" like nil in comint-input-ring-file-name.
-1993-11-15 Robert J. Chassell (bob@grackle.stockbridge.ma.us)
+1993-11-15 Robert J. Chassell (bob@grackle.stockbridge.ma.us)
* page.el: Add `provide'.
(narrow-to-page): Enable page-delimiter to span lines.
1993-07-08 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
Make everything that deactivates the mark do it consistently.
-
+
* simple.el (deactivate-mark): New function.
(kill-ring-save, pop-mark, keyboard-quit): Call it.
* ispell.el (ispell):
* isearch.el (isearch-mode-map): Bind frame events to nil.
-1995-06-16 Andre Spiegel <spiegel@berlin.informatik.uni-stuttgart.de>
+1995-06-16 Andre Spiegel <spiegel@berlin.informatik.uni-stuttgart.de>
* vc-hooks.el (vc-fetch-properties): Don't use
vc-backend-dispatch, as that is in vc.el.
(comint-send-input, comint-output-filter): Use run-hook-with-args.
(comint-dynamic-complete): Use run-hook-with-args-until-success.
-1995-06-13 Michael Kifer <kifer@cs.sunysb.edu>
+1995-06-13 Michael Kifer <kifer@cs.sunysb.edu>
* viper.el (vip-change-state-to-vi): Bug fix.
* viper-util.el (vip-over-whitespace-line): New function.
* add-log.el (prompt-for-change-log-name): Handle the case where
a directory name is specified gracefully.
-1995-06-08 Andre Spiegel <spiegel@bruessel.informatik.uni-stuttgart.de>
+1995-06-08 Andre Spiegel <spiegel@bruessel.informatik.uni-stuttgart.de>
* vc.el (vc-backend-checkin): Handle RCS `ci'-output in the event
that a check-in only results in reverting to the previous version.
* files.el (file-precious-flag): Doc clarification.
-1995-06-08 Michael Kifer <kifer@cs.sunysb.edu>
+1995-06-08 Michael Kifer <kifer@cs.sunysb.edu>
* viper.el (vip-envelop-ESC-key): If an ESC-sequence translates
into a function key, pretend that this key was the last command event.
* compile.el (compilation-error-regexp-alist): In "Cray C" regexp,
don't allow newlines.
-1995-05-30 Michael Kifer <kifer@cs.sunysb.edu>
+1995-05-30 Michael Kifer <kifer@cs.sunysb.edu>
* ediff-wind.el (ediff-setup-control-frame):
Make Ediff delete the old control frame before creating a new one.
* easymenu.el (easy-menu-do-define): Add autoload cookie.
-1995-05-19 Kevin Rodgers <kevinr@ihs.com>
+1995-05-19 Kevin Rodgers <kevinr@ihs.com>
* mailalias.el (expand-mail-aliases): Expand aliases in
From and Reply-to headers as well, plus the Resent- variants.
(f90-no-block-limit): Now uses f90-p-type-re.
(f90-change-keywords): Don't change preprocessor lines.
-1995-04-20 Kevin Rodgers <kevinr@ihs.com>
+1995-04-20 Kevin Rodgers <kevinr@ihs.com>
* dired-x.el: Change the instructions in the INSTALLATION
comment block to set buffer-local variables like
* gud.el (gud-massage-args): Variable and function deleted.
(gud-common-init): Don't set the variable.
-1995-03-02 Boris Goldowsky <boris@cs.rochester.edu>
+1995-03-02 Boris Goldowsky <boris@cs.rochester.edu>
* simple.el (newline): Moved from cmds.c. Indents last
inserted line to left-margin.
* etags.el (etags-tags-table-files, etags-tags-included-tables):
Search backwards for the comma in case the file name contains one.
-1994-10-17 Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
+1994-10-17 Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
* paths.el (rmail-spool-directory): Add a condition to test
the Bull DPX/2.
* desktop.el (desktop-internal-v2s): Remove all text properties
from strings.
-1994-10-13 Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
+1994-10-13 Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
* hilit19.el (hilit-set-mode-patterns - lisp-mode): Fix regexp
for 'defconstant' that leads to an infinite loop.
(makefile-add-log-defun): New function.
(makefile-menu-index-function): New function.
-1994-10-11 Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
+1994-10-11 Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
* rmailsum.el (rmail-summary-resend): New function.
(rmail-summary-mode-map - resend): Call rmail-summary-resend
* etags.el (etags-tags-completion-table): Allow ? and : in guessed
tag names.
-1994-09-26 Joe Ramey <ramey@csc.ti.com>
+1994-09-26 Joe Ramey <ramey@csc.ti.com>
* rmailsum.el (rmail-summary-delete-forward): Regexp for
recognizing deleted message should not require a space at the
* help.el (view-lossage): Handle buffers and frames in recent-keys.
-1994-08-10 Michael Kifer (Michael Kifer <kifer@cs.sunysb.edu>)
+1994-08-10 Michael Kifer <kifer@cs.sunysb.edu>
* ediff.el (ediff-find-file, ediff-patch-file): Handle symlinks.
* rmailsum.el (rmail-new-summary): If just one window,
put the summary in the upper window and Rmail buffer below.
-1994-07-30 Ake Stenhoff (etxaksf@aom.ericsson.se)
+1994-07-30 Ake Stenhoff (etxaksf@aom.ericsson.se)
* imenu.el (imenu, imenu--flatten-index-alist): Add marker support.
(imenu--cleanup): New function.
* indent.el (move-to-tab-stop): Delete spurious multiple definition.
-1994-07-11 Kevin Rodgers <kevinr@ihs.com>
+1994-07-11 Kevin Rodgers <kevinr@ihs.com>
* mailabbrev.el (define-mail-abbrev): Don't try to parse empty aliases.
((screen-mouse-x (min (1- (frame-width)) ;don't hit column 86!
(/ (bg-get-tty-num semicolon) 9)))
(screen-mouse-y (- (1- (frame-height)) ;assume default font size.
- (/ (bg-get-tty-num semicolon) 16)))
+ (/ (bg-get-tty-num semicolon) 16)))
(bg-mouse-buttons (% (bg-get-tty-num ?c) 8))
(bg-mouse-window (bg-window-from-x-y screen-mouse-x screen-mouse-y))
(bg-cursor-window (selected-window))
(scroll-up bg-mouse-y))
(defun bg-mouse-line-to-center ()
- "Scroll the line pointed to by the BitGraph mouse to the center
+ "Scroll the line pointed to by the BitGraph mouse to the center
of the window"
(interactive)
(scroll-up (/ (+ 2 bg-mouse-y bg-mouse-y (- (window-height))) 2)))
(defun bg-window-from-x-y (x y)
"Find window corresponding to screen coordinates.
X and Y are 0-based character positions on the screen."
- (get-window-with-predicate (lambda (w)
+ (get-window-with-predicate (lambda (w)
(coordinates-in-window-p (cons x y) w))))
(defun bg-command-execute (bg-command)
"Bind bg-mouse CLICK-CODE to run FUNCTION."
(define-key mouse-map (char-to-string click-code) function))
-(bind-bg-mouse-click bg-button-l 'bg-set-point)
+(bind-bg-mouse-click bg-button-l 'bg-set-point)
(bind-bg-mouse-click bg-button-m 'bg-yank)
(bind-bg-mouse-click bg-button-r 'bg-set-mark)
(bind-bg-mouse-click (+ bg-button-l bg-button-m) 'yank-pop-1)
;; which are supported on all platforms.)
(let* ((i 128)
(modify (function
- (lambda (ch sy)
+ (lambda (ch sy)
(modify-syntax-entry ch sy text-mode-syntax-table)
(if (boundp 'tex-mode-syntax-table)
(modify-syntax-entry ch sy tex-mode-syntax-table))
(define-key function-key-map "\e[072q" [?\C-\t])
;; This only works if you remove the M-TAB keybing from the system.4Dwmrc
;; our your ~/.4Dwmrc, if you use the 4Dwm window manager.
-(define-key function-key-map "\e[073q" [?\M-\t])
+(define-key function-key-map "\e[073q" [?\M-\t])
(define-key function-key-map "\e[074q" [?\M-q])
;; Make suspend-emacs [C-z] collapse the current frame
(substitute-key-definition 'suspend-emacs 'iconify-frame
global-map)
-
+
;; Support mouse-wheel scrolling
(autoload 'mwheel-scroll "mwheel")
(global-set-key [mouse-wheel] 'mwheel-scroll)
:group 'killing)
(defun x-select-text (text &optional push)
- (if x-select-enable-clipboard
+ (if x-select-enable-clipboard
(w16-set-clipboard-data text))
(setq x-last-selected-text text))
-
+
;;; Return the value of the current selection.
;;; Consult the selection, then the cut buffer. Treat empty strings
;;; as if they were unset.
(defun x-get-selection-value ()
- (if x-select-enable-clipboard
+ (if x-select-enable-clipboard
(let (text)
;; Don't die if x-get-selection signals an error.
(condition-case c
(define-key map "\eOc" [C-right])
(define-key map "\eOa" [C-up])
(define-key map "\eOb" [C-down])
-
+
(define-key map "\e[5$" [S-prior])
(define-key map "\e[6$" [S-next])
(define-key map "\e[8$" [S-end])
;; Modeled after the GNUEMACS keymap interface.
;;
;; User Functions:
-;; make-mousemap, copy-mousemap,
+;; make-mousemap, copy-mousemap,
;; define-mouse, global-set-mouse, local-set-mouse,
;; use-global-mousemap, use-local-mousemap,
;; mouse-lookup, describe-mouse-bindings
YESMINI says to include the minibuffer as a window.
This is a macro, and does not evaluate its arguments."
`(let ((OriginallySelectedWindow (selected-window)))
- (unwind-protect
+ (unwind-protect
(while (progn
,form
(not (eq OriginallySelectedWindow
\f
(defun sun-mouse-handler (&optional hit)
"Evaluates the function or list associated with a mouse hit.
-Expecting to read a hit, which is a list: (button x y delta).
-A form bound to button by define-mouse is found by mouse-lookup.
-The variables: *mouse-window*, *mouse-x*, *mouse-y* are bound.
+Expecting to read a hit, which is a list: (button x y delta).
+A form bound to button by define-mouse is found by mouse-lookup.
+The variables: *mouse-window*, *mouse-x*, *mouse-y* are bound.
If the form is a symbol (symbolp), it is funcall'ed with *mouse-window*,
*mouse-x*, and *mouse-y* as arguments; if the form is a list (listp),
the form is eval'ed; if the form is neither of these, it is an error.
(mouse-lookup mouse-code))))
(cond ((null form)
(if (not (sm::hit-up-p hit)) ; undefined up hits are ok.
- (error "Undefined mouse event: %s"
- (prin1-to-string
+ (error "Undefined mouse event: %s"
+ (prin1-to-string
(mouse-code-to-mouse-list mouse-code)))))
((symbolp form)
(setq this-command form)
(let ((hit2 (mouse-second-hit extra-click-wait)))
(if hit2 ; we cons'd it, we can smash it.
; (setf (sm::hit-code hit1) (logior (sm::hit-code hit1) ...))
- (setcar hit1 (logior (sm::hit-code hit1)
+ (setcar hit1 (logior (sm::hit-code hit1)
(sm::hit-code hit2)
- (if (= (sm::hit-button hit1)
+ (if (= (sm::hit-button hit1)
(sm::hit-button hit2))
sm::DoubleBits 0))))))
hit1))
but that uses minibuffer, and mucks up last-command."
(let ((char-list nil) (char nil))
(while (not (equal 13 ; Carriage return.
- (prog1 (setq char (read-char))
+ (prog1 (setq char (read-char))
(setq char-list (cons char char-list))))))
(read (mapconcat 'char-to-string (nreverse char-list) ""))
))
Returns list (window x y) where x and y are relative to window."
(or
(catch 'found
- (eval-in-windows
+ (eval-in-windows
(let ((we (window-edges (selected-window))))
(let ((le (nth 0 we))
(te (nth 1 we))
(if (and (>= x le) (< x re)
(>= y te) (< y be))
- (throw 'found
+ (throw 'found
(list (selected-window) (- x le) (- y te))))))
t)) ; include minibuffer in eval-in-windows
;;If x,y from a real mouse click, we shouldn't get here.
;;; The encoding of mouse events into a mousemap.
;;; These values must agree with coding in emacstool:
;;;
-(defconst sm::keyword-alist
+(defconst sm::keyword-alist
'((left . 1) (middle . 2) (right . 4)
(shift . 8) (control . 16) (meta . 32) (double . 64) (up . 128)
(text . 256) (scrollbar . 512) (modeline . 1024) (minibuffer . 2048)
the FORM associated with the selected STRING is evaluated,
and the resulting value is returned. Generally these FORMs are
evaluated for their side-effects rather than their values.
- If the selected form is a menu or a symbol whose value is a menu,
+ If the selected form is a menu or a symbol whose value is a menu,
then it is displayed and evaluated as a pullright menu item.
If the FORM of the first ITEM is nil, the STRING of the item
is used as a label for the menu, i.e. it's inverted and not selectable."
(defun sun-get-frame-data (code)
"Sends the tty-sub-window escape sequence CODE to terminal,
and returns a cons of the two numbers in returned escape sequence.
-That is it returns (cons <car> <cdr>) from \"\\E[n;<car>;<cdr>t\".
+That is it returns (cons <car> <cdr>) from \"\\E[n;<car>;<cdr>t\".
CODE values: 13 = Tool-Position, 14 = Size-in-Pixels, 18 = Size-in-Chars."
(send-string-to-terminal (concat "\033[" (int-to-string code) "t"))
(let (char str x y)
(chr (sun-get-frame-data 18))) ; returns size in chars
(cons (/ (car pix) (car chr)) (/ (cdr pix) (cdr chr)))))
-(defvar sm::menu-kludge-x nil
+(defvar sm::menu-kludge-x nil
"Cached frame-to-window X-Offset for sm::menu-kludge")
-(defvar sm::menu-kludge-y nil
+(defvar sm::menu-kludge-y nil
"Cached frame-to-window Y-Offset for sm::menu-kludge")
(defun sm::menu-kludge ()
(defun suspend-emacstool (&optional stuffstring)
"Suspend emacstool.
If running under as a detached process emacstool,
-you don't want to suspend (there is no way to resume),
+you don't want to suspend (there is no way to resume),
just close the window, and wait for reopening."
(interactive)
(run-hooks 'suspend-hook)
(let* ((command (car command-history))
(command-name (symbol-name (car command)))
(search-arg (car (cdr command)))
- (search-command
+ (search-command
(and command-name (string-match "search" command-name)))
)
(if (and search-command (stringp search-arg)) (setq grep-arg search-arg)
- (setq search-command this-command
+ (setq search-command this-command
grep-arg (read-string "REsearch: " grep-arg)
this-command search-command)
grep-arg))))
;; handle sun's extra function keys
;; this version for those who run with standard .ttyswrc and no emacstool
;;
-;; sunview picks up expose and open on the way UP,
+;; sunview picks up expose and open on the way UP,
;; so we ignore them on the way down
;;
;;
;; {c} is [a-j] for LEFT, [a-i] for TOP, [a-o] for RIGHT.
;; A higher level insists on encoding {h,j,l,n}{r} (the arrow keys)
-;; as ANSI escape sequences. Use the shell command
+;; as ANSI escape sequences. Use the shell command
;; % setkeys noarrows
;; if you want these to come through for emacstool.
;;
-;; If you are not using EmacsTool,
+;; If you are not using EmacsTool,
;; you can also use this by creating a .ttyswrc file to do the conversion.
;; but it won't include the CONTROL, META, or SHIFT keys!
;;
;;
;; C-x C-@ is the mouse command prefix.
-(autoload 'sun-mouse-handler "sun-mouse"
+(autoload 'sun-mouse-handler "sun-mouse"
"Sun Emacstool handler for mouse blips (not loaded)." t)
(defun emacstool-init ()
L scroll-up line to top execute-extended-command
C proportional goto-char line to middle mouse-help
R scroll-down line to bottom eval-expression"
-
+
(interactive)
(let*
;; expect a string of <esc>:<buttons>;<x-pos>;<y-pos>c
((= buttons mouse-left)
(call-interactively 'execute-extended-command))
((= buttons mouse-center)
- (describe-function 'sup-mouse-report)); silly self help
+ (describe-function 'sup-mouse-report)); silly self help
))
(t ;in another window
(select-window window)
With a positive argument, select alternate keypad mode.
With a negative argument, select numeric keypad mode."
(interactive "P")
- (setq tvi970-keypad-numeric
+ (setq tvi970-keypad-numeric
(if (null arg)
(not tvi970-keypad-numeric)
(> (prefix-numeric-value arg) 0)))
With positive argument, switch to 132-column mode.
With negative argument, switch to 80-column mode."
(interactive "P")
- (setq vt100-wide-mode
+ (setq vt100-wide-mode
(if (null arg) (not vt100-wide-mode)
(> (prefix-numeric-value arg) 0)))
(send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l"))
(if (not (eq window-system 'w32))
(error "%s: Loading w32-win.el but not compiled for w32" (invocation-name)))
-
+
(require 'frame)
(require 'mouse)
(require 'scroll-bar)
(if (not (eq window-system 'x))
(error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
-
+
(require 'frame)
(require 'mouse)
(require 'scroll-bar)
(expand-file-name (if (file-directory-p emacs-dir)
(concat emacs-dir basename)
(concat "~/.emacs-" basename)))))
-
+
(defun emacs-session-save ()
"This function is called when the window system is shutting down.
If this function returns non-nil, the window system shutdown is cancelled.
(with-current-buffer buf
(let ((cancel-shutdown (condition-case nil
;; A return of t means cancel the shutdown.
- (run-hook-with-args-until-success
+ (run-hook-with-args-until-success
'emacs-save-session-functions)
(error t))))
(unless cancel-shutdown
(delete-file filename)
(message "Restored session data"))))
-
-
+
+
\f
;;
;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.
(cond ((>= (length text) x-cut-buffer-max)
(x-set-cut-buffer "" push)
(setq x-last-selected-text-cut ""))
- (t
+ (t
(x-set-cut-buffer text push)
(setq x-last-selected-text-cut text)))
(x-set-selection 'PRIMARY text)
(let (clip-text primary-text cut-text)
(when x-select-enable-clipboard
;; Don't die if x-get-selection signals an error.
- (if (null clip-text)
+ (if (null clip-text)
(condition-case c
(setq clip-text (x-get-selection 'CLIPBOARD 'COMPOUND_TEXT))
(error nil)))
- (if (null clip-text)
+ (if (null clip-text)
(condition-case c
(setq clip-text (x-get-selection 'CLIPBOARD 'STRING))
(error nil)))
;; Check the CLIPBOARD selection for 'newness', is it different
;; from what we remebered them to be last time we did a
;; cut/paste operation.
- (setq clip-text
+ (setq clip-text
(cond;; check clipboard
((or (not clip-text) (string= clip-text ""))
(setq x-last-selected-text-clipboard nil))
((eq clip-text x-last-selected-text-clipboard) nil)
((string= clip-text x-last-selected-text-clipboard)
- ;; Record the newer string,
+ ;; Record the newer string,
;; so subsequent calls can use the `eq' test.
(setq x-last-selected-text-clipboard clip-text)
nil)
)
;; Don't die if x-get-selection signals an error.
- (if (null primary-text)
+ (if (null primary-text)
(condition-case c
(setq primary-text (x-get-selection 'PRIMARY 'COMPOUND_TEXT))
(error nil)))
- (if (null primary-text)
+ (if (null primary-text)
(condition-case c
(setq primary-text (x-get-selection 'PRIMARY 'STRING))
(error nil)))
;; Check the PRIMARY selection for 'newness', is it different
;; from what we remebered them to be last time we did a
;; cut/paste operation.
- (setq primary-text
+ (setq primary-text
(cond;; check primary selection
((or (not primary-text) (string= primary-text ""))
(setq x-last-selected-text-primary nil))
((eq primary-text x-last-selected-text-primary) nil)
((string= primary-text x-last-selected-text-primary)
- ;; Record the newer string,
+ ;; Record the newer string,
;; so subsequent calls can use the `eq' test.
(setq x-last-selected-text-primary primary-text)
nil)
;; Check the x cut buffer for 'newness', is it different
;; from what we remebered them to be last time we did a
;; cut/paste operation.
- (setq cut-text
+ (setq cut-text
(cond;; check primary selection
((or (not cut-text) (string= cut-text ""))
(setq x-last-selected-text-cut nil))
((eq cut-text x-last-selected-text-cut) nil)
((string= cut-text x-last-selected-text-cut)
- ;; Record the newer string,
+ ;; Record the newer string,
;; so subsequent calls can use the `eq' test.
(setq x-last-selected-text-cut cut-text)
nil)
;; timestamps there is no way to know what the 'correct' value to
;; return is. The nice thing to do would be to tell the user we
;; saw multiple possible selections and ask the user which was the
- ;; one they wanted.
+ ;; one they wanted.
;; This code is still a big improvement because now the user can
;; futz with the current selection and get emacs to pay attention
;; to the cut buffer again (previously as soon as clipboard or
;;; Commentary:
;; GNU Emacs code to help maintain databases compatible with (troff)
-;; refer and lookbib. The file bib-file should be set to your
+;; refer and lookbib. The file bib-file should be set to your
;; bibliography file. Keys are automagically inserted as you type,
;; and appropriate keys are presented for various kinds of entries.
(define-key bib-mode-map "\e`" 'abbrev-mode)
(defun addbib ()
- "Set up editor to add to troff bibliography file specified
+ "Set up editor to add to troff bibliography file specified
by global variable `bib-file'. See description of `bib-mode'."
(interactive)
(find-file bib-file)
(goto-char (point-max))
(bib-mode)
)
-
+
(define-derived-mode bib-mode text-mode "Bib"
- "Mode for editing `lookbib' style bibliographies.
+ "Mode for editing `lookbib' style bibliographies.
Hit RETURN to get next % field key.
If you want to ignore this field, just hit RETURN again.
Use `text-mode' to turn this feature off.
journal papers: A* T D J V N P K W X
- articles in books & proceedings: A* T D B E* I C P K W X
+ articles in books & proceedings: A* T D B E* I C P K W X
tech reports: A* T D R I C K W X
books: A* T D I C K W X
V olume N umber P age K eywords
B in book or proceedings E ditor C ity & state
I nstitution, school, or publisher
-R eport number or 'phd thesis' or 'masters thesis' or 'draft' or
+R eport number or 'phd thesis' or 'masters thesis' or 'draft' or
'unnumbered' or 'unpublished'
W here can be found locally (login name, or ailib, etc.)
X comments (not used in indexing)
"\\("
"[^\"\\]" ;; anything but quote or backslash
"\\|"
- "\\("
+ "\\("
"\\\\\\(.\\|\n\\)" ;; any backslash quoted character
"\\)"
"\\)*"
(if (looking-at "\"")
(setq end-point (bibtex-parse-quoted-string)))
(goto-char starting-point)
- (if end-point
+ (if end-point
(cons starting-point end-point)
nil))))
(setq bibtex-field-name-for-parsing name)
(let ((starting-point (point))
(boundaries nil))
- (while (and (not boundaries)
+ (while (and (not boundaries)
(< (point) bound)
(search-forward "," bound t))
(goto-char (match-beginning 0))
- (let ((temp-boundaries
+ (let ((temp-boundaries
(bibtex-parse-association 'bibtex-parse-field-name
'bibtex-parse-field-text)))
(if (and temp-boundaries (<= (cdr (cdr temp-boundaries)) bound))
(while (and (not boundaries)
(>= (point) bound)
(search-backward "," bound t))
- (let ((temp-boundaries
+ (let ((temp-boundaries
(bibtex-parse-association 'bibtex-parse-field-name
'bibtex-parse-field-text)))
(if temp-boundaries
(progn
(goto-char (cdr text-boundaries))
(if (looking-at "[ \t\n]*[})]")
- (let ((boundaries (list (car text-boundaries)
+ (let ((boundaries (list (car text-boundaries)
(cdr text-boundaries)
(match-end 0))))
(goto-char (match-end 0))
(let* ((case-fold-search t)
(starting-point (point))
(boundaries nil))
- (while (and (not boundaries)
- (search-forward-regexp
+ (while (and (not boundaries)
+ (search-forward-regexp
"^[ \t]*@string[ \t\n]*[({][ \t\n]*" nil t))
(goto-char (match-beginning 0))
(let ((temp-boundaries (bibtex-parse-string)))
(starting-point (point))
(boundaries nil))
(while (and (not boundaries)
- (search-backward-regexp
+ (search-backward-regexp
"^[ \t]*@string[ \t\n]*[({][ \t\n]*" nil t))
(goto-char (match-beginning 0))
(let ((temp-boundaries (bibtex-parse-string)))
(let* ((case-fold-search t)
(year (bibtex-autokey-get-yearfield-digits max)))
(if (and (string= year "") bibtex-autokey-year-use-crossref-entry)
- (let* ((bounds
+ (let* ((bounds
(bibtex-search-forward-field "\\(OPT\\)?crossref" max))
(crossref-field
(if bounds
(while (and (not failure) (> arg 0))
(cond ((eq direction 'previous)
(setq bounds (bibtex-search-backward-field field-name (point-min)))
- (if bounds
+ (if bounds
(goto-char (bibtex-start-of-field bounds))
(setq failure t)))
((eq direction 'next)
(setq bounds (bibtex-search-forward-field field-name (point-max)))
- (if bounds
+ (if bounds
(goto-char (bibtex-end-of-field bounds))
(setq failure t))))
(setq arg (- arg 1)))
(setq cmp (1- (abs cmp)))
(unless (zerop cmp)
(substring s1 0 cmp)))))
-
+
(defun fill-context-prefix (from to &optional first-line-regexp)
"Compute a fill prefix from the text between FROM and TO.
This uses the variables `adaptive-fill-regexp' and `adaptive-fill-function'
(beginning-of-line)
(setq from (point))
-
+
;; Delete all but one soft newline at end of region.
;; And leave TO before that one.
(goto-char to)
;; Delete the fill-prefix from every line.
(fill-delete-prefix from to fill-prefix)
(setq from (point))
-
+
;; FROM, and point, are now before the text to fill,
;; but after any fill prefix on the first line.
(setq comin (point))
(goto-char comstart) (skip-chars-backward " \t")
(setq has-code-and-comment (not (bolp)))))
-
+
(if (not comstart)
;; Return nil, so the normal filling will take place.
nil
This returns the value of the text-property `justification',
or the variable `default-justification' if there is no text-property.
However, it returns nil rather than `none' to mean \"don't justify\"."
- (let ((j (or (get-text-property
+ (let ((j (or (get-text-property
;; Make sure we're looking at paragraph body.
- (save-excursion (skip-chars-forward " \t")
+ (save-excursion (skip-chars-forward " \t")
(if (and (eobp) (not (bobp)))
(1- (point)) (point)))
'justification)
(save-restriction
(if whole-par
(let ((paragraph-start (if use-hard-newlines "." paragraph-start))
- (paragraph-ignore-fill-prefix (if use-hard-newlines t
+ (paragraph-ignore-fill-prefix (if use-hard-newlines t
paragraph-ignore-fill-prefix)))
(goto-char begin)
(while (and (bolp) (not (eobp))) (forward-char 1))
;; A line has up to six parts:
;;
-;; >>> hello.
+;; >>> hello.
;; [Indent-1][FP][ Indent-2 ][text][trailing whitespace][newline]
;;
;; "Indent-1" is the left-margin indentation; normally it ends at column
;; Trailing whitespace is not counted as part of the line length when
;; center- or right-justifying.
;;
-;; All parts of the line are optional, although the final newline can
+;; All parts of the line are optional, although the final newline can
;; only be missing on the last line of the buffer.
(defun justify-current-line (&optional how eop nosqueeze)
Normally does full justification: adds spaces to the line to make it end at
the column given by `current-fill-column'.
Optional first argument HOW specifies alternate type of justification:
-it can be `left', `right', `full', `center', or `none'.
+it can be `left', `right', `full', `center', or `none'.
If HOW is t, will justify however the `current-justification' function says to.
If HOW is nil or missing, full justification is done by default.
Second arg EOP non-nil means that this is the last line of the paragraph, so
count)
(end-of-line)
;; Check if this is the last line of the paragraph.
- (if (and use-hard-newlines (null eop)
+ (if (and use-hard-newlines (null eop)
(get-text-property (point) 'hard))
(setq eop t))
(skip-chars-backward " \t")
(beginning-of-line)
(skip-chars-forward " \t")
;; Skip over fill-prefix.
- (if (and fill-prefix
+ (if (and fill-prefix
(not (string-equal fill-prefix ""))
(equal fill-prefix
- (buffer-substring
+ (buffer-substring
(point) (min (point-max) (+ (length fill-prefix)
(point))))))
(forward-char (length fill-prefix))
- (if (and adaptive-fill-mode
+ (if (and adaptive-fill-mode
(looking-at adaptive-fill-regexp))
(goto-char (match-end 0))))
(setq fp-end (point))
(setq endcol (current-column))
;; HOW can't be null or left--we would have exited already
- (cond ((eq 'right how)
+ (cond ((eq 'right how)
(setq ncols (- fc endcol))
(if (< ncols 0)
;; Need to remove some indentation
- (delete-region
+ (delete-region
(progn (goto-char fp-end)
(if (< (current-column) (+ indent ncols))
(move-to-column (+ indent ncols) t))
(goto-char beg)
(indent-to (+ indent ncols))
;; If point was at beginning of text, keep it there.
- (if (= beg pos)
+ (if (= beg pos)
(move-marker pos (point)))))
((eq 'center how)
(save-excursion
(move-to-left-margin nil t)
;; Position ourselves after any fill-prefix.
- (if (and fill-prefix
+ (if (and fill-prefix
(not (string-equal fill-prefix ""))
(equal fill-prefix
- (buffer-substring
+ (buffer-substring
(point) (min (point-max) (+ (length fill-prefix)
(point))))))
(forward-char (length fill-prefix)))
(defun unjustify-region (&optional begin end)
"Remove justification whitespace from region.
For centered or right-justified regions, this function removes any indentation
-past the left margin from each line. For full-justified lines, it removes
+past the left margin from each line. For full-justified lines, it removes
extra spaces between words. It does nothing in other justification modes.
Arguments BEGIN and END are optional; default is the whole buffer."
(save-excursion
(defun fill-individual-paragraphs (min max &optional justify citation-regexp)
"Fill paragraphs of uniform indentation within the region.
-This command divides the region into \"paragraphs\",
+This command divides the region into \"paragraphs\",
treating every change in indentation level or prefix as a paragraph boundary,
then fills each paragraph using its indentation level as the fill prefix.
(if fill-individual-varying-indent
;; If this line is a separator line, with or
;; without prefix, end the paragraph.
- (and
+ (and
(not (looking-at paragraph-separate))
(save-excursion
(not (and (looking-at fill-prefix-regexp)
;; If fill prefix is shorter than a new
;; fill prefix computed here, end paragraph.
(let ((this-line-fill-prefix
- (fill-individual-paragraphs-prefix
+ (fill-individual-paragraphs-prefix
citation-regexp)))
- (>= (length fill-prefix)
+ (>= (length fill-prefix)
(length this-line-fill-prefix)))
(save-excursion
(not (progn (forward-char
;;; *** Buffer Local Definitions ***
-(defconst ispell-words-keyword "LocalWords: "
+(defconst ispell-words-keyword "LocalWords: "
"The keyword for local oddly-spelled words to accept.
The keyword will be followed by any number of local word spellings.
There can be multiple of these keywords in the file.")
;; Copyright (C) 1991, 1993, 2002 Free Software Foundation, Inc.
-;; Author: Robert J. Chassell
+;; Author: Robert J. Chassell
;; Maintainer: FSF
;; Keywords: docs convenience
:group 'makeinfo)
(defcustom makeinfo-options "--fill-column=70"
- "*String containing options for running `makeinfo'.
+ "*String containing options for running `makeinfo'.
Do not include `--footnote-style' or `--paragraph-indent';
the proper way to specify those is with the Texinfo commands
`@footnotestyle` and `@paragraphindent'."
This command does not offer the `next-error' feature since it would
apply to a temporary file, not the original; use the `makeinfo-buffer'
command to gain use of `next-error'."
-
+
(interactive "r")
(let (filename-or-header
filename-or-header-beginning
(concat
(make-temp-file
(substring (buffer-file-name)
- 0
- (or (string-match "\\.tex" (buffer-file-name))
+ 0
+ (or (string-match "\\.tex" (buffer-file-name))
(length (buffer-file-name)))))
".texinfo"))
-
+
(save-excursion
(save-restriction
(widen)
(let ((search-end (save-excursion (forward-line 100) (point))))
;; Find and record the Info filename,
;; or else explain that a filename is needed.
- (if (re-search-forward
+ (if (re-search-forward
"^@setfilename[ \t]+\\([^ \t\n]+\\)[ \t]*"
search-end t)
- (setq makeinfo-output-file-name
+ (setq makeinfo-output-file-name
(buffer-substring (match-beginning 1) (match-end 1)))
(error
"The texinfo file needs a line saying: @setfilename <name>"))
;; Find header and specify its beginning and end.
(goto-char (point-min))
- (if (and
- (prog1
+ (if (and
+ (prog1
(search-forward tex-start-of-header search-end t)
(beginning-of-line)
;; Mark beginning of header.
(setq filename-or-header-beginning (point)))
- (prog1
+ (prog1
(search-forward tex-end-of-header nil t)
(beginning-of-line)
;; Mark end of header
(setq filename-or-header-end (point))))
-
+
;; Insert the header into the temporary file.
(write-region
(min filename-or-header-beginning region-beginning)
filename-or-header-end
makeinfo-temp-file nil nil)
-
+
;; Else no header; insert @filename line into temporary file.
(goto-char (point-min))
(search-forward "@setfilename" search-end t)
(min filename-or-header-beginning region-beginning)
filename-or-header-end
makeinfo-temp-file nil nil))
-
+
;; Insert the region into the file.
(write-region
(max region-beginning filename-or-header-end)
(concat makeinfo-run-command
" "
makeinfo-options
- " "
+ " "
makeinfo-temp-file)
"Use `makeinfo-buffer' to gain use of the `next-error' command"
nil
(defun makeinfo-buffer ()
"Make Info file from current buffer.
-Use the \\[next-error] command to move to the next error
+Use the \\[next-error] command to move to the next error
\(if there are errors\)."
-
+
(interactive)
(cond ((null buffer-file-name)
(error "Buffer not visiting any file"))
((buffer-modified-p)
(if (y-or-n-p "Buffer modified; do you want to save it? ")
(save-buffer))))
-
+
;; Find and record the Info filename,
;; or else explain that a filename is needed.
(save-excursion
(goto-char (point-min))
(let ((search-end (save-excursion (forward-line 100) (point))))
- (if (re-search-forward
+ (if (re-search-forward
"^@setfilename[ \t]+\\([^ \t\n]+\\)[ \t]*"
search-end t)
- (setq makeinfo-output-file-name
+ (setq makeinfo-output-file-name
(expand-file-name
(buffer-substring (match-beginning 1) (match-end 1))))
(error
"The texinfo file needs a line saying: @setfilename <name>"))))
(setq makeinfo-output-node-name (makeinfo-current-node))
-
+
(save-excursion
(makeinfo-compile
(concat makeinfo-run-command " " makeinfo-options
(cons '(--- "---") (cdr x))))
outline-mode-menu-bar-map))))))
map))
-
+
(defvar outline-mode-map
(let ((map (make-sparse-keymap)))
(save-match-data
(outline-up-heading 1 t)
(match-string 0))))))
-
+
(unless (rassoc level outline-heading-alist)
(push (cons head level) outline-heading-alist))
(unless (rassoc level outline-heading-alist)
(push (cons head level) outline-heading-alist))
-
+
(replace-match down-head nil t)
(when children
(outline-map-tree 'outline-demote level))))
;; reveal do the rest, by simply doing:
;; (remove-overlays (overlay-start o) (overlay-end o)
;; 'invisible 'outline)
- ;;
+ ;;
;; That works fine as long as everything is in sync, but if the
;; structure of the document is changed while revealing parts of it,
;; the resulting behavior can be ugly. I.e. we need to make
;; previous-page C-x C-p C-p
;; search-pages C-x C-p C-s
;; add-new-page C-x C-p C-a
-;; sort-pages-buffer C-x C-p s
+;; sort-pages-buffer C-x C-p s
;; set-page-delimiter C-x C-p C-l
-;; pages-directory C-x C-p C-d
+;; pages-directory C-x C-p C-d
;; pages-directory-for-addresses C-x C-p d
;; pages-directory-goto C-c C-c
\f
;;; Using the page commands
-
+
;; The page commands are helpful in several different contexts. For
;; example, programmers often divide source files into sections using the
;; `page-delimiter'; you can use the `pages-directory' command to list
;; the `pages-directory' or `pages-directory-for-addresses' command.
;; Specifically:
-;;
+;;
;; 1. Begin each entry with a `page-delimiter' (which is, by default,
;; `^L' at the beginning of the line).
-;;
+;;
;; 2. The first line of text in each entry is the `heading line'; it
;; will appear in the pages-directory-buffer which is constructed
;; using the `C-x C-p C-d' (pages-directory) command or the `C-x
;; C-p d' (pages-directory-for-addresses) command.
-;;
+;;
;; The heading line may be on the same line as the page-delimiter
;; or it may follow after. It is the first non-blank line on the
;; page. Conventionally, the heading line is placed on the line
;; line of the body.
;; For example, a file might look like this:
-;;
+;;
;; FSF
;; Free Software Foundation
;; 59 Temple Place - Suite 330
;; Boston, MA 02111-1307 USA.
;; (617) 542-5942
;; gnu@gnu.org
-;;
+;;
;; \f
;; House Subcommittee on Intellectual Property,
;; U.S. House of Representatives,
;; Washington, DC 20515
-;;
+;;
;; Congressional committee concerned with permitting or preventing
;; monopolistic restrictions on the use of software technology.
-;;
+;;
;; \f
;; George Lakoff
;; ``Women, Fire, and Dangerous Things:
;; What Categories Reveal about the Mind''
;; 1987, Univ. of Chicago Press
-;;
+;;
;; About philosophy, Whorfian effects, and linguistics.
-;;
-;; \f
+;;
+;; \f
;; OBI (On line text collection.)
;; Open Book Initiative
;; c/o Software Tool & Die
;; 1330 Beacon St, Brookline, MA 02146 USA
-;; (617) 739-0202
+;; (617) 739-0202
;; obi@world.std.com
;; In this example, the heading lines are:
;; match the telephone area code of the first and fourth entries, so
;; only the header lines of those two entries would appear in the
;; pages-directory-buffer.
-;;
+;;
;; Called with a numeric argument, the `pages-directory' command
;; lists the number of lines in each page. This is helpful when you
-;; are printing hardcopy.
+;; are printing hardcopy.
;; Called with a negative numeric argument, the `pages-directory'
;; command lists the lengths of pages whose contents match a regexp.
pages-directory-for-adding-page-narrowing-p variable
is non-nil.
-Page begins with a `^L' as the default page-delimiter.
+Page begins with a `^L' as the default page-delimiter.
Use \\[set-page-delimiter] to change the page-delimiter.
Point is left in the body of page."
(interactive "sHeader line: ")
(widen)
;; If in pages directory buffer
- (if (eq major-mode 'pages-directory-mode)
+ (if (eq major-mode 'pages-directory-mode)
(progn
;; Add new page before or after current page?
(if pages-directory-for-adding-new-page-before-current-page-p
(format "%s\n"
;; Remove leading `^' from page-delimiter string
(if (eq '^ (car (read-from-string page-delimiter)))
- (substring page-delimiter 1))))
+ (substring page-delimiter 1))))
(goto-char (point-min))))
;; Insert page delimiter at beginning of line.
(if (not (looking-at "^.")) (forward-line 1))
- (insert (format "%s\n%s\n\n\n"
+ (insert (format "%s\n%s\n\n\n"
(if (eq '^ (car (read-from-string page-delimiter)))
(substring page-delimiter 1))
header-line))
(autoload 'sort-subr "sort" "Primary function for sorting." t nil)
(defun sort-pages-in-region (reverse beg end)
- "Sort pages in region alphabetically. Prefix arg means reverse order.
+ "Sort pages in region alphabetically. Prefix arg means reverse order.
Called from a program, there are three arguments:
REVERSE (non-nil means reverse order), BEG and END (region to sort)."
(goto-char (point-max))))))))
(defun sort-pages-buffer (&optional reverse)
- "Sort pages alphabetically in buffer. Prefix arg means reverse order.
+ "Sort pages alphabetically in buffer. Prefix arg means reverse order.
\(Non-nil arg if not interactive.\)"
(interactive "P")
In a program, non-nil second arg causes first arg to be ignored and
resets the page-delimiter to the original value."
-
+
(interactive
(if current-prefix-arg
(list original-page-delimiter "^\f")
If the buffer is narrowed, the `pages-directory' command creates a
directory for only the accessible portion of the buffer."
-
+
(interactive
(cond ((not current-prefix-arg)
(list t nil nil))
- ((listp current-prefix-arg)
+ ((listp current-prefix-arg)
(list nil
nil
(read-string
(or pages-directory-previous-regexp "regexp")))))
((> (prefix-numeric-value current-prefix-arg) 0)
(list t t nil))
- ((< (prefix-numeric-value current-prefix-arg) 0)
+ ((< (prefix-numeric-value current-prefix-arg) 0)
(list nil
t
(read-string
(format "Select according to `%s' (end with RET): "
(or pages-directory-previous-regexp "regexp")))))))
-
+
(if (equal regexp "")
(setq regexp pages-directory-previous-regexp)
(setq pages-directory-previous-regexp regexp))
-
+
(if (interactive-p)
(message "Creating directory for: %s "
(buffer-name)))
-
+
(let ((pages-target-buffer (current-buffer))
(pages-directory-buffer
(concat pages-directory-prefix " " (buffer-name)))
(linenum 1)
(pages-buffer-original-position (point))
(pages-buffer-original-page 0))
-
+
;; `with-output-to-temp-buffer' binds the value of the variable
;; `standard-output' to the buffer named as its first argument,
;; but does not switch to that buffer.
"==== Pages Directory: use `C-c C-c' to go to page under cursor. ====" ?\n)
(setq pages-buffer pages-target-buffer)
(setq pages-pos-list nil))
-
+
(if pages-list-all-headers-p
-
+
;; 1. If no prefix argument, list all headers
(save-excursion
(goto-char (point-min))
-
+
;; (a) Point is at beginning of buffer; but the first
;; page may not begin with a page-delimiter
(save-restriction
(goto-char (match-end 0)))
(narrow-to-page)
(pages-copy-header-and-position count-lines-p))
-
+
;; (b) Search within pages buffer for next page-delimiter
(while (re-search-forward page-delimiter nil t)
(pages-copy-header-and-position count-lines-p)))
-
+
;; 2. Else list headers whose pages match regexp.
(save-excursion
;; REMOVED save-restriction AND widen FROM HERE
(goto-char (point-min))
-
+
;; (a) Handle first page
(save-restriction
(narrow-to-page)
;; search for selection regexp
(if (save-excursion (re-search-forward regexp nil t))
(pages-copy-header-and-position count-lines-p)))
-
+
;; (b) Search for next page-delimiter
(while (re-search-forward page-delimiter nil t)
(save-restriction
(if (save-excursion (re-search-forward regexp nil t))
(pages-copy-header-and-position count-lines-p)
)))))
-
+
(set-buffer standard-output)
;; Put positions in increasing order to go with buffer.
(setq pages-pos-list (nreverse pages-pos-list))
"Copy page header and its position to the Pages Directory.
Only arg non-nil, count lines in page and insert before header.
Used by `pages-directory' function."
-
+
(let (position line-count)
(if count-lines-p
(if (<= (point) pages-buffer-original-position)
(setq pages-buffer-original-page
(1+ pages-buffer-original-page)))
-
+
(save-excursion
;; go to first non-blank char after the page-delimiter
- (skip-chars-forward " \t\n")
+ (skip-chars-forward " \t\n")
;; set the marker here; this the place to which the
- ;; `pages-directory-goto' command will go
+ ;; `pages-directory-goto' command will go
(setq position (make-marker))
(set-marker position (point))
(let ((start (point))
inserted-at)
;; change to directory buffer
(set-buffer standard-output)
- ;; record page position
+ ;; record page position
(setq pages-pos-list (cons position pages-pos-list))
;; insert page header
(setq inserted-at (point))
(insert-buffer-substring pages-target-buffer start end)
- (add-text-properties inserted-at (point)
+ (add-text-properties inserted-at (point)
'(mouse-face highlight
help-echo "mouse-2: go to this page"))
(put-text-property inserted-at (point) 'rear-nonsticky 'highlight))
-
+
(if count-lines-p
(save-excursion
(beginning-of-line)
(insert (format "%3d: " line-count))))
-
+
(terpri))
(end-of-line 1)))
(pos (nth pages-number pages-pos-list))
(end-of-directory-p (eobp))
(narrowing-p pages-directory-buffer-narrowing-p))
- (pop-to-buffer pages-buffer)
+ (pop-to-buffer pages-buffer)
(widen)
(if end-of-directory-p
(goto-char (point-max))
`pages-directory-goto' narrows addresses buffer to entry.
If pages-directory-for-addresses-buffer-keep-windows-p is nil,
-this command deletes other windows when it displays the addresses
+this command deletes other windows when it displays the addresses
directory."
(interactive
Prefix argument says to turn mode on if positive, off if negative.
When the mode is turned on, if there are newlines in the buffer but no hard
-newlines, ask the user whether to mark as hard any newlines preceeding a
+newlines, ask the user whether to mark as hard any newlines preceeding a
`paragraph-start' line. From a program, second arg INSERT specifies whether
to do this; it can be `never' to change nothing, t or `always' to force
-marking, `guess' to try to do the right thing with no questions, nil
+marking, `guess' to try to do the right thing with no questions, nil
or anything else to ask the user.
Newlines not marked hard are called \"soft\", and are always internal
;; 9/88, created H.Kautz
;; modified 1/19/89, allow books with editor but no author;
;; added %O ordering field;
-;; appended illegal multiple fields, instead of
+;; appended illegal multiple fields, instead of
;; discarding;
;; added rule, a tech report whose %R number
;; contains "ISBN" is really a book
:group 'refbib)
(defcustom r2b-journal-abbrevs
- '(
+ '(
)
- "Abbreviation list for journal names.
+ "Abbreviation list for journal names.
If the car of an element matches a journal name exactly, it is replaced by
the cadr when output. Braces must be included if replacement is a
{string}, but not if replacement is a bibtex abbreviation. The cadr
-may be eliminated if is exactly the same as the car.
+may be eliminated if is exactly the same as the car.
Because titles are capitalized before matching, the abbreviation
-for the journal name should be listed as beginning with a capital
+for the journal name should be listed as beginning with a capital
letter, even if it really doesn't.
For example, a value of '((\"Aij\" \"{Artificial Intelligence}\")
\(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string
-\"Artificial Intelligence\", but would replace Ijcai81 with the
+\"Artificial Intelligence\", but would replace Ijcai81 with the
BibTeX macro \"ijcai7\"."
:type '(repeat (list string string))
:group 'refbib)
-(defcustom r2b-booktitle-abbrevs
- '(
+(defcustom r2b-booktitle-abbrevs
+ '(
)
"Abbreviation list for book and proceedings names.
If the car of an element matches a title or booktitle exactly, it is
should be listed as beginning with a capital letter, even if it doesn't.
For example, a value of '((\"Aij\" \"{Artificial Intelligence}\")
\(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string
-\"Artificial Intelligence\", but would replace Ijcai81 with the
+\"Artificial Intelligence\", but would replace Ijcai81 with the
BibTeX macro \"ijcai7\"."
:type '(repeat (list string string))
:group 'refbib)
and `r2b-booktitle-abbrevs') does not contain the words \"conference\" or
\"proceedings\". (Those cases are handled automatically.)
The entry must match the given data exactly.
- Because titles are capitalized before matching, the items in this list
+ Because titles are capitalized before matching, the items in this list
should begin with a capital letter.
For example, suppose the title \"Ijcai81\" is used for the proceedings of
a conference, and its expansion is the BibTeX macro \"ijcai7\". Then
(makunbound 'r2b-stop-regexp))
(defvar r2b-stop-regexp
- (concat "\\`\\(\\("
+ (concat "\\`\\(\\("
r2b-additional-stop-words "\\|" r2b-capitalize-title-stop-words
"\\)\\('\\w*\\)?\\W+\\)*\\([A-Z0-9]+\\)"))
(r2b-trace "snarfing %s" field)
(goto-char (point-min))
(while (and not-past-end
- (re-search-forward
+ (re-search-forward
(concat "^" field "\\b[ \t]*\\(.*[^ \t\n]\\)[ \t]*") nil t))
(setq item (r2b-match 1))
(while (and (setq not-past-end (zerop (forward-line 1)))
(let ((months r2b-month-abbrevs))
(if (string-match "[^0-9]" r2bv-month)
(progn
- (while (and months (not (string-match (car (car months))
+ (while (and months (not (string-match (car (car months))
r2bv-month)))
(setq months (cdr months)))
(if months
(r2b-set-match 'r2bv-title-first-word 4
r2b-stop-regexp
r2bv-title)
-
+
(r2b-get-field 'r2bv-annote "%X" t )
(r2b-get-field 'r2bv-tr "%R" t)
(r2b-get-field 'r2bv-address "%C" t)
(princ ", \n ")
(princ field)
(princ " =\t")
- (if (not nodelim)
+ (if (not nodelim)
(if r2b-delimit-with-quote
(princ "\"")
(princ "{")))
(if (> (match-end 0) 59)
(princ "\n"))
(princ data)
- (if (not nodelim)
+ (if (not nodelim)
(if r2b-delimit-with-quote
(princ "\"")
(princ "}")))
(defun r2b-require (vars)
"If any of VARS is null, set to empty string and log error."
- (cond
+ (cond
((null vars))
((listp vars) (r2b-require (car vars)) (r2b-require (cdr vars)))
(t
(defun r2b-isa-university (name)
"Return t if NAME is a university or similar organization,
but not a publisher."
- (and
+ (and
name
(string-match "university" name)
(not (string-match "press" name))
(setq r2bv-kn (concat r2bv-primary-author r2bv-decade
r2bv-title-first-word))
-
+
(setq r2bv-entry-kind
- (cond
+ (cond
((r2b-isa-proceedings r2bv-journal)
(r2b-moveq r2bv-booktitle r2bv-journal)
(if (r2b-isa-university r2bv-institution)
'proceedings)
((or r2bv-editor
(and r2bv-author
- (or
+ (or
(null r2bv-tr)
(string-match "\\bisbn\\b" r2bv-tr))))
(r2b-moveq r2bv-publisher r2bv-institution)
'book)
(r2bv-tr
(r2b-require 'r2bv-institution)
- (if (string-match
- "\\`\\(\\(.\\|\n\\)+\\)[ \t\n]+\\([^ \t\n]\\)+\\'"
+ (if (string-match
+ "\\`\\(\\(.\\|\n\\)+\\)[ \t\n]+\\([^ \t\n]\\)+\\'"
r2bv-tr)
(progn
(setq r2bv-type (substring r2bv-tr 0 (match-end 1)))
- (setq r2bv-number (substring r2bv-tr
+ (setq r2bv-number (substring r2bv-tr
(match-beginning 3)))
(setq r2bv-tr nil))
(r2b-moveq r2bv-number r2bv-tr))
(defun r2b-convert-record (output-name)
"Transform current bib entry and append to buffer OUTPUT;
do \"M-x r2b-help\" for more info."
- (interactive
+ (interactive
(list (read-string "Output to buffer: " r2b-out-buf-name)))
(let (rec-end rec-begin not-done)
(setq r2b-out-buf-name output-name)
nil
)
))
-
-
+
+
(defun r2b-convert-buffer (output-name)
"Transform current buffer and append to buffer OUTPUT.
Do `M-x r2b-help' for more info."
- (interactive
+ (interactive
(list (read-string "Output to buffer: " r2b-out-buf-name)))
(save-excursion
(setq r2b-log (get-buffer-create r2b-log-name))
(message "Working, please be patient...")
(sit-for 0)
(while (r2b-convert-record output-name) t)
- (message "Done, results in %s, errors in %s"
+ (message "Done, results in %s, errors in %s"
r2b-out-buf-name r2b-log-name)
)
(list refer-bib-directory))))
(files
(cond
- ((null refer-bib-files)
+ ((null refer-bib-files)
(list (expand-file-name
(if (eq major-mode 'bibtex-mode)
(read-file-name
(if (<= (point) (overlay-start overlay))
;; Just get OVERLAY out of the way
(move-overlay overlay 1 1)
- ;; Make overlay contain only the region
+ ;; Make overlay contain only the region
(move-overlay overlay (overlay-start overlay) (point))))))
(defun refill-fill-paragraph-at (pos &optional arg)
(defun reftex-arg-index-tag (optional &optional prompt &rest args)
- "Prompt for an index tag with completion.
+ "Prompt for an index tag with completion.
This is the name of an index, not the entry."
(let (tag taglist)
(setq prompt (concat (if optional "(Optional) " "")
;; Use RefTeX completion
(progn
(reftex-access-scan-info nil)
- (setq taglist
- (cdr (assoc 'index-tags
+ (setq taglist
+ (cdr (assoc 'index-tags
(symbol-value reftex-docstruct-symbol)))
tag (completing-read prompt (mapcar 'list taglist))))
;; Just ask like AUCTeX does.
;; Replace AUCTeX functions with RefTeX functions.
;; Which functions are replaced is controlled by the variable
;; `reftex-plug-into-AUCTeX'.
-
+
(if (reftex-plug-flag 0)
(setq LaTeX-label-function 'reftex-label)
(setq LaTeX-label-function nil))
(and (reftex-plug-flag 3)
(fboundp 'TeX-arg-cite)
(fset 'TeX-arg-cite 'reftex-arg-cite))
-
- (and (reftex-plug-flag 4)
+
+ (and (reftex-plug-flag 4)
(fboundp 'TeX-arg-index-tag)
(fset 'TeX-arg-index-tag 'reftex-arg-index-tag))
- (and (reftex-plug-flag 4)
+ (and (reftex-plug-flag 4)
(fboundp 'TeX-arg-index)
(fset 'TeX-arg-index 'reftex-arg-index)))
(unless (eq (get 'reftex-default-bibliography :reftex-raw)
reftex-default-bibliography)
(put 'reftex-default-bibliography :reftex-expanded
- (reftex-locate-bibliography-files
+ (reftex-locate-bibliography-files
default-directory reftex-default-bibliography))
(put 'reftex-default-bibliography :reftex-raw
reftex-default-bibliography))
;; If RETURN is non-nil, just return the entry.
(let* ((re
- (if item
+ (if item
(concat "\\\\bibitem\\(\\[[^]]*\\]\\)?{" (regexp-quote key) "}")
(concat "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*" (regexp-quote key)
"[, \t\r\n}]")))
(when return
;; Just return the relevant entry
(if item (goto-char (match-end 0)))
- (setq return (buffer-substring
+ (setq return (buffer-substring
(point) (reftex-end-of-bib-entry item)))
(set-buffer buffer-conf)
(throw 'exit return))
(error "No BibTeX entry with citation key %s" key)))))
(defun reftex-end-of-bib-entry (item)
- (save-excursion
+ (save-excursion
(condition-case nil
- (if item
+ (if item
(progn (end-of-line)
(re-search-forward
"\\\\bibitem\\|\\end{thebibliography}")
;; Read a regexp, completing on known citation keys.
(setq default (regexp-quote (reftex-get-bibkey-default)))
- (setq re-list
- (split-string
- (completing-read
+ (setq re-list
+ (split-string
+ (completing-read
(concat
"Regex { && Regex...}: "
"[" default "]: ")
(if reftex-mode
(if (fboundp 'LaTeX-bibitem-list)
(LaTeX-bibitem-list)
- (cdr (assoc 'bibview-cache
+ (cdr (assoc 'bibview-cache
(symbol-value reftex-docstruct-symbol))))
nil)
nil nil nil 'reftex-cite-regexp-hist)
(error (goto-char key-point)
(throw 'search-again nil)))
(setq end-point (point))
-
+
;; Ignore @string, @comment and @c entries or things
;; outside entries
(when (or (string= (downcase (match-string 2)) "string")
(< (point) key-point)) ; this means match not in {}
(goto-char key-point)
(throw 'search-again nil))
-
+
;; Well, we have got a match
(setq entry (concat
(buffer-substring start-point (point)) "\n"))
-
+
;; Check if other regexp match as well
(setq re-list rest-re)
(while re-list
;; nope - move on
(throw 'search-again nil))
(pop re-list))
-
+
(setq alist (reftex-parse-bibtex-entry
nil start-point end-point))
(push (cons "&entry" entry) alist)
-
+
;; check for crossref entries
(if (assoc "crossref" alist)
(setq alist
(append
alist (reftex-get-crossref-alist alist))))
-
+
;; format the entry
(push (cons "&formatted" (reftex-format-bib-entry alist))
alist)
-
+
;; make key the first element
(push (reftex-get-bib-field "&key" alist) alist)
-
+
;; add it to the list
(push alist found-list)))))
(reftex-kill-temporary-buffers))))
(unless files
(error "Need file name to find thebibliography environment"))
(while (setq file (pop files))
- (setq buf (reftex-get-file-buffer-force
+ (setq buf (reftex-get-file-buffer-force
file (not reftex-keep-temporary-buffers)))
(unless buf
(error "No such file %s" file))
(save-restriction
(widen)
(goto-char (point-min))
- (while (re-search-forward
+ (while (re-search-forward
"\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t)
(beginning-of-line 2)
(setq start (point))
- (if (re-search-forward
+ (if (re-search-forward
"\\(\\`\\|[\n\r]\\)[ \t]*\\\\end{thebibliography}" nil t)
(progn
(beginning-of-line 1)
(setq end (point))))
(when (and start end)
- (setq entries
+ (setq entries
(append entries
(mapcar 'reftex-parse-bibitem
(delete ""
- (split-string
+ (split-string
(buffer-substring-no-properties start end)
"[ \t\n\r]*\\\\bibitem\\(\\[[^]]*]\\)*"))))))
(goto-char end)))))
;; Read a regexp, completing on known citation keys.
(setq default (regexp-quote (reftex-get-bibkey-default)))
- (setq re-list
- (split-string
- (completing-read
+ (setq re-list
+ (split-string
+ (completing-read
(concat
"Regex { && Regex...}: "
"[" default "]: ")
(if reftex-mode
(if (fboundp 'LaTeX-bibitem-list)
(LaTeX-bibitem-list)
- (cdr (assoc 'bibview-cache
+ (cdr (assoc 'bibview-cache
(symbol-value reftex-docstruct-symbol))))
nil)
nil nil nil 'reftex-cite-regexp-hist)
(error "Empty regular expression"))
(while (and (setq re (pop re-list)) entries)
- (setq entries
+ (setq entries
(delq nil (mapcar
(lambda (x)
(if (string-match re (cdr (assoc "&entry" x)))
x nil))
entries))))
- (setq entries
- (mapcar
+ (setq entries
+ (mapcar
(lambda (x)
(push (cons "&formatted" (reftex-format-bibitem x)) x)
(push (reftex-get-bib-field "&key" x) x)
;; All keys go into a single command - we need to trick a little
(pop selected-entries)
(let ((concat-keys (mapconcat 'car selected-entries ",")))
- (setq insert-entries
+ (setq insert-entries
(list (list concat-keys (cons "&key" concat-keys))))))
-
+
(unless no-insert
;; We shall insert this into the buffer...
(delete-char 1))
;; Tell AUCTeX
- (when (and reftex-mode
+ (when (and reftex-mode
(fboundp 'LaTeX-add-bibitems)
reftex-plug-into-AUCTeX)
(apply 'LaTeX-add-bibitems (mapcar 'car selected-entries)))
-
+
;; Produce the cite-view strings
(when (and reftex-mode reftex-cache-cite-echo cite-view)
- (mapcar (lambda (entry)
+ (mapcar (lambda (entry)
(reftex-make-cite-echo-string entry docstruct-symbol))
selected-entries))
(set-marker reftex-select-return-marker nil)
(reftex-kill-buffer "*RefTeX Select*")
-
+
;; Check if the prefix arg was numeric, and call recursively
(when (integerp arg)
(if (> arg 1)
- (progn
+ (progn
(skip-chars-backward "}")
(decf arg)
(reftex-do-citation arg))
(forward-char 1)))
-
+
;; Return the citation key
(car (car selected-entries))))
(no-insert
;; Format does not really matter because nothing will be inserted.
(setq format "%l"))
-
+
((and (stringp macro)
(string-match "\\`\\\\cite\\|cite\\'" macro))
;; We are already inside a cite macro
(when (listp format)
(setq key
(or format-key
- (reftex-select-with-char
+ (reftex-select-with-char
"" (concat "SELECT A CITATION FORMAT\n\n"
(mapconcat
(lambda (x)
(let ((bibtype (reftex-bib-or-thebib))
found-list rtn key data selected-entries)
- (while
- (not
+ (while
+ (not
(catch 'done
;; Scan bibtex files
(setq found-list
(reftex-extract-bib-entries-from-thebibliography
(reftex-uniquify
(mapcar 'cdr
- (reftex-all-assq
+ (reftex-all-assq
'thebib (symbol-value reftex-docstruct-symbol))))))
(reftex-default-bibliography
(message "Using default bibliography")
(reftex-extract-bib-entries (reftex-default-bibliography)))
(t (error "No valid bibliography in this document, and no default available"))))
-
+
(unless found-list
(error "Sorry, no matches found"))
-
+
;; Remember where we came from
(setq reftex-call-back-to-this-buffer (current-buffer))
(set-marker reftex-select-return-marker (point))
-
+
;; Offer selection
(save-window-excursion
(delete-other-windows)
(goto-char 1))
((eq key ?A)
;; Take all (marked)
- (setq selected-entries
+ (setq selected-entries
(if reftex-select-marked
(mapcar 'car (nreverse reftex-select-marked))
found-list))
(throw 'done t))
((eq key ?a)
;; Take all (marked), and push the symbol 'concat
- (setq selected-entries
- (cons 'concat
+ (setq selected-entries
+ (cons 'concat
(if reftex-select-marked
(mapcar 'car (nreverse reftex-select-marked))
found-list)))
((or (eq key ?\C-m)
(eq key 'return))
;; Take selected
- (setq selected-entries
+ (setq selected-entries
(if reftex-select-marked
- (cons 'concat
+ (cons 'concat
(mapcar 'car (nreverse reftex-select-marked)))
(if data (list data) nil)))
(throw 'done t))
reftex-mouse-selected-face
nil))
tmp len)
- (mapcar
+ (mapcar
(lambda (x)
(setq tmp (cdr (assoc "&formatted" x))
len (length tmp))
(defun reftex-make-cite-echo-string (entry docstruct-symbol)
;; Format a bibtex entry for the echo area and cache the result.
(let* ((key (reftex-get-bib-field "&key" entry))
- (string
+ (string
(let* ((reftex-cite-punctuation '(" " " & " " etal.")))
(reftex-format-citation entry reftex-cite-view-format)))
(cache (assq 'bibview-cache (symbol-value docstruct-symbol)))
(setq bibfile-list
(reftex-uniquify
(mapcar 'cdr
- (reftex-all-assq
+ (reftex-all-assq
'thebib (symbol-value reftex-docstruct-symbol))))
item t))
(reftex-default-bibliography
(setq bibfile-list (reftex-visited-files bibfile-list)))
(condition-case nil
- (reftex-pop-to-bibtex-entry
+ (reftex-pop-to-bibtex-entry
key bibfile-list (not reftex-keep-temporary-buffers) t item)
(error (ding))))
-
+
(select-window win)))
;;; reftex-cite.el ends here
(format reftex-find-index-entry-regexp-format
(regexp-quote key))
3 nil nil)))
- (t
+ (t
(reftex-access-scan-info arg)
(catch 'exit
(let ((list reftex-view-crossref-extra)
action (nth 1 entry)
group (nth 2 entry))
(when (string-match mre macro)
- (setq dw (reftex-view-regexp-match
+ (setq dw (reftex-view-regexp-match
(format action key) group nil nil))
(throw 'exit t))))
(error "Not on a crossref macro argument"))))
(if (and (eq arg 2) (windowp dw)) (select-window dw))))
-
+
(defun reftex-view-cr-cite (arg key how)
- ;; View crossreference of a ref cite. HOW can have the values
+ ;; View crossreference of a ref cite. HOW can have the values
;; nil: Show in another window.
;; echo: Show one-line info in echo area.
;; tmp-window: Show in small window and arrange for window to disappear.
(if (eq how 'tmp-window)
;; Remember the window configuration
- (put 'reftex-auto-view-crossref 'last-window-conf
+ (put 'reftex-auto-view-crossref 'last-window-conf
(current-window-configuration)))
(let (files size item (pos (point)) (win (selected-window)) pop-win
(setq item t
files (reftex-uniquify
(mapcar 'cdr
- (reftex-all-assq
+ (reftex-all-assq
'thebib (symbol-value reftex-docstruct-symbol))))))
(reftex-default-bibliography
(setq item nil
(select-window pop-win)))))
(defun reftex-view-cr-ref (arg label how)
- ;; View crossreference of a ref macro. HOW can have the values
+ ;; View crossreference of a ref macro. HOW can have the values
;; nil: Show in another window.
;; echo: Show one-line info in echo area.
;; tmp-window: Show in small window and arrange for window to disappear.
;; Ensure access to scanning info
(reftex-access-scan-info (or arg current-prefix-arg))
-
+
(if (eq how 'tmp-window)
;; Remember the window configuration
- (put 'reftex-auto-view-crossref 'last-window-conf
+ (put 'reftex-auto-view-crossref 'last-window-conf
(current-window-configuration)))
(let* ((xr-data (assoc 'xr (symbol-value reftex-docstruct-symbol)))
;; Label is defined in external document
(save-excursion
(save-match-data
- (set-buffer
+ (set-buffer
(or (reftex-get-file-buffer-force
(cdr (assoc (match-string 1 label) (nth 1
xr-data))))
(error "Problem with external label %s" label))))
(setq label (substring label (match-end 1)))
(reftex-access-scan-info)
- (setq entry
+ (setq entry
(assoc label (symbol-value reftex-docstruct-symbol)))))
(if (eq how 'echo)
;; Display in echo area
reftex-mouse-view-crossref)))
;; Quick precheck if this might be a relevant spot
;; FIXME: Can fail with backslash in comment
- (save-excursion
+ (save-excursion
(search-backward "\\" nil t)
(looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)"))
(set-window-configuration (get 'reftex-auto-view-crossref 'last-window-conf))
(put 'reftex-auto-view-crossref 'last-window-conf nil)
(remove-hook 'pre-command-hook 'reftex-restore-window-conf))
-
+
(defun reftex-echo-ref (label entry docstruct)
;; Display crossref info in echo area.
(cond
(unless reftex-revisit-to-echo
(setq files (reftex-visited-files files)))
- (setq entry
+ (setq entry
(condition-case nil
(save-excursion
(reftex-pop-to-bibtex-entry key files nil nil item t))
(error
(if (and files (= (length all-files) (length files)))
(message "cite: no such database entry: %s" key)
- (message (substitute-command-keys
+ (message (substitute-command-keys
(format reftex-no-info-message "cite"))))
nil)))
(when entry
(if (featurep 'xemacs)
(if reftex-use-itimer-in-xemacs
(start-itimer "RefTeX Idle Timer"
- 'reftex-view-crossref-when-idle
+ 'reftex-view-crossref-when-idle
reftex-idle-time reftex-idle-time t)
(add-hook 'post-command-hook 'reftex-start-itimer-once)
t)
(not (itimer-live-p reftex-auto-view-crossref-timer))
(setq reftex-auto-view-crossref-timer
(start-itimer "RefTeX Idle Timer"
- 'reftex-view-crossref-when-idle
+ 'reftex-view-crossref-when-idle
reftex-idle-time nil t))))
(defun reftex-view-crossref-from-bibtex (&optional arg)
link to a document, call the function with with a prefix arg.
Calling this function several times find successive citation locations."
(interactive "P")
- (when arg
+ (when arg
;; Break connection to reference buffer
(put 'reftex-bibtex-view-cite-locations :ref-buffer nil))
(let ((ref-buffer (get 'reftex-bibtex-view-cite-locations :ref-buffer)))
(unless ref-buffer
(setq ref-buffer
(save-excursion
- (completing-read
+ (completing-read
"Reference buffer: "
(delq nil
- (mapcar
+ (mapcar
(lambda (b)
(set-buffer b)
(if reftex-mode (list (buffer-name b)) nil))
(set (make-local-variable 'TeX-master) master)
(erase-buffer)
(insert " MULTIPLE LABELS IN CURRENT DOCUMENT:\n")
- (insert
+ (insert
" Move point to label and type `r' to run a query-replace on the label\n"
" and its references. Type `q' to exit this buffer.\n\n")
(insert " LABEL FILE\n")
(not (yes-or-no-p "Replacing all simple labels in multiple files is risky. Continue? ")))
(error "Abort"))
;; Make the translation list
- (let* ((re-core (concat "\\("
- (mapconcat 'cdr reftex-typekey-to-prefix-alist "\\|")
+ (let* ((re-core (concat "\\("
+ (mapconcat 'cdr reftex-typekey-to-prefix-alist "\\|")
"\\)"))
(label-re (concat "\\`" re-core "\\([0-9]+\\)\\'"))
(search-re (concat "[{,]\\(" re-core "\\([0-9]+\\)\\)[,}]"))
(reftex-save-all-document-buffers)
;; First test to check for erros
- (setq n (reftex-translate
+ (setq n (reftex-translate
files search-re translate-alist error-fmt 'test))
;; Now the real thing.
- (if (yes-or-no-p
+ (if (yes-or-no-p
(format "Replace %d items at %d places in %d files? "
(length translate-alist) n (length files)))
(progn
(defun reftex-translate (files search-re translate-alist error-fmt test)
;; In FILES, look for SEARCH-RE and replace match 1 of it with
- ;; its association in TRANSLATE-ALSIT.
+ ;; its association in TRANSLATE-ALSIT.
;; If we do not find an association and TEST is non-nil, query
- ;; to ignore the problematic string.
+ ;; to ignore the problematic string.
;; If TEST is nil, it is ignored without query.
;; Return the number of replacements.
(let ((n 0) file label match-data buf macro pos cell)
(or (looking-at "\\\\ref")
(looking-at "\\\\[a-zA-Z]*ref\\(range\\)?[^a-zA-Z]")
(looking-at "\\\\ref[a-zA-Z]*[^a-zA-Z]")
- (looking-at (format
+ (looking-at (format
reftex-find-label-regexp-format
(regexp-quote label)))))
;; OK, we should replace it.
(active (if (boundp 'zmacs-regions)
(and zmacs-regions (region-exists-p)) ; XEmacs
(and transient-mark-mode mark-active))) ; Emacs
- (beg (if active
+ (beg (if active
(region-beginning)
- (save-excursion
+ (save-excursion
(skip-syntax-backward "w\\") (point))))
(end (if active
(region-end)
- (save-excursion
+ (save-excursion
(skip-syntax-forward "w\\") (point))))
(sel (buffer-substring beg end))
(mathp (condition-case nil (texmathp) (error nil)))
;; Delete what is in the buffer and make the index entry
(delete-region beg end)
(reftex-index def-char full-entry def-tag sel)))))
-
+
(defun reftex-index (&optional char key tag sel no-insert)
"Query for an index macro and insert it along with its argments.
The index macros available are those defined in `reftex-index-macro' or
;; OPT-ARGS is a list of optional argument indices, as given by
;; `reftex-parse-args'.
(let* ((opt (and (integerp itag) (member itag opt-args)))
- (index-tags (cdr (assq 'index-tags
+ (index-tags (cdr (assq 'index-tags
(symbol-value reftex-docstruct-symbol))))
(default (reftex-default-index))
(prompt (concat "Index tag"
(defun reftex-index-select-tag ()
;; Have the user select an index tag.
;; FIXME: should we cache tag-alist, prompt and help?
- (let* ((index-tags (cdr (assoc 'index-tags
+ (let* ((index-tags (cdr (assoc 'index-tags
(symbol-value reftex-docstruct-symbol))))
(default (reftex-default-index)))
- (cond
+ (cond
((null index-tags)
(error "No index tags available"))
((= (length index-tags) 1)
;; Just one index, use it
(car index-tags))
-
+
((> (length index-tags) 1)
;; Several indices, ask.
(let* ((tags (copy-sequence index-tags))
(unless (assq (aref tag i) tag-alist)
(push (list (aref tag i)
tag
- (concat (substring tag 0 i)
+ (concat (substring tag 0 i)
"[" (substring tag i (incf i)) "]"
(substring tag i)))
tag-alist)
(throw 'exit t)))
- (push (list (+ ?0 (incf cnt)) tag
+ (push (list (+ ?0 (incf cnt)) tag
(concat "[" (int-to-string cnt) "]:" tag))
tag-alist)))
(setq tag-alist (nreverse tag-alist))
(if default
(format "[^M] %s (the default)\n" default)
"")
- (mapconcat (lambda(x)
+ (mapconcat (lambda(x)
(apply 'format "[%c] %s" x))
tag-alist "\n")))
;; Query the user for an index-tag
key))
(defun reftex-index-update-taglist (newtag)
- ;; add NEWTAG to the list of available index tags.
+ ;; add NEWTAG to the list of available index tags.
(let ((cell (assoc 'index-tags (symbol-value reftex-docstruct-symbol))))
(and newtag (cdr cell) (not (member newtag (cdr cell)))
(push newtag (cdr cell)))))
;; Note: This function just looks for the nearest match of the
;; context string and may fail if the entry moved and an identical
;; entry is close to the old position. Frequent rescans make this
- ;; safer.
+ ;; safer.
(let* ((file (nth 3 data))
(literal (nth 2 data))
(pos (nth 4 data))
(calling-file (buffer-file-name))
(restriction
(or overriding-restriction
- (and (interactive-p)
+ (and (interactive-p)
(reftex-get-restriction current-prefix-arg docstruct))))
(locations
;; See if we are on an index macro as initial position
(macro (car what-macro))
(here-I-am (when (member macro reftex-macros-with-index)
(save-excursion
- (goto-char (+ (cdr what-macro)
+ (goto-char (+ (cdr what-macro)
(length macro)))
(reftex-move-over-touching-args)
(reftex-where-am-I)))))
(setq buffer-name (reftex-make-index-buffer-name index-tag))
;; Goto the buffer and put it into the correct mode
-
+
(when (or restriction current-prefix-arg)
(reftex-kill-buffer buffer-name))
;; Delete the entry at place
(and (bolp) (forward-char 1))
(delete-region (previous-single-property-change (1+ (point)) :data)
- (or (next-single-property-change (point) :data)
+ (or (next-single-property-change (point) :data)
(point-max))))
;; Walk through the list and insert all entries
(insert indent (nth 7 cell))
(when font
(setq to (point))
- (put-text-property
+ (put-text-property
(- (point) (length (nth 7 cell))) to
'face index-face)
(goto-char to))
(defun reftex-index-insert-new-letter (letter &optional font)
;; Start a new section in the index
(let ((from (point)))
- (insert "\n" letter letter letter
+ (insert "\n" letter letter letter
"-----------------------------------------------------------------")
(when font
(put-text-property from (point) 'face reftex-index-section-face))
(interactive "p")
(setq reftex-callback-fwd t)
(or (eobp) (forward-char 1))
- (goto-char (or (next-single-property-change (point) :data)
+ (goto-char (or (next-single-property-change (point) :data)
(point)))
(unless (get-text-property (point) :data)
- (goto-char (or (next-single-property-change (point) :data)
+ (goto-char (or (next-single-property-change (point) :data)
(point)))))
(defun reftex-index-previous (&optional arg)
"Move to previous selectable item."
(reftex-index-restrict-to-section t)
(setq reftex-index-restriction-indicator (nth 6 bor)
reftex-index-restriction-data
- (list bor
+ (list bor
(car (memq (assq 'toc (cdr (memq bor docstruct)))
docstruct))))
(reftex-index-revert))))
show-window show-buffer match)
(unless data (error "Don't know which index entry to visit"))
-
+
(if (eq (car data) 'index)
(setq match (reftex-index-show-entry data no-revisit)))
attr (nth 2 analyze))
(setf (nth 2 analyze) (if (string= attr bor) "" bor))
(setq new (apply 'concat analyze))
- (reftex-index-change-entry
+ (reftex-index-change-entry
new (if (string= (nth 2 analyze) bor)
"Entry is now START-OF-PAGE-RANGE"
"START-OF-PAGE-RANGE canceled"))))
(t (setf (nth n analyze) (concat initial npart))))
(setq new (apply 'concat analyze))
;; Change the entry and insert the changed version into the index.
- (reftex-index-change-entry
+ (reftex-index-change-entry
new (if (string= npart "")
(format "Deleted: %s" opart)
(format "New value is: %s" npart)))))
(unless data (error "Don't know which index entry to change"))
(setq old (nth 2 data)
key (nth 6 data)
- prefix (completing-read
- "Prefix: "
- (reftex-sublist-nth
+ prefix (completing-read
+ "Prefix: "
+ (reftex-sublist-nth
docstruct 6
(lambda (x)
(and (eq (car x) 'index)
(string= (nth 1 x) reftex-index-tag))) t)))
- (unless (string-match
+ (unless (string-match
(concat (regexp-quote (car reftex-index-special-chars)) "\\'")
prefix)
(setq prefix (concat prefix (car reftex-index-special-chars))))
(defun reftex-index-change-entry (new &optional message)
;; Change the full context string of the index entry at point to
;; NEW. This actually edits the buffer where the entry is defined.
-
+
(let* ((data (get-text-property (point) :data))
old beg end info)
(unless data (error "Cannot change entry"))
(if (eq char ?!)
(error "This <%s> index does not contain entries sorted before the letters"
reftex-index-tag)
- (error "This <%s> index does not contain entries starting with `%c'"
+ (error "This <%s> index does not contain entries starting with `%c'"
reftex-index-tag char)))))
-(easy-menu-define
+(easy-menu-define
reftex-index-menu reftex-index-map
"Menu for Index buffer"
`("Index"
- ["Goto section A-Z"
+ ["Goto section A-Z"
(message "To go to a section, just press any of: !%s"
reftex-index-section-letters) t]
["Show Entry" reftex-index-view-entry t]
["Context" reftex-index-toggle-context :style toggle
:selected reftex-index-include-context]
"--"
- ["Follow Mode" reftex-index-toggle-follow :style toggle
+ ["Follow Mode" reftex-index-toggle-follow :style toggle
:selected reftex-index-follow-mode])
"--"
["Help" reftex-index-show-help t]))
(set-marker reftex-index-return-marker (point))
(reftex-index-selection-or-word arg 'phrase)
(if (eq major-mode 'reftex-index-phrases-mode)
- (message
+ (message
(substitute-command-keys
"Return to LaTeX with \\[reftex-index-phrases-save-and-return]"))))
(sort (copy-sequence reftex-index-macro-alist)
(lambda (a b) (equal (car a) default-macro))))
macro entry key repeat)
-
+
(if master (set (make-local-variable 'TeX-master)
(file-name-nondirectory master)))
(if (looking-at reftex-index-phrases-comment-regexp)
(beginning-of-line 2))
(while (looking-at "^[ \t]*$")
- (beginning-of-line 2))
+ (beginning-of-line 2))
(cond ((fboundp 'zmacs-activate-region) (zmacs-activate-region))
((boundp 'make-active) (setq mark-active t)))
(if (yes-or-no-p "Delete and rebuilt header ")
(setq major-mode 'reftex-index-phrases-mode
mode-name "Phrases")
(use-local-map reftex-index-phrases-map)
- (set (make-local-variable 'font-lock-defaults)
+ (set (make-local-variable 'font-lock-defaults)
reftex-index-phrases-font-lock-defaults)
(easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map)
(set (make-local-variable 'reftex-index-phrases-marker) (make-marker))
;; Font Locking stuff
(let ((ss (if (featurep 'xemacs) 'secondary-selection ''secondary-selection)))
(setq reftex-index-phrases-font-lock-keywords
- (list
+ (list
(cons reftex-index-phrases-comment-regexp 'font-lock-comment-face)
(list reftex-index-phrases-macrodef-regexp
'(1 font-lock-type-face)
(setq reftex-index-phrases-font-lock-defaults
'((reftex-index-phrases-font-lock-keywords)
nil t nil beginning-of-line))
- (put 'reftex-index-phrases-mode 'font-lock-defaults
+ (put 'reftex-index-phrases-mode 'font-lock-defaults
reftex-index-phrases-font-lock-defaults) ; XEmacs
)
(move-marker reftex-index-phrases-marker
(match-beginning 0) (current-buffer))
;; Start the query-replace
- (reftex-query-index-phrase-globally
- files phrase macro-fmt
+ (reftex-query-index-phrase-globally
+ files phrase macro-fmt
index-key repeat as-words)
- (message "%s replaced"
+ (message "%s replaced"
(reftex-number replace-count "occurrence"))))))
(t (error "Cannot parse this line")))))
(unless buf (error "Master file %s not found" master))
(set-buffer buf)
(reftex-access-scan-info)
- (setq reftex-index-phrases-files
+ (setq reftex-index-phrases-files
(reftex-all-document-files))))
;; Parse the files header for macro definitions
(setq reftex-index-phrases-macro-data nil)
;; Reverse the list, so that the first macro is first
(if (null reftex-index-phrases-macro-data)
(error "No valid MACRO DEFINITION line in %s file (make sure to use TAB separators)" reftex-index-phrase-file-extension))
- (setq reftex-index-phrases-macro-data
+ (setq reftex-index-phrases-macro-data
(nreverse reftex-index-phrases-macro-data))
(goto-char (point-min)))))
index the new part without having to go over the unchanged parts again."
(interactive "r")
(let ((win-conf (current-window-configuration))
- (reftex-index-phrases-restrict-file (buffer-file-name)))
+ (reftex-index-phrases-restrict-file (buffer-file-name)))
(save-excursion
(save-restriction
(narrow-to-region beg end)
(setq text (reftex-index-simplify-phrase text))
(goto-char (point-min))
(if (re-search-forward
- (concat "^\\(\\S-*\\)\t\\(" (regexp-quote text)
+ (concat "^\\(\\S-*\\)\t\\(" (regexp-quote text)
"\\) *[\t\n]") nil t)
(progn
(goto-char (match-end 2))
(let* ((phrase (match-string 3))
(case-fold-search reftex-index-phrases-case-fold-search)
(re (reftex-index-phrases-find-dup-re phrase t)))
- (if (save-excursion
+ (if (save-excursion
(goto-char (point-min))
(and (re-search-forward re nil t)
(re-search-forward re nil t)))
(progn
(princ (format " Superphrases: Phrase matches the following %s in the phrase buffer:\n"
(reftex-number ntimes2 "line")))
- (mapcar (lambda(x)
+ (mapcar (lambda(x)
(princ (format " Line %4d: %s\n" (car x) (cdr x))))
(nreverse superphrases))))))))
beg end)
(goto-char (point-min))
;; Find first and last phrase line in buffer
- (setq beg
+ (setq beg
(and (re-search-forward reftex-index-phrases-phrase-regexp12 nil t)
(match-beginning 0)))
(goto-char (point-max))
(if (string-match reftex-index-phrases-phrase-regexp12 a)
(progn
;; Extract macro char and phrase-or-key for a
- (setq ca (match-string 1 a)
- pa (downcase
+ (setq ca (match-string 1 a)
+ pa (downcase
(or (and reftex-index-phrases-sort-prefers-entry
(match-string 6 a))
(match-string 3 a))))
(if (string-match reftex-index-phrases-phrase-regexp12 b)
(progn
;; Extract macro char and phrase-or-key for b
- (setq cb (match-string 1 b)
+ (setq cb (match-string 1 b)
pb (downcase
(or (and reftex-index-phrases-sort-prefers-entry
(match-string 6 b))
(setq c-p (string< ca cb)
p-p (string< pa pb))
;; Do the right comparison, based on the value of `chars-first'
- ;; `chars-first' is bound locally in the calling function
+ ;; `chars-first' is bound locally in the calling function
(if chars-first
(if (string= ca cb) p-p c-p)
(if (string= pa pb) c-p p-p)))))
(not reftex-index-phrases-sort-in-blocks))))
(defvar reftex-index-phrases-menu)
-(defun reftex-index-make-phrase-regexp (phrase &optional
+(defun reftex-index-make-phrase-regexp (phrase &optional
as-words allow-newline)
"Return a regexp matching PHRASE, even if distributed over lines.
With optional arg AS-WORDS, require word boundary at beginning and end.
"\\<" "")
(mapconcat (lambda (w) (regexp-quote (downcase w)))
words space-re)
- (if (and as-words
+ (if (and as-words
(string-match "\\w\\'" (nth (1- (length words)) words)))
"\\>" ""))))
(let ((index-keys (split-string (or index-key match)
reftex-index-phrases-logical-and-regexp)))
(concat
- (mapconcat (lambda (x)
- (format macro-fmt
+ (mapconcat (lambda (x)
+ (format macro-fmt
(format (if mathp reftex-index-math-format "%s") x)))
index-keys "")
(if repeat (reftex-index-simplify-phrase match) ""))))
(unless files (error "No files"))
(unwind-protect
(progn
- (switch-to-buffer-other-window (reftex-get-file-buffer-force
+ (switch-to-buffer-other-window (reftex-get-file-buffer-force
(car files)))
(catch 'no-more-files
(while (setq file (pop files))
both ends."
(let* ((re (reftex-index-make-phrase-regexp phrase as-words 'allow-newline))
(case-fold-search reftex-index-phrases-case-fold-search)
- (index-keys (split-string
+ (index-keys (split-string
(or index-key phrase)
reftex-index-phrases-logical-or-regexp))
(nkeys (length index-keys))
(ckey (nth 0 index-keys))
- (all-yes nil)
+ (all-yes nil)
match rpl char beg end mathp)
(unwind-protect
(while (re-search-forward re nil t)
end)))
(throw 'next-match nil))
(reftex-highlight 0 (match-beginning 0) (match-end 0))
- (setq rpl
+ (setq rpl
(save-match-data
(reftex-index-make-replace-string
macro-fmt (match-string 0) ckey repeat mathp)))
- (while
+ (while
(not
(catch 'loop
(message "REPLACE: %s? (yn!qoe%s?)"
rpl
- (if (> nkeys 1)
+ (if (> nkeys 1)
(concat "1-" (int-to-string nkeys))
""))
(setq char (if all-yes ?y (read-char-exclusive)))
((member char '(?o ?O))
;; Select a differnt macro
(let* ((nc (reftex-index-select-phrases-macro 2))
- (macro-data
+ (macro-data
(cdr (assoc nc reftex-index-phrases-macro-data)))
(macro-fmt (car macro-data))
(repeat (nth 1 macro-data)))
;; Recursive edit
(save-match-data
(save-excursion
- (message
+ (message
(substitute-command-keys
"Recursive edit. Resume with \\[exit-recursive-edit]"))
(recursive-edit))))
(and after-macro
(member after-macro reftex-macros-with-index))))))
-
+
(defun reftex-index-phrases-fixup-line (beg end)
"Insert newlines before BEG and/or after END to shorten line."
(let (bol eol space1 space2)
("\C-i" . self-insert-command))
do (define-key reftex-index-phrases-map (car x) (cdr x)))
-(easy-menu-define
+(easy-menu-define
reftex-index-phrases-menu reftex-index-phrases-map
"Menu for Phrases buffer"
'("Phrases"
(unless (assq 'xr docstruct)
(let* ((allxr (reftex-all-assq 'xr-doc docstruct))
(alist (mapcar
- (lambda (x)
+ (lambda (x)
(if (setq tmp (reftex-locate-file (nth 2 x) "tex"
master-dir))
(cons (nth 1 x) tmp)
(alist (delq nil alist))
(allprefix (delq nil (mapcar 'car alist)))
(regexp (if allprefix
- (concat "\\`\\("
+ (concat "\\`\\("
(mapconcat 'identity allprefix "\\|")
"\\)")
"\\\\\\\\\\\\"))) ; this will never match
;; It's an include or input
(setq include-file (reftex-match-string 7))
;; Test if this file should be ignored
- (unless (delq nil (mapcar
+ (unless (delq nil (mapcar
(lambda (x) (string-match x include-file))
reftex-no-include-regexps))
;; Parse it
(push (cons 'bib tmp) docstruct))
(goto-char 1)
- (when (re-search-forward
+ (when (re-search-forward
"\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t)
(push (cons 'thebib file) docstruct))
-
+
;; Find external document specifications
(goto-char 1)
(while (re-search-forward "[\n\r][ \t]*\\\\externaldocument\\(\\[\\([^]]*\\)\\]\\)?{\\([^}]+\\)}" nil t)
(defun reftex-locate-bibliography-files (master-dir &optional files)
;; Scan buffer for bibliography macro and return file list.
-
+
(unless files
(save-excursion
(goto-char (point-min))
"\\(^\\)[^%]*\\\\\\("
(mapconcat 'identity reftex-bibliography-commands "\\|")
"\\){[ \t]*\\([^}]+\\)") nil t)
- (setq files
+ (setq files
(split-string (reftex-match-string 3)
"[ \t\n\r]*,[ \t\n\r]*")))))
(when files
- (setq files
+ (setq files
(mapcar
(lambda (x)
(if (or (member x reftex-bibfile-ignore-list)
(unnumbered (or star (< level 0)))
(level (abs level))
(section-number (reftex-section-number level unnumbered))
- (text1 (save-match-data
+ (text1 (save-match-data
(save-excursion
(reftex-context-substring prefix))))
(literal (buffer-substring-no-properties
(1- (match-beginning 3))
(min (point-max) (+ (match-end 0) (length text1) 1))))
- ;; Literal can be too short since text1 too short. No big problem.
+ ;; Literal can be too short since text1 too short. No big problem.
(text (reftex-nicify-text text1)))
;; Add section number and indentation
(throw 'exit nil)))
(itag (nth 1 entry))
(prefix (nth 2 entry))
- (index-tag
+ (index-tag
(cond ((stringp itag) itag)
((integerp itag)
(progn (goto-char boa)
(key-end (if (string-match reftex-index-key-end-re arg)
(1+ (match-beginning 0))))
(rawkey (substring arg 0 key-end))
-
+
(key (if prefix (concat prefix rawkey) rawkey))
(sortkey (downcase key))
- (showkey (mapconcat 'identity
+ (showkey (mapconcat 'identity
(split-string key reftex-index-level-re)
" ! ")))
(goto-char end-of-args)
;; 0 1 2 3 4 5 6 7 8 9
(list 'index index-tag context file bom arg key showkey sortkey key-end))))
-
+
(defun reftex-short-context (env parse &optional bound derive)
;; Get about one line of useful context for the label definition at point.
((match-end 10)
;; Index entry
(when reftex-support-index
- (let* ((index-info (save-excursion
+ (let* ((index-info (save-excursion
(reftex-index-info-safe nil)))
(list (member (list 'bof (buffer-file-name))
docstruct))
;; Check all index entries with equal text
(while (and list (not (eq endelt (car list))))
(when (and (eq (car (car list)) 'index)
- (string= (nth 2 index-info)
+ (string= (nth 2 index-info)
(nth 2 (car list))))
(incf n)
(setq dist (abs (- (point) (nth 4 (car list)))))
level (nth 5 entry))
;; Insert the section info
(push entry (cdr tail))
-
+
;; We are done unless we use section numbers
(unless (nth 1 reftex-label-menu-flags) (throw 'exit nil))
(setq entry (reftex-index-info-safe buffer-file-name))
;; FIXME: (add-to-list 'index-tags (nth 1 index-entry))
(push entry (cdr tail))))))))))
-
+
(error nil))
)
reftex-special-env-parsers))
specials rtn)
;; Call all functions
- (setq specials (mapcar
+ (setq specials (mapcar
(lambda (fun)
(save-excursion
(setq rtn (and fun (funcall fun bound)))
(setq specials (delq nil specials))
;; Sort
(setq specials (sort specials (lambda (a b) (> (cdr a) (cdr b)))))
- (if (eq which t)
+ (if (eq which t)
specials
(car specials))))))
;; Do the real thing.
(let ((cnt 1))
-
+
(when (reftex-move-to-next-arg)
-
+
(while (< cnt n)
(while (and (member cnt opt-args)
(eq (following-char) ?\{))
(condition-case nil
(while (memq (following-char) '(?\[ ?\{))
(forward-list 1))
- (error nil)))
+ (error nil)))
(defun reftex-context-substring (&optional to-end)
;; Return up to 150 chars from point
(error (point-max))))))
(t
;; no list - just grab 150 characters
- (buffer-substring-no-properties (point)
+ (buffer-substring-no-properties (point)
(min (+ (point) 150) (point-max))))))
;; Variable holding the vector with section numbers
;; not included in the numbering of other sectioning levels.
(when level
(when (and (> level -1) (not star))
- (aset reftex-section-numbers
+ (aset reftex-section-numbers
level (1+ (aref reftex-section-numbers level))))
(setq idx (1+ level))
(when (not star)
(setq string (replace-match "" nil nil string)))
(if (and appendix
(string-match "\\`[0-9]+" string))
- (setq string
+ (setq string
(concat
(char-to-string
(1- (+ ?A (string-to-int (match-string 0 string)))))
(string-match "^[ \t]*$" default))
(setq default prefix
force-prompt t) ; need to prompt
- (setq default
- (concat prefix
+ (setq default
+ (concat prefix
(funcall reftex-string-to-label-function default)))
;; Make it unique.
((setq entry (assoc label
(symbol-value reftex-docstruct-symbol)))
(ding)
- (if (y-or-n-p
+ (if (y-or-n-p
(format "Label '%s' exists. Use anyway? " label))
(setq valid t)))
(setq label default))
;; Insert the label into the label list
- (let* ((here-I-am-info
+ (let* ((here-I-am-info
(save-excursion
- (if (and (or naked no-insert)
+ (if (and (or naked no-insert)
(integerp (cdr macro-cell)))
(goto-char (cdr macro-cell)))
(reftex-where-am-I)))
;; Translate the upper 128 chars in the Latin-1 charset to ASCII equivalents
(let ((tab "@@@@@@@@@@@@@@@@@@'@@@@@@@@@@@@@ icLxY|S\"ca<--R-o|23'uq..1o>423?AAAAAAACEEEEIIIIDNOOOOOXOUUUUYP3aaaaaaaceeeeiiiidnooooo:ouuuuypy")
(emacsp (not (featurep 'xemacs))))
- (mapconcat
+ (mapconcat
(lambda (c)
(cond ((and (> c 127) (< c 256)) ; 8 bit Latin-1
(char-to-string (aref tab (- c 128))))
type (car type))
(setq type (reftex-query-label-type))))
- (let* ((refstyle
+ (let* ((refstyle
(cond ((reftex-typekey-check type reftex-vref-is-default) "\\vref")
((reftex-typekey-check type reftex-fref-is-default) "\\fref")
(t "\\ref")))
(setq type (nth 1 (car labels))
form (or (cdr (assoc type reftex-typekey-to-format-alist))
form))
-
+
(cond
(no-insert
;; Just return the first label
sep (nth 2 (car labels))
sep1 (cdr (assoc sep reftex-multiref-punctuation))
labels (cdr labels))
- (when cut
+ (when cut
(backward-delete-char cut)
(setq cut nil))
matched cell)
(save-excursion
(while (and (setq cell (pop words))
- (not (setq matched
+ (not (setq matched
(re-search-backward (car cell) bound t))))))
(if matched
(cons (cdr cell) (- (match-end 0) (match-end 1)))
context
counter
commented
- (or here-I-am offset)
+ (or here-I-am offset)
prefix
- nil ; no a toc buffer
+ nil ; no a toc buffer
))))
(here-I-am
(setq offset (reftex-get-offset buf here-I-am typekey)))
(save-excursion
(while reftex-buffers-with-changed-invisibility
(set-buffer (car (car reftex-buffers-with-changed-invisibility)))
- (setq buffer-invisibility-spec
+ (setq buffer-invisibility-spec
(cdr (pop reftex-buffers-with-changed-invisibility)))))
(mapcar (lambda (buf) (and (buffer-live-p buf) (bury-buffer buf)))
selection-buffers)
(defun reftex-query-label-type ()
;; Ask for label type
- (let ((key (reftex-select-with-char
+ (let ((key (reftex-select-with-char
reftex-type-query-prompt reftex-type-query-help 3)))
(unless (member (char-to-string key) reftex-typekey-list)
(error "No such label type: %s" (char-to-string key)))
(char-to-string key)))
-(defun reftex-show-label-location (data forward no-revisit
+(defun reftex-show-label-location (data forward no-revisit
&optional stay error)
;; View the definition site of a label in another window.
;; DATA is an entry from the docstruct list.
(throw 'exit nil))
;; Goto the file in another window
- (setq buffer
+ (setq buffer
(if no-revisit
(reftex-get-buffer-visiting file)
(reftex-get-file-buffer-force
(when (or (not (eq major-mode 'latex-mode))
(not font-lock-mode))
(latex-mode)
- (run-hook-with-args
+ (run-hook-with-args
'reftex-pre-refontification-functions
reftex-call-back-to-this-buffer 'reftex-hidden)
(turn-on-font-lock))
(unless other-window
(set-window-configuration wcfg)
(switch-to-buffer (marker-buffer where))
- (goto-char where))
+ (goto-char where))
(reftex-unhighlight 0)))
(defun reftex-select-label-mode ()
"Major mode for selecting a label in a LaTeX document.
This buffer was created with RefTeX.
-It only has a meaningful keymap when you are in the middle of a
+It only has a meaningful keymap when you are in the middle of a
selection process.
To select a label, move the cursor to it and press RET.
Press `?' for a summary of important key bindings.
(defun reftex-select-bib-mode ()
"Major mode for selecting a citation key in a LaTeX document.
This buffer was created with RefTeX.
-It only has a meaningful keymap when you are in the middle of a
+It only has a meaningful keymap when you are in the middle of a
selection process.
In order to select a citation, move the cursor to it and press RET.
Press `?' for a summary of important key bindings.
note (nth 5 cell))
(when (and labels
- (or (eq labels t)
+ (or (eq labels t)
(string= typekey labels)
(string= labels " "))
(or show-commented (null comment)))
(put-text-property from to :data cell)
(when mouse-face
(put-text-property from (1- to)
- 'mouse-face mouse-face))
+ 'mouse-face mouse-face))
(goto-char to)))
((eq (car cell) 'index)
(when font
(setq to (point))
- (put-text-property
+ (put-text-property
(- (point) (length (nth 7 cell))) to
'face index-face)
(goto-char to))
(put-text-property from to :data cell)
(when mouse-face
(put-text-property from (1- to)
- 'mouse-face mouse-face))
+ 'mouse-face mouse-face))
(goto-char to))))
- (if (eq cell here-I-am)
+ (if (eq cell here-I-am)
(setq offset 'attention))
(if (and prev-inserted (eq offset 'attention))
(setq offset prev-inserted))
((listp loc)
(setq pos (text-property-any (point-min) (point-max) :data loc))
(when pos
- (goto-char pos)
+ (goto-char pos)
(throw 'exit t)))
((integerp loc)
(when (<= loc (count-lines (point-min) (point-max)))
(setq truncate-lines t)
;; Find a good starting point
- (reftex-find-start-point
+ (reftex-find-start-point
(point-min) offset reftex-last-data reftex-last-line)
(beginning-of-line 1)
(set (make-local-variable 'reftex-last-follow-point) (point))
(set-buffer selection-buffer)
(use-local-map nil)
(remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t)
- (remove-hook 'post-command-hook
+ (remove-hook 'post-command-hook
'reftex-select-post-command-hook t))
;; Kill the mark overlays
(mapcar (lambda (c) (delete-overlay (nth 1 c)))
(let (b e)
(setq data (get-text-property (point) :data))
(setq last-data (or data last-data))
-
+
(when (and data cb-flag
(not (equal reftex-last-follow-point (point))))
(setq reftex-last-follow-point (point))
- (funcall call-back data reftex-callback-fwd
+ (funcall call-back data reftex-callback-fwd
(not reftex-revisit-to-follow)))
(if data
(setq b (or (previous-single-property-change
(defun reftex-select-read-label ()
"Use minibuffer to read a label to reference, with completion."
(interactive)
- (let ((label (completing-read
+ (let ((label (completing-read
"Label: " (symbol-value reftex-docstruct-symbol)
nil nil reftex-prefix)))
(unless (or (equal label "") (equal label reftex-prefix))
([(up)] . reftex-select-previous)
("f" . reftex-select-toggle-follow)
("\C-m" . reftex-select-accept)
- ([(return)] . reftex-select-accept)
+ ([(return)] . reftex-select-accept)
("q" . reftex-select-quit)
("." . reftex-select-show-insertion-point)
("?" . reftex-select-help))
;; Specific bindings in reftex-select-label-map
(loop for key across "aAcgFlrRstx#%" do
(define-key reftex-select-label-map (vector (list key))
- (list 'lambda '()
+ (list 'lambda '()
"Press `?' during selection to find out about this key."
'(interactive) (list 'throw '(quote myexit) key))))
;; Specific bindings in reftex-select-bib-map
(loop for key across "grRaA" do
(define-key reftex-select-bib-map (vector (list key))
- (list 'lambda '()
+ (list 'lambda '()
"Press `?' during selection to find out about this key."
'(interactive) (list 'throw '(quote myexit) key))))
("m" . reftex-select-mark)
("u" . reftex-select-unmark))
do (define-key reftex-select-bib-map (car x) (cdr x)))
-
+
;;; reftex-sel.el ends here
reftex-toc-include-context
nil ; counter
nil ; commented
- here-I-am
+ here-I-am
"" ; xr-prefix
t ; a toc buffer
))
-
+
(run-hooks 'reftex-display-copied-context-hook)
(message "Building *toc* buffer...done.")
(setq buffer-read-only t))
t
reftex-toc-include-index-entries
reftex-toc-include-file-boundaries)
- (reftex-last-assoc-before-elt
+ (reftex-last-assoc-before-elt
'toc here-I-am
(symbol-value reftex-docstruct-symbol))))
(put 'reftex-toc :reftex-line 3)
(not (get-text-property (point) 'intangible))
(memq reftex-highlight-selection '(cursor both))
(reftex-highlight 2
- (or (previous-single-property-change
+ (or (previous-single-property-change
(min (point-max) (1+ (point))) :data)
(point-min))
(or (next-single-property-change (point) :data)
(interactive "p")
(setq reftex-callback-fwd t)
(or (eobp) (forward-char 1))
- (goto-char (or (next-single-property-change (point) :data)
+ (goto-char (or (next-single-property-change (point) :data)
(point))))
(defun reftex-toc-previous (&optional arg)
"Move to previous selectable item."
With prefix ARG, prompt for a label type and include only labels of
that specific type."
(interactive "P")
- (setq reftex-toc-include-labels
+ (setq reftex-toc-include-labels
(if arg (reftex-query-label-type)
(not reftex-toc-include-labels)))
(reftex-toc-revert))
(defun reftex-toc-rescan (&rest ignore)
"Regenerate the *toc* buffer by reparsing file of section at point."
(interactive)
- (if (and reftex-enable-partial-scans
+ (if (and reftex-enable-partial-scans
(null current-prefix-arg))
(let* ((data (get-text-property (point) :data))
(what (car data))
show-window show-buffer match)
(unless toc (error "Don't know which toc line to visit"))
-
+
(cond
-
+
((eq (car toc) 'toc)
;; a toc entry
(setq match (reftex-toc-find-section toc no-revisit)))
(file (nth 1 toc)))
(if (or (not no-revisit) (reftex-get-buffer-visiting file))
(progn
- (switch-to-buffer-other-window
+ (switch-to-buffer-other-window
(reftex-get-file-buffer-force file nil))
(goto-char (if (eq where 'bof) (point-min) (point-max))))
(message reftex-no-follow-message) nil))))
(looking-at (reftex-make-desperate-section-regexp literal))
(looking-at (concat "\\\\"
(regexp-quote
- (car
- (rassq level
+ (car
+ (rassq level
reftex-section-levels-all)))
"[[{]?"))))
((or (not no-revisit)
(define-key reftex-toc-map (vector (list key)) 'digit-argument))
(define-key reftex-toc-map "-" 'negative-argument)
-(easy-menu-define
+(easy-menu-define
reftex-toc-menu reftex-toc-map
"Menu for Table of Contents buffer"
'("TOC"
["Context" reftex-toc-toggle-context :style toggle
:selected reftex-toc-include-context]
"--"
- ["Follow Mode" reftex-toc-toggle-follow :style toggle
+ ["Follow Mode" reftex-toc-toggle-follow :style toggle
:selected reftex-toc-follow-mode])
"--"
["Help" reftex-toc-show-help t]))
("enumerate" ?i "item:" "~\\ref{%s}" item
(regexp "items?" "Punkte?"))
-
+
("equation" ?e "eq:" "~(\\ref{%s})" t
(regexp "equations?" "eqs?\\." "eqn\\." "Gleichung\\(en\\)?" "Gl\\."))
("eqnarray" ?e "eq:" nil eqnarray-like)
-
+
("figure" ?f "fig:" "~\\ref{%s}" caption
(regexp "figure?[sn]?" "figs?\\." "Abbildung\\(en\\)?" "Abb\\."))
("figure*" ?f nil nil caption)
-
+
("table" ?t "tab:" "~\\ref{%s}" caption
(regexp "tables?" "tab\\." "Tabellen?"))
("table*" ?t nil nil caption)
-
+
("\\footnote[]{}" ?n "fn:" "~\\ref{%s}" 2
(regexp "footnotes?" "Fussnoten?"))
-
+
("any" ?\ " " "~\\ref{%s}" nil)
;; The label macro is hard coded, but it *could* be defined like this:
`?t' should point to a textual citation (citation as a noun).
`?p' should point to a parenthetical citation.")
-(defconst reftex-index-macros-builtin
+(defconst reftex-index-macros-builtin
'((default "Default \\index and \\glossary macros"
(("\\index{*}" "idx" ?i "" nil t)
("\\glossary{*}" "glo" ?g "" nil t)))
(Index-Shortcut "index.sty with \\shortindexingon"
(("\\index[]{*}" 1 ?i "" nil t)
("\\index*[]{*}" 1 ?I "" nil nil)
- ("^[]{*}" 1 ?^ "" texmathp t)
+ ("^[]{*}" 1 ?^ "" texmathp t)
("_[]{*}" 1 ?_ "" texmathp nil))))
"Builtin stuff for reftex-index-macros.
Lower-case symbols correspond to a style file of the same name in the LaTeX
(defgroup reftex nil
"LaTeX label and citation support."
:tag "RefTeX"
- :link '(url-link :tag "Home Page"
+ :link '(url-link :tag "Home Page"
"http://strw.leidenuniv.nl/~dominik/Tools/")
:link '(emacs-commentary-link :tag "Commentary in reftex.el" "reftex.el")
:link '(custom-manual "(reftex)Top")
When active, the *TOC* buffer will always show the section you
are currently working in. Recentering happens whenever Emacs is idle for
more than `reftex-idle-time' seconds.
-This feature can be turned on and off from the menu
+This feature can be turned on and off from the menu
(Ref->Options)."
:group 'reftex-table-of-contents-browser
:type 'boolean)
'(amsmath endnotes fancybox floatfig longtable picinpar
rotating sidecap subfigure supertab wrapfig LaTeX)
"Default label alist specifications. LaTeX should always be the last entry.
-The value of this variable is a list of symbols with associations in the
+The value of this variable is a list of symbols with associations in the
constant `reftex-label-alist-builtin'. Check that constant for a full list
of options."
:group 'reftex-defining-label-environments
(defcustom reftex-section-prefixes '((0 . "part:") (1 . "cha:") (t . "sec:"))
"Prefixes for section labels.
When the label prefix given in an entry in `reftex-label-alist' contains `%S',
-this list is used to determine the correct prefix string depending on the
+this list is used to determine the correct prefix string depending on the
current section level.
The list is an alist, with each entry of the form (KEY . PREFIX)
Possible keys are sectioning macro names like `chapter', section levels
or macro."
:group 'reftex-defining-label-environments
:type '(repeat (cons (symbol) (regexp))))
-
+
(defcustom reftex-special-environment-functions nil
"List of functions to be called when trying to figure out current environment.
These are special functions to detect \"environments\" which do not
(let ((pos (point)) p1)
(save-excursion
;; Search for any of the linguex item macros at the beginning of a line
- (if (re-search-backward
+ (if (re-search-backward
\"^[ \\t]*\\\\(\\\\\\\\\\\\(ex\\\\|a\\\\|b\\\\|c\\\\|d\\\\|e\\\\|f\\\\)g?\\\\.\\\\)\" bound t)
(progn
(setq p1 (match-beginning 1))
nil
;; OK, we got it
(cons \"linguex\" p1)))
- ;; Return nil for not found
+ ;; Return nil for not found
nil))))
3. Tell RefTeX to use this function
(defcustom reftex-vref-is-default nil
"*Non-nil means, the varioref macro \\vref is used as default.
-In the selection buffer, the `v' key toggles the reference macro between
+In the selection buffer, the `v' key toggles the reference macro between
`\\ref' and `\\vref'. The value of this variable determines the default
which is active when entering the selection process.
Instead of nil or t, this may also be a string of type letters indicating
(defcustom reftex-fref-is-default nil
"*Non-nil means, the fancyref macro \\fref is used as default.
-In the selection buffer, the `V' key toggles the reference macro between
+In the selection buffer, the `V' key toggles the reference macro between
`\\ref', `\\fref' and `\\Fref'. The value of this variable determines
the default which is active when entering the selection process.
Instead of nil or t, this may also be a string of type letters indicating
(defcustom reftex-format-ref-function nil
"Function which produces the string to insert as a reference.
-Normally should be nil, because the format to insert a reference can
+Normally should be nil, because the format to insert a reference can
already be specified in `reftex-label-alist'.
This hook also is used by the special commands to insert `\\vref' and `\\fref'
references, so even if you set this, your setting will be ignored by
%i institution %j journal %k key %m month
%n number %o organization %p pages %P first page
%r address %s school %u publisher %t title
-%v volume %y year
+%v volume %y year
%B booktitle, abbreviated %T title, abbreviated
Usually, only %l is needed. The other stuff is mainly for the echo area
display, and for (setq reftex-comment-citations t).
-%< as a special operator kills punctuation and space around it after the
+%< as a special operator kills punctuation and space around it after the
string has been formatted.
Beware that all this only works with BibTeX database files. When
strings.
In order to configure this variable, you can either set
`reftex-cite-format' directly yourself or set it to the SYMBOL of one of
-the predefined styles. The predefined symbols are those which have an
+the predefined styles. The predefined symbols are those which have an
association in the constant `reftex-cite-format-builtin'.
E.g.: (setq reftex-cite-format 'natbib)"
:group 'reftex-citation-support
(defcustom reftex-format-cite-function nil
"Function which produces the string to insert as a citation.
-Normally should be nil, because the format to insert a reference can
+Normally should be nil, because the format to insert a reference can
already be specified in `reftex-cite-format'.
The function will be called with two arguments, the CITATION KEY and the
DEFAULT FORMAT, which is taken from `reftex-cite-format'. The function
:group 'reftex-index-support
:set 'reftex-set-dirty
:type `(list
- (repeat
+ (repeat
:inline t
(list :value ("" "idx" ?a "" nil)
(string :tag "Macro with args")
This is a list with (MACRO-KEY DEFAULT-TAG).
MACRO-KEY: Character identifying an index macro - see `reftex-index-macros'.
-DEFAULT-TAG: This is the tag to be used if the macro requires a TAG argument.
+DEFAULT-TAG: This is the tag to be used if the macro requires a TAG argument.
When this is nil and a TAG is needed, RefTeX will ask for it.
When this is the empty string and the TAG argument of the index
macro is optional, the TAG argument will be omitted."
(defcustom reftex-index-include-context nil
"*Non-nil means, display the index definition context in the index buffer.
-This flag may also be toggled from the index buffer with the `c' key."
+This flag may also be toggled from the index buffer with the `c' key."
:group 'reftex-index-support
:type 'boolean)
argument of a macro. Note that crossref viewing for citations,
references (both ways) and index entries is hard-coded. This variable
is only to configure additional structures for which crossreference
-viewing can be useful. Each entry has the structure
+viewing can be useful. Each entry has the structure
(MACRO-RE SEARCH-RE HIGHLIGHT).
displayed, the echo area will display information about that cross
reference. You can also set the variable to the symbol `window'. In
this case a small temporary window is used for the display.
-This feature can be turned on and off from the menu
+This feature can be turned on and off from the menu
(Ref->Options)."
:group 'reftex-viewing-cross-references
:type '(choice (const :tag "off" nil)
- If an element is the name of an environment variable, its content is used.
- If an element starts with an exclamation mark, it is used as a command
to retrieve the path. A typical command with the kpathsearch library would
- be `!kpsewhich -show-path=.tex'.
+ be `!kpsewhich -show-path=.tex'.
- Otherwise the element itself is interpreted as a path.
Multiple directories can be separated by the system dependent `path-separator'.
Directories ending in `//' or `!!' will be expanded recursively.
- If an element is the name of an environment variable, its content is used.
- If an element starts with an exclamation mark, it is used as a command
to retrieve the path. A typical command with the kpathsearch library would
- be `!kpsewhich -show-path=.bib'.
+ be `!kpsewhich -show-path=.bib'.
- Otherwise the element itself is interpreted as a path.
Multiple directories can be separated by the system dependent `path-separator'.
Directories ending in `//' or `!!' will be expanded recursively.
TEXINPUTS and BIBINPUTS to find TeX files and BibTeX database files.
With this option turned on, it calls an external program specified in the
option `reftex-external-file-finders' instead. As a side effect,
-the variables `reftex-texpath-environment-variables' and
+the variables `reftex-texpath-environment-variables' and
`reftex-bibpath-environment-variables' will be ignored."
:group 'reftex-finding-files
:type 'boolean)
(defcustom reftex-save-parse-info nil
"*Non-nil means, save information gathered with parsing in a file.
The file MASTER.rel in the same directory as MASTER.tex is used to save the
-information. When this variable is t,
+information. When this variable is t,
- accessing the parsing information for the first time in an editing session
will read that file (if available) instead of parsing the document.
- exiting Emacs or killing a buffer in reftex-mode will cause a new version
may require a restart of Emacs in order to become effective."
:group 'reftex-miscellaneous-configurations
:group 'LaTeX
- :type '(choice
+ :type '(choice
(const :tag "No plug-ins" nil)
(const :tag "All possible plug-ins" t)
(list
Cell width(s): 14 6 32
-instead of
+instead of
Cell width(s): 5
((eq language 'cals)
(insert " </row>\n")
(unless (/= (table-get-source-info 'current-row) table-cals-thead-rows)
- (insert (format " </%s>\n" (table-get-source-info 'row-type)))
+ (insert (format " </%s>\n" (table-get-source-info 'row-type)))
(insert (format " <%s valign=\"top\">\n" (table-put-source-info 'row-type "tbody")))))))
(table-put-source-info 'current-row (1+ (table-get-source-info 'current-row)))
(setq row-list (cdr row-list))))
(unless (looking-at "\\s *$")
(save-excursion
(insert ?\n)))
- ;; insert the table
+ ;; insert the table
;; insert the cell contents
(if (null contents-list)
;; single cell
(defun table--put-cell-rear-nonsticky (beg end &optional object)
"Put rear-nonsticky property."
(put-text-property beg end 'rear-nonsticky t object))
-
+
(defun table--put-cell-point-entered/left-property (beg end &optional object)
"Put point-entered/left property."
(put-text-property beg end 'point-entered 'table--point-entered-cell-function object)
;;; texinfmt.el --- format Texinfo files into Info files
-;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993,
+;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993,
;; 1994, 1995, 1996, 1997, 1998, 2000, 2001
;; Free Software Foundation, Inc.
"Show the version of texinfmt.el in the minibuffer.
If optional argument HERE is non-nil, insert info at point."
(interactive "P")
- (let ((version-string
+ (let ((version-string
(format "Version of \`texinfmt.el\': %s" texinfmt-version)))
- (if here
+ (if here
(insert version-string)
(if (interactive-p)
(message "%s" version-string)
(header-text "")
(header-beginning 1)
(header-end 1))
-
-;;; Copy lines between beginning and end of header lines,
+
+;;; Copy lines between beginning and end of header lines,
;;; if any, or else copy the `@setfilename' line, if any.
(save-excursion
(save-restriction
(let ((search-end (save-excursion (forward-line 100) (point))))
(if (or
;; Either copy header text.
- (and
- (prog1
+ (and
+ (prog1
(search-forward tex-start-of-header search-end t)
(forward-line 1)
;; Mark beginning of header.
(setq header-beginning (point)))
- (prog1
+ (prog1
(search-forward tex-end-of-header nil t)
(beginning-of-line)
;; Mark end of header
(setq header-beginning (point))
(forward-line 1)
(setq header-end (point))))
-
- ;; Copy header
+
+ ;; Copy header
(setq header-text
(buffer-substring-no-properties
(min header-beginning region-beginning)
;; Make sure region ends in a newline.
(or (= (preceding-char) ?\n)
(insert "\n"))
-
+
(goto-char (point-min))
(texinfo-mode)
(message "Converting region to Info format...")
;; Insert @include files so `texinfo-raise-lower-sections' can
;; work on them without losing track of multiple
- ;; @raise/@lowersections commands.
+ ;; @raise/@lowersections commands.
(while (re-search-forward "^@include" nil t)
(setq texinfo-command-end (point))
(let ((filename (concat input-directory
(goto-char (point-min))
;; Remove `@setfilename' line from included file, if any,
;; so @setfilename command not duplicated.
- (if (re-search-forward
+ (if (re-search-forward
"^@setfilename" (save-excursion (forward-line 100) (point)) t)
(progn
(beginning-of-line)
;; Insert Info region title text.
(goto-char (point-min))
- (if (search-forward
+ (if (search-forward
"@setfilename" (save-excursion (forward-line 100) (point)) t)
(progn
(setq texinfo-command-end (point))
(let ((arg (texinfo-parse-arg-discard)))
(insert " "
texinfo-region-buffer-name
- " buffer for: `")
+ " buffer for: `")
(insert (file-name-nondirectory (expand-file-name arg)))
(insert "', -*-Text-*-\n")))
;; Else no `@setfilename' line
(insert-buffer-substring input-buffer)
(message "Converting %s to Info format..." (buffer-name input-buffer))
-
+
;; Insert @include files so `texinfo-raise-lower-sections' can
;; work on them without losing track of multiple
- ;; @raise/@lowersections commands.
+ ;; @raise/@lowersections commands.
(goto-char (point-min))
(while (re-search-forward "^@include" nil t)
(setq texinfo-command-end (point))
(goto-char (point-min))
;; Remove `@setfilename' line from included file, if any,
;; so @setfilename command not duplicated.
- (if (re-search-forward
+ (if (re-search-forward
"^@setfilename"
(save-excursion (forward-line 100) (point)) t)
(progn
"^@"
"\\("
;; add "itemize\\|" (from experiment of 2001 Nov 28)
- ;; because of a problem with @end itemize@refill
+ ;; because of a problem with @end itemize@refill
;; I don't know if this causes other problems.
;; I suspect itemized lists don't get filled properly and a
;; more precise fix is required. Bob
(defun texinfo-append-refill ()
"Append @refill at end of each paragraph that should be filled.
-Do not append @refill to paragraphs within @example and similar environments.
+Do not append @refill to paragraphs within @example and similar environments.
Do not append @refill to paragraphs containing @w{TEXT} or @*."
;; It is necessary to append @refill before other processing because
;; the other processing removes information that tells Texinfo
;; whether the text should or should not be filled.
-
+
(while (< (point) (point-max))
(let ((refill-blank-lines "^[ \t\n]*$")
(case-fold-search nil)) ; Don't confuse @TeX and @tex....
(beginning-of-line)
;; 1. Skip over blank lines;
- ;; skip over lines beginning with @-commands,
+ ;; skip over lines beginning with @-commands,
;; but do not skip over lines
;; that are no-refill environments such as @example or
;; that begin with within-paragraph @-commands such as @code.
(while (and (looking-at (concat "^@\\|^\\\\\\|" refill-blank-lines))
- (not (looking-at
+ (not (looking-at
(concat
- "\\("
+ "\\("
texinfo-no-refill-regexp
- "\\|"
+ "\\|"
texinfo-part-of-para-regexp
"\\)")))
(< (point) (point-max)))
;; with @<newline> followed by a newline.
(if (or
(>= (point) (point-max))
- (re-search-forward
- "@w{\\|@\\*\\|@\n\n"
+ (re-search-forward
+ "@w{\\|@\\*\\|@\n\n"
(save-excursion
(forward-paragraph)
(forward-line 1)
(point)) t))
;; Go to end of paragraph and do nothing.
- (forward-paragraph)
+ (forward-paragraph)
;; 4. Else go to end of paragraph and insert @refill
(forward-paragraph)
(forward-line -1)
;;; Handle `@raisesections' and `@lowersections' commands
;; These commands change the hierarchical level of chapter structuring
-;; commands.
-;;
+;; commands.
+;;
;; @raisesections changes @subsection to @section,
;; @section to @chapter,
;; etc.
;;
;; Repeated @raisesections/@lowersections continue to raise or lower
;; the heading level.
-;;
+;;
;; An @lowersections command cancels an @raisesections command, and
;; vice versa.
;;
;; @section produce chapter headings).
(defun texinfo-raise-lower-sections ()
- "Raise or lower the hierarchical level of chapters, sections, etc.
+ "Raise or lower the hierarchical level of chapters, sections, etc.
This function acts according to `@raisesections' and `@lowersections'
commands in the Texinfo file.
An attempt to raise above `chapters' reproduces chapter commands; an
attempt to lower below subsubsections reproduces subsubsection
commands."
-
+
;; `texinfo-section-types-regexp' is defined in `texnfo-upd.el';
;; it is a regexp matching chapter, section, other headings
;; (but not the top node).
(let (type (level 0))
- (while
+ (while
(re-search-forward
(concat
"\\(\\(^@\\(raise\\|lower\\)sections\\)\\|\\("
nil t)
(beginning-of-line)
(save-excursion (setq type (read (current-buffer))))
- (cond
-
+ (cond
+
;; 1. Increment level
((eq type '@raisesections)
(setq level (1+ level))
(delete-region
(point) (save-excursion (forward-line 1) (point))))
-
+
;; 2. Decrement level
((eq type '@lowersections)
(setq level (1- level))
(delete-region
(point) (save-excursion (forward-line 1) (point))))
-
+
;; Now handle structuring commands
((cond
-
+
;; 3. Raise level when positive
((> level 0)
(let ((count level)
(setq count (1- count)))
(kill-word 1)
(insert (symbol-name new-level))))
-
+
;; 4. Do nothing except move point when level is zero
((= level 0) (forward-line 1))
-
+
;; 5. Lower level when positive
((< level 0)
(let ((count level)
(@majorheading . @majorheading)
(@chapheading . @chapheading)
(@appendix . @appendix)
-
+
(@section . @chapter)
(@unnumberedsec . @unnumbered)
(@heading . @chapheading)
(@appendixsec . @appendix)
-
+
(@subsection . @section)
(@unnumberedsubsec . @unnumberedsec)
(@subheading . @heading)
(@appendixsubsec . @appendixsec)
-
+
(@subsubsection . @subsection)
(@unnumberedsubsubsec . @unnumberedsubsec)
(@subsubheading . @subheading)
higher types.")
(defvar texinfo-lowersections-alist
- '((@chapter . @section)
+ '((@chapter . @section)
(@unnumbered . @unnumberedsec)
(@centerchap . @unnumberedsec)
(@majorheading . @heading)
(@chapheading . @heading)
(@appendix . @appendixsec)
-
+
(@section . @subsection)
(@unnumberedsec . @unnumberedsubsec)
(@heading . @subheading)
(@appendixsec . @appendixsubsec)
-
+
(@subsection . @subsubsection)
(@unnumberedsubsec . @unnumberedsubsubsec)
(@subheading . @subsubheading)
(@appendixsubsec . @appendixsubsubsec)
-
+
(@subsubsection . @subsubsection) ; Cannot go lower.
(@unnumberedsubsubsec . @unnumberedsubsubsec)
(@subsubheading . @subsubheading)
;; These are the single-character accent commands: @^ @` @' @" @= @~
;; In Info, they are simply quoted and the @ deleted.
;; Other single-character commands:
- ;; @* forces a line break,
+ ;; @* forces a line break,
;; @- is a discretionary hyphenation point; does nothing in Info.
;; @<space>, @<tab>, @<newline> each produce a single space,
;; unless followed by a newline.
- ;;
+ ;;
;; Old version 2.34 expression: (looking-at "[@{}^'` *\"?!]")
(if (looking-at "[@{}^'`\"=~ \t\n*?!-]")
;; @*, causes a line break.
- (cond
+ (cond
;; @*, a line break
((= (following-char) ?*)
;; remove command
;; insert return if not at end of line;
;; else line is already broken.
(if (not (= (following-char) ?\n))
- (insert ?\n)))
+ (insert ?\n)))
;; @-, deleted
((= (following-char) ?-)
(delete-region (1- (point)) (1+ (point))))
;; insert single space if not at end of line;
;; else line is already broken.
(if (not (= (following-char) ?\n))
- (insert ? )))
+ (insert ? )))
((= (following-char) ?\t)
(delete-region (1- (point)) (1+ (point)))
;; insert single space if not at end of line;
;; Handle let aliasing
(setq texinfo-command-name
(let (trial
- (cmdname
+ (cmdname
(buffer-substring-no-properties
(1+ texinfo-command-start) texinfo-command-end)))
(while (setq trial (assoc cmdname texinfo-alias-list))
(if enclosure-type
(progn
(insert
- (car (car (cdr enclosure-type)))
+ (car (car (cdr enclosure-type)))
(texinfo-parse-arg-discard)
(car (cdr (car (cdr enclosure-type)))))
(goto-char texinfo-command-start))
(let ((cmd (get texinfo-command-name 'texinfo-format)))
(if cmd (funcall cmd) (texinfo-unsupported)))))))
-
+
(cond (texinfo-stack
(goto-char (nth 2 (car texinfo-stack)))
(error "Unterminated @%s" (car (car texinfo-stack)))))
;; Remove excess whitespace
(whitespace-cleanup))
-(defvar texinfo-copying-text ""
+(defvar texinfo-copying-text ""
"Text of the copyright notice and copying permissions.")
(defun texinfo-copying ()
- "Copy the copyright notice and copying permissions from the Texinfo file,
-as indicated by the @copying ... @end copying command;
+ "Copy the copyright notice and copying permissions from the Texinfo file,
+as indicated by the @copying ... @end copying command;
insert the text with the @insertcopying command."
(let ((beg (progn (beginning-of-line) (point)))
(end (progn (re-search-forward "^@end copying[ \t]*\n") (point))))
(delete-region beg end)))
(defun texinfo-insertcopying ()
- "Insert the copyright notice and copying permissions from the Texinfo file,
+ "Insert the copyright notice and copying permissions from the Texinfo file,
which are indicated by the @copying ... @end copying command."
(insert (concat "\n" texinfo-copying-text)))
(defun texinfo-parse-line-arg ()
"Return argument of @-command as string.
-Argument is separated from command either by a space or by a brace.
+Argument is separated from command either by a space or by a brace.
If a space, return rest of line, with beginning and ending white
space removed. If a brace, return string between braces.
Leave point after argument."
args)
(search-forward "{")
(save-excursion
- (texinfo-format-expand-region
+ (texinfo-format-expand-region
(point)
(save-excursion (up-list 1) (1- (point)))))
;; The following does not handle cross references of the form:
;; `@xref{bullet, , @code{@@bullet}@{@}}.' because the
;; re-search-forward finds the first right brace after the second
- ;; comma.
+ ;; comma.
(while (/= (preceding-char) ?\})
(skip-chars-forward " \t\n")
(setq beg (point))
;; Only `texinfo-format-buffer' handles @setfilename with this
;; definition; `texinfo-format-region' handles @setfilename, if any,
-;; specially.
+;; specially.
(put 'setfilename 'texinfo-format 'texinfo-format-setfilename)
(defun texinfo-format-setfilename ()
(texinfo-parse-arg-discard))
(put 'anchor 'texinfo-format 'texinfo-anchor)
(defun texinfo-anchor ()
- (let (anchor-string
+ (let (anchor-string
(here (- (point) 7)) ; save location of beginning of `@anchor'
(arg (texinfo-parse-arg-discard)))
(if (looking-at " ") ; since a space may be left after -discard
(delete-char 1))
- (forward-paragraph)
+ (forward-paragraph)
(let ((end (point)))
- (if (save-excursion
+ (if (save-excursion
(backward-word 1)
(search-forward "@refill" end t))
(setq anchor-string "@anchor-yes-refill")
;; The @detailmenu should be removed eventually.
;; According to Karl Berry, 31 August 1996:
-;;
+;;
;; You don't like, I don't like it. I agree, it would be better just to
;; fix the bug [in `makeinfo']. .. At this point, since inserting those
;; two commands in the Elisp fn is trivial, I don't especially want to
;; expend more effort...
-;;
+;;
;; I added a couple sentences of documentation to the manual (putting the
;; blame on makeinfo where it belongs :-().
\f
;;; URL Reference: @uref
-;; @uref produces a reference to a uniform resource locator (URL).
-;; It takes one mandatory argument, the URL, and one optional argument,
-;; the text to display (the default is the URL itself).
+;; @uref produces a reference to a uniform resource locator (URL).
+;; It takes one mandatory argument, the URL, and one optional argument,
+;; the text to display (the default is the URL itself).
(put 'uref 'texinfo-format 'texinfo-format-uref)
(defun texinfo-format-uref ()
"Format URL and optional URL-TITLE.
-Insert ` ... ' around URL if no URL-TITLE argument;
+Insert ` ... ' around URL if no URL-TITLE argument;
otherwise, insert URL-TITLE followed by URL in parentheses."
(let ((args (texinfo-format-parse-args)))
(texinfo-discard-command)
- ;; if url-title
+ ;; if url-title
(if (nth 1 args)
(insert (nth 1 args) " (" (nth 0 args) ")")
(insert "`" (nth 0 args) "'"))
\f
;;; @kbdinputstyle, @vskip, headings & footings
;; These commands for not for Info and should never
-;; appear in an Info environment; but if they do,
-;; this causes them to be discarded.
+;; appear in an Info environment; but if they do,
+;; this causes them to be discarded.
;; @kbdinputstyle
(put 'kbdinputstyle 'texinfo-format 'texinfo-discard-line-with-args)
\f
;;; @documentdescription ... @end documentdescription
;; This command is for HTML output and should never
-;; appear in an Info environment; but if it does,
-;; this causes it to be discarded.
+;; appear in an Info environment; but if it does,
+;; this causes it to be discarded.
(put 'documentdescription 'texinfo-format 'texinfo-format-documentdescription)
(defun texinfo-format-documentdescription ()
;; This command is followed immediately by a left brace, then by the text of
;; the footnote, and then by a terminating right brace. The
;; template for a footnote is:
-;;
+;;
;; @footnote{TEXT}
;;
;; Info has two footnote styles:
-;;
+;;
;; * In the End of node style, all the footnotes for a single node
;; are placed at the end of that node. The footnotes are
;; separated from the rest of the node by a line of dashes with
;; the word `Footnotes' within it.
-;;
+;;
;; * In the Separate node style, all the footnotes for a single node
;; are placed in an automatically constructed node of their own.
;; @footnotestyle separate
;; or
;; @footnotestyle end
-;;
+;;
;; The default is separate
-(defvar texinfo-footnote-style "separate"
+(defvar texinfo-footnote-style "separate"
"Footnote style, either separate or end.")
(put 'footnotestyle 'texinfo-format 'texinfo-footnotestyle)
(forward-line -1))
;; two cases: for the first footnote, we must insert a node header;
- ;; for the second and subsequent footnotes, we need only insert
+ ;; for the second and subsequent footnotes, we need only insert
;; the text of the footnote.
(if (save-excursion
(put 'enumerate 'texinfo-format 'texinfo-enumerate)
(defun texinfo-enumerate ()
(texinfo-push-stack
- 'enumerate
+ 'enumerate
(progn (skip-chars-forward " \t")
(if (eolp)
1
(setcar (cdr (car texinfo-stack))
(make-symbol
(char-to-string
- (1+
+ (1+
(string-to-char enumerating-symbol))))))
(t
(error
(put 'table 'texinfo-format 'texinfo-table)
(defun texinfo-table ()
- (texinfo-push-stack
- 'table
+ (texinfo-push-stack
+ 'table
(progn (skip-chars-forward " \t")
(if (eolp)
"@asis"
;;
;; Long lines of text are filled within columns.
;;
-;; Using the Emacs Lisp formatter, texinfmt.el,
+;; Using the Emacs Lisp formatter, texinfmt.el,
;; the whitespace between columns can be increased by setting
;; `texinfo-extra-inter-column-width' to a value greater than 0. By default,
;; there is at least one blank space between columns.
;;
;; The Emacs Lisp formatter, texinfmt.el, ignores the following four
;; commands that are defined in texinfo.tex for printed output.
-;;
+;;
;; @multitableparskip,
;; @multitableparindent,
;; @multitablecolmargin,
;; How @multitable works.
;; =====================
-;;
+;;
;; `texinfo-multitable' reads the @multitable line and determines from it
-;; how wide each column should be.
-;;
+;; how wide each column should be.
+;;
;; Also, it pushes this information, along with an identifying symbol,
;; onto the `texinfo-stack'. At the @end multitable command, the stack
;; is checked for its matching @multitable command, and then popped, or
;; else an error is signaled. Also, this command pushes the location of
;; the start of the table onto the stack.
-;;
+;;
;; `texinfo-end-multitable' checks the `texinfo-stack' that the @end
;; multitable truly is ending a corresponding beginning, and if it is,
;; pops the stack.
-;;
-;; `texinfo-multitable-widths' is called by `texinfo-multitable'.
+;;
+;; `texinfo-multitable-widths' is called by `texinfo-multitable'.
;; The function returns a list of the widths of each column in a
;; multi-column table, based on the information supplied by the arguments
;; to the @multitable command (by arguments, I mean the text on the rest
;; of the @multitable line, not the remainder of the multi-column table
;; environment).
-;;
+;;
;; `texinfo-multitable-item' formats a row within a multicolumn table.
;; This command is executed when texinfmt sees @item inside @multitable.
;; Cells in row are separated by `@tab's. Widths of cells are specified
;; by the arguments in the @multitable line. Cells are filled. All cells
;; are made to be the same height by padding their bottoms, as needed,
;; with blanks.
-;;
-;; `texinfo-multitable-extract-row' is called by `texinfo-multitable-item'.
+;;
+;; `texinfo-multitable-extract-row' is called by `texinfo-multitable-item'.
;; This function returns the text in a multitable row, as a string.
;; The start of a row is marked by an @item and the end of row is the
;; beginning of next @item or beginning of the @end multitable line.
;; Cells within a row are separated by @tab.
-;;
+;;
;; Note that @tab, the cell separators, are not treated as independent
;; Texinfo commands.
Long lines of text are filled within columns.
-Using the Emacs Lisp formatter, texinfmt.el,
+Using the Emacs Lisp formatter, texinfmt.el,
the whitespace between columns can be increased by setting
`texinfo-extra-inter-column-width' to a value greater than 0. By default,
there is at least one blank space between columns.
;; @multitable {Column 1 template} {Column 2} {Column 3 example}
;; Place point before first argument
(skip-chars-forward " \t")
- (cond
+ (cond
;; Check for common misspelling
((looking-at "@columnfraction ")
(error "In @multitable, @columnfractions misspelled"))
\f
;;; @timestamp{}
-;; Produce `Day Month Year Hour:Min' style of output.
+;; Produce `Day Month Year Hour:Min' style of output.
;; eg `1 Jan 1900 13:52'
(put 'timestamp 'texinfo-format 'texinfo-format-timestamp)
;; command for Info, but not for TeX. A command defined using
;; `@definfoenclose' marks text by enclosing it in strings that precede
;; and follow the text.
-;;
+;;
;; Presumably, if you define a command with `@definfoenclose` for Info,
;; you will also define the same command in the TeX definitions file,
;; `texinfo.tex' in a manner appropriate for typesetting.
-;;
+;;
;; Write a `@definfoenclose' command on a line and follow it with three
;; arguments separated by commas (commas are used as separators in an
;; `@node' line in the same way). The first argument to
;; If you do a @definfoenclose{} on the name of a pre-defined macro (such
;; as @emph{}, @strong{}, @tt{}, or @i{}) the enclosure definition will
;; override the built-in definition.
-;;
+;;
;; An enclosure command defined this way takes one argument in braces.
;;
;; For example, you can write:
;; before and `\\' after the argument to `@phoo'. You can then write
;; `@phoo{bar}' wherever you want `//bar\\' highlighted in Info.
;;
-;; Also, for TeX formatting, you could write
+;; Also, for TeX formatting, you could write
;;
;; @iftex
;; @global@let@phoo=@i
Enclose the verbatim text, including the delimiters, in braces. Print
text exactly as written (but not the delimiters) in a fixed-width.
-For example, @verb\{|@|\} results in @ and
+For example, @verb\{|@|\} results in @ and
@verb\{+@'e?`!`+} results in @'e?`!`."
(let ((delimiter (buffer-substring-no-properties
\f
;;; @kbd
-;; Inside of @example ... @end example and similar environments,
+;; Inside of @example ... @end example and similar environments,
;; @kbd does nothing; but outside of such environments, it places
;; single quotation marks around its argument.
"Place single quote marks around arg, except in @example and similar."
;; Search forward for @end example closer than an @example.
;; Can stop search at nearest @node or texinfo-section-types-regexp
- (let* ((stop
+ (let* ((stop
(save-excursion
(re-search-forward
(concat "^@node\\|\\(" texinfo-section-types-regexp "\\)")
(point)))
(insert "INFO-DIR-SECTION " str "\n")))
\f
-;;; @cartouche
+;;; @cartouche
;; The @cartouche command is a noop in Info; in a printed manual,
;; it makes a box with rounded corners.
(make-string
(- fill-column
(save-excursion
- (end-of-line)
+ (end-of-line)
(skip-chars-backward " \t")
(delete-region (point) (progn (end-of-line) (point)))
- (current-column)))
+ (current-column)))
? )))))
\f
;;; Refilling and indenting: @refill, @paragraphindent, @noindent
;;; Indent only those paragraphs that are refilled as a result of an
-;;; @refill command.
+;;; @refill command.
;; * If the value is `asis', do not change the existing indentation at
;; the starts of paragraphs.
Default is to leave paragraph indentation as is."
(texinfo-discard-command)
(let ((position (point-marker)))
- (forward-paragraph -1)
+ (forward-paragraph -1)
(if (looking-at "[ \t\n]*$") (forward-line 1))
;; Do not indent if an entry in a list, table, or deffn,
;; or if paragraph is preceded by @noindent.
;; Otherwise, indent
- (cond
+ (cond
;; delete a @noindent line and do not indent paragraph
((save-excursion (forward-line -1)
- (looking-at "^@noindent"))
+ (looking-at "^@noindent"))
(forward-line -1)
(delete-region (point) (progn (forward-line 1) (point))))
;; do nothing if "asis"
((equal texinfo-paragraph-indent "asis"))
;; do no indenting in list, etc.
- ((> texinfo-stack-depth 0))
+ ((> texinfo-stack-depth 0))
;; otherwise delete existing whitespace and indent
- (t
+ (t
(delete-region (point) (progn (skip-chars-forward " \t") (point)))
(insert (make-string texinfo-paragraph-indent ? ))))
- (forward-paragraph 1)
+ (forward-paragraph 1)
(forward-line -1)
(end-of-line)
;; Do not fill a section title line with asterisks, hyphens, etc. that
(paragraph-separate
(concat paragraph-separate "\\|[-=.]+\\|\\*\\*+"))
(previous-paragraph-start paragraph-start)
- (paragraph-start
+ (paragraph-start
(concat paragraph-start "\\|[-=.]+\\|\\*\\*+")))
(unwind-protect
(fill-paragraph nil)
(goto-char position)))
(put 'noindent 'texinfo-format 'texinfo-noindent)
-(defun texinfo-noindent ()
- (save-excursion
+(defun texinfo-noindent ()
+ (save-excursion
(forward-paragraph 1)
(if (search-backward "@refill"
(save-excursion (forward-line -1) (point)) t)
(fset index-formatting-command
(list 'lambda 'nil
- (list 'texinfo-index
+ (list 'texinfo-index
(list 'quote index-alist-name))))))
\f
;; See the `texinfo-accent-commands' variable
;; in the section for `texinfo-append-refill'.
-;; Also, see the defun for `texinfo-format-scan'
+;; Also, see the defun for `texinfo-format-scan'
;; for single-character accent commands.
;; Command Info output Name
;; Note: The defun texinfo-format-scan
;; looks at "[@{}^'`\",=~ *?!-]"
-;; In the case of @*, a line break is inserted;
+;; In the case of @*, a line break is inserted;
;; in the other cases, the characters are simply quoted and the @ is deleted.
;; Thus, `texinfo-format-scan' handles the following
;; single-character accent commands: @^ @` @' @" @, @- @= @~
;; (defun texinfo-format-circumflex-accent ()
;; (texinfo-discard-command)
;; (insert "^"))
-;;
+;;
;; @` ==> ` grave accent
;; (put '\` 'texinfo-format 'texinfo-format-grave-accent)
;; (defun texinfo-format-grave-accent ()
;; (texinfo-discard-command)
;; (insert "\`"))
-;;
+;;
;; @' ==> ' acute accent
;; (put '\' 'texinfo-format 'texinfo-format-acute-accent)
;; (defun texinfo-format-acute-accent ()
;; (texinfo-discard-command)
;; (insert "'"))
-;;
+;;
;; @" ==> " umlaut accent
;; (put '\" 'texinfo-format 'texinfo-format-umlaut-accent)
;; (defun texinfo-format-umlaut-accent ()
;; (defun texinfo-format-overbar-accent ()
;; (texinfo-discard-command)
;; (insert "="))
-;;
+;;
;; @~ ==> ~ tilde accent
;; (put '~ 'texinfo-format 'texinfo-format-tilde-accent)
;; (defun texinfo-format-tilde-accent ()
;; In Info, `Category: name ARGS'
;; In index: name: node. line#.
;;
-;; @defvr category name
+;; @defvr category name
;; In Info, `Category: name'
;; In index: name: node. line#.
;;
;; Generalized typed-function-like or typed-variable-like entity:
;; @deftypefn category data-type name args...
;; In Info, `Category: data-type name args...'
-;; @deftypevr category data-type name
+;; @deftypevr category data-type name
;; In Info, `Category: data-type name'
;; In index: name: node. line#.
;;
;; Specialized typed-function-like or typed-variable-like entity:
;; @deftypefun data-type name args...
;; In Info, `Function: data-type name ARGS'
-;; In index: name: node. line#.
+;; In index: name: node. line#.
;;
-;; @deftypevar data-type name
+;; @deftypevar data-type name
;; In Info, `Variable: data-type name'
;; In index: name: node. line#. but include args after name!?
;;
-;; Generalized object oriented entity:
+;; Generalized object oriented entity:
;; @defop category class name args...
;; In Info, `Category on class: name ARG'
;; In index: name on class: node. line#.
;;
-;; @defcv category class name
+;; @defcv category class name
;; In Info, `Category of class: name'
;; In index: name of class: node. line#.
;;
;; Specialized object oriented entity:
-;; @defmethod class name args...
+;; @defmethod class name args...
;; In Info, `Method on class: name ARGS'
;; In index: name on class: node. line#.
;;
;; Generalized typed-function-like or typed-variable-like entity:
;; @deftypefn category data-type name args...
;; In Info, `Category: data-type name args...'
- ;; @deftypevr category data-type name
+ ;; @deftypevr category data-type name
;; In Info, `Category: data-type name'
;; Note: args in lower case, unless modified in command line.
(let ((category (car parsed-args))
;; Specialized typed-function-like or typed-variable-like entity:
;; @deftypefun data-type name args...
;; In Info, `Function: data-type name ARGS'
- ;; @deftypevar data-type name
+ ;; @deftypevar data-type name
;; In Info, `Variable: data-type name'
;; Note: args in lower case, unless modified in command line.
;; Use cdr of texinfo-defun-type to determine category:
(put 'defop 'texinfo-deffn-formatting-property 'texinfo-format-defop)
(put 'defopx 'texinfo-deffn-formatting-property 'texinfo-format-defop)
(defun texinfo-format-defop (parsed-args)
- ;; Generalized object oriented entity:
+ ;; Generalized object oriented entity:
;; @defop category class name args...
;; In Info, `Category on class: name ARG'
;; Note: args in upper case; use of `on'
(put 'defcv 'texinfo-deffn-formatting-property 'texinfo-format-defcv)
(put 'defcvx 'texinfo-deffn-formatting-property 'texinfo-format-defcv)
(defun texinfo-format-defcv (parsed-args)
- ;; Generalized object oriented entity:
- ;; @defcv category class name
+ ;; Generalized object oriented entity:
+ ;; @defcv category class name
;; In Info, `Category of class: name'
;; Note: args in upper case; use of `of'
(let ((category (car parsed-args))
(put 'defmethodx 'texinfo-deffn-formatting-property 'texinfo-format-defmethod)
(defun texinfo-format-defmethod (parsed-args)
;; Specialized object oriented entity:
- ;; @defmethod class name args...
+ ;; @defmethod class name args...
;; In Info, `Method on class: name ARGS'
;; Note: args in upper case; use of `on'
;; Use cdr of texinfo-defun-type to determine category:
;; line number. Depending on the which command is used, the entry is
;; formatted differently:
;;
-;; @defun,
-;; @defmac,
-;; @defspec,
-;; @defvar,
-;; @defopt all use their 1st argument as the entry-proper
+;; @defun,
+;; @defmac,
+;; @defspec,
+;; @defvar,
+;; @defopt all use their 1st argument as the entry-proper
;;
-;; @deffn,
-;; @defvr,
-;; @deftp
+;; @deffn,
+;; @defvr,
+;; @deftp
;; @deftypefun
;; @deftypevar all use their 2nd argument as the entry-proper
;;
-;; @deftypefn,
-;; @deftypevr both use their 3rd argument as the entry-proper
+;; @deftypefn,
+;; @deftypevr both use their 3rd argument as the entry-proper
;;
-;; @defmethod uses its 2nd and 1st arguments as an entry-proper
+;; @defmethod uses its 2nd and 1st arguments as an entry-proper
;; formatted: NAME on CLASS
-;; @defop uses its 3rd and 2nd arguments as an entry-proper
+;; @defop uses its 3rd and 2nd arguments as an entry-proper
;; formatted: NAME on CLASS
-;;
+;;
;; @defivar uses its 2nd and 1st arguments as an entry-proper
;; formatted: NAME of CLASS
;;
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
- (cons
+ (cons
;; Three elements: entry-proper, node-name, line-number
(list
(car parsed-args)
(put 'deftypefunx 'texinfo-defun-indexing-property 'texinfo-index-deffn)
(put 'deftypevar 'texinfo-defun-indexing-property 'texinfo-index-deffn)
(put 'deftypevarx 'texinfo-defun-indexing-property 'texinfo-index-deffn)
-(defun texinfo-index-deffn (parsed-args)
+(defun texinfo-index-deffn (parsed-args)
;; use 2nd parsed-arg as entry-proper
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
- (cons
+ (cons
;; Three elements: entry-proper, node-name, line-number
(list
(car (cdr parsed-args))
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
- (cons
+ (cons
;; Three elements: entry-proper, node-name, line-number
(list
(car (cdr (cdr parsed-args)))
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
- (cons
+ (cons
;; Three elements: entry-proper, node-name, line-number
(list
- (format "%s on %s"
+ (format "%s on %s"
(car (cdr parsed-args))
(car parsed-args))
texinfo-last-node
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
- (cons
+ (cons
;; Three elements: entry-proper, node-name, line-number
(list
- (format "%s on %s"
+ (format "%s on %s"
(car (cdr (cdr parsed-args)))
(car (cdr parsed-args)))
texinfo-last-node
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
- (cons
+ (cons
;; Three elements: entry-proper, node-name, line-number
(list
- (format "%s of %s"
+ (format "%s of %s"
(car (cdr parsed-args))
(car parsed-args))
texinfo-last-node
;; `index-list' will be texinfo-findex or the like
(let ((index-list (get texinfo-command-name 'texinfo-defun-index)))
(set index-list
- (cons
+ (cons
;; Three elements: entry-proper, node-name, line-number
(list
- (format "%s of %s"
+ (format "%s of %s"
(car (cdr (cdr parsed-args)))
(car (cdr parsed-args)))
texinfo-last-node
;; @set FLAG, then the text is not formatted; it is ignored. @ifclear
;; is the opposite of @ifset.
-;; If a flag is set to a string with @set FLAG,
+;; If a flag is set to a string with @set FLAG,
;; replace @value{FLAG} with the string.
-;; If a flag with a value is cleared,
-;; @value{FLAG} is invalid,
+;; If a flag with a value is cleared,
+;; @value{FLAG} is invalid,
;; as if there had never been any @set FLAG previously.
(put 'clear 'texinfo-format 'texinfo-clear)
'flag-set)
(get (car (read-from-string arg)) 'texinfo-set-value))
(insert (get (car (read-from-string arg)) 'texinfo-set-value)))
- ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
+ ((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
'flag-cleared)
(insert (format "{No value for \"%s\"}" arg)))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp) nil)
(point))))
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
nil)
- ;; In this case flag is neither set nor cleared.
+ ;; In this case flag is neither set nor cleared.
;; Act as if set, i.e. do nothing.
()))))
())
((eq (get (car (read-from-string arg)) 'texinfo-whether-setp)
nil)
- ;; In this case flag is neither set nor cleared.
+ ;; In this case flag is neither set nor cleared.
;; Act as if clear, i.e. do nothing.
()))))
\f
"Syntactic keywords to catch comment delimiters in `texinfo-mode'.")
(defconst texinfo-environments
- '("cartouche" "copying" "defcv" "deffn" "defivar" "defmac"
+ '("cartouche" "copying" "defcv" "deffn" "defivar" "defmac"
"defmethod" "defop" "defopt" "defspec" "deftp" "deftypefn"
"deftypefun" "deftypevar" "deftypevr" "defun" "defvar"
"defvr" "description" "detailmenu" "direntry" "display"
(if (null auto-fill-inhibit-regexp)
prevent-filling
(concat auto-fill-inhibit-regexp "\\|" prevent-filling)))))
-
+
\f
;;; Insert string commands
(if (memq (char-syntax (preceding-char)) '(?\( ?> ?\ ))
texinfo-open-quote
texinfo-close-quote)))))
-
+
;; The following texinfo-insert-@end command not only inserts a SPC
;; after the @end, but tries to find out what belongs there. It is
;; not very smart: it does not understand nested lists.
Lines with structuring commands beginning in them are displayed in
another buffer named `*Occur*'. In that buffer, you can move point to
-one of those lines and then use
+one of those lines and then use
\\<occur-mode-map>\\[occur-mode-goto-occurrence],
to jump to the corresponding spot in the Texinfo source file."
current-location)
(save-excursion
(end-of-line) ; so as to find section on current line
- (if (re-search-backward
+ (if (re-search-backward
;; do not require `texinfo-section-types-regexp' in texnfo-upd.el
"^@\\(chapter \\|sect\\|subs\\|subh\\|unnum\\|major\\|chapheading \\|heading \\|appendix\\)"
nil t)
(indent-to-column (+ (current-column) (* 4 (- level 2))))
(beginning-of-line))))
;; Third, go to line corresponding to location in source file
- ;; potential bug: two exactly similar `current-location' lines ...
+ ;; potential bug: two exactly similar `current-location' lines ...
(goto-char (point-min))
(re-search-forward current-location nil t)
(beginning-of-line)
(concat "[ \t\n\f]\\|" paragraph-start))
(set (make-local-variable 'indent-line-function) 'indent-to-left-margin)
(run-hooks 'paragraph-indent-text-mode-hook))
-
+
(defalias 'indented-text-mode 'text-mode)
;; This can be made a no-op once all modes that use text-mode-hook
mode, the item for the mode SYMBOL is looked up in the alist instead."
:group 'tildify
:type '(repeat (cons symbol (choice string symbol))))
-
+
(defcustom tildify-ignored-environments-alist
'((latex-mode
("\\\\\\\\" . "") ; do not remove this
;; No ignored environments, tildify directly
(tildify-tildify beg end ask)))
(message (format "%d spaces replaced." tildify-count)))
-
+
;;;###autoload
(defun tildify-buffer ()
"Add hard spaces in the current buffer.
(symbolp alist))
(tildify-mode-alist mode-alist alist)
alist)))
-
+
(defun tildify-find-env (regexp)
"Find environment using REGEXP.
Return regexp for the end of the environment or nil if no environment was