+2000-11-22 Sam Steingold <sds@gnu.org>
+
+ * simple.el (delete-trailing-whitespace): New interactive function.
+ * progmodes/ada-mode.el (ada-mode): Use it instead of
+ `ada-remove-trailing-spaces'
+ (ada-remove-trailing-spaces): Removed.
+ * textmodes/two-column.el (2C-merge): Recommend it in the doc.
+ * textmodes/picture.el (picture-mode-exit): Call it instead of
+ `picture-clean'.
+ (picture-clean): Removed.
+
2000-11-22 Gerd Moellmann <gerd@gnu.org>
* frame.el (show-cursor-in-non-selected-windows): Doc fix.
* recentf.el (recentf-menu-items-for-commands)
(recentf-make-menu-items, recentf-make-menu-item)
(recentf-filter-changer): Added :help and :active menu-item properties.
-
+
(recentf-build-dir-rules, recentf-dump-variable)
(recentf-edit-list, recentf-open-files-item)
(recentf-open-files): Replaced unnecessary `mapcar' with new
built-in `mapc'.
-
+
2000-11-23 Miles Bader <miles@gnu.org>
* faces.el (menu): Make inverse-video on ttys too.
2000-11-22 Andre Spiegel <spiegel@gnu.org>
* ediff-util.el (ediff-file-checked-out-p)
- (ediff-file-checked-in-p): Call vc-state instead of
+ (ediff-file-checked-in-p): Call vc-state instead of
vc-locking-user, which no longer exists.
* emulation/viper-util.el (viper-file-checked-in-p): Same as above.
2000-11-22 Miles Bader <miles@gnu.org>
- * textmodes/refill.el (refill-adjust-ignorable-overlay)
+ * textmodes/refill.el (refill-adjust-ignorable-overlay)
(refill-fill-paragraph-at): Remove debugging code.
* calendar/calendar.el (generate-calendar-window): When we don't
* font-lock.el (java-keywords): Add MATCH-HIGHLIGHT part for
javadoc tags.
-
+
2000-11-20 Andre Spiegel <spiegel@gnu.org>
* vc.el, vc-hooks.el: Undo prev change (moved functions back to
vc.el).
- * vc-rcs.el (vc-rcs-state): Before calling vc-workfile-unchanged-p,
+ * vc-rcs.el (vc-rcs-state): Before calling vc-workfile-unchanged-p,
require vc.
-
- * vc-cvs.el (vc-cvs-checkout): Fix bug that broke C-x v ~-style
+
+ * vc-cvs.el (vc-cvs-checkout): Fix bug that broke C-x v ~-style
checkouts.
-
+
2000-11-20 Dave Love <fx@gnu.org>
* Makefile.in (DONTCOMPILE): Omit bindings.el.
2000-11-19 Andre Spiegel <spiegel@gnu.org>
- * vc-rcs.el (vc-rcs-state): Call vc-workfile-unchanged-p only here,
+ * vc-rcs.el (vc-rcs-state): Call vc-workfile-unchanged-p only here,
and differentiate according to checkout model.
(vc-rcs-fetch-master-state): Don't call vc-workfile-unchanged-p,
since this function is only concerned with master state.
- * vc-hooks.el (vc-workfile-unchanged-p,
+ * vc-hooks.el (vc-workfile-unchanged-p,
vc-default-workfile-unchanged-p): Moved here from vc.el.
- * vc.el (vc-workfile-unchanged-p,
+ * vc.el (vc-workfile-unchanged-p,
vc-default-workfile-unchanged-p): See above.
2000-11-19 Miles Bader <miles@gnu.org>
2000-11-18 Gerd Moellmann <gerd@gnu.org>
* ps-print.el: Update copyright notice.
-
+
* tooltip.el (tooltip-x-offset, tooltip-y-offset): New user-options.
(tooltip-show): Use the offsets.
* bindings.el (mode-line-modified): Fix a typo.
- (mode-line-toggle-modified, mode-line-widen)
+ (mode-line-toggle-modified, mode-line-widen)
(mode-line-abbrev-mode, mode-line-auto-fill-mode): Fix typos.
2000-11-17 Gerd Moellmann <gerd@gnu.org>
(vc-default-check-headers): New function.
* vc-{cvs,rcs,sccs}.el: Functions reordered.
-
- * vc.el (vc-revert-buffer): Ask for confirmation if file seems
+
+ * vc.el (vc-revert-buffer): Ask for confirmation if file seems
up-to-date.
- (vc-do-command): In the asynchronous case, output messages only if
+ (vc-do-command): In the asynchronous case, output messages only if
the minibuffer is not active.
- * vc-cvs.el (vc-cvs-revert): Use `cvs unedit' only if
+ * vc-cvs.el (vc-cvs-revert): Use `cvs unedit' only if
`vc-cvs-use-edit' is on.
- (vc-cvs-checkout): When this is used for reverting the workfile,
- make a backup of the original contents and revert to that in case
+ (vc-cvs-checkout): When this is used for reverting the workfile,
+ make a backup of the original contents and revert to that in case
of error.
- (vc-cvs-print-log, vc-cvs-diff): Use asynchronous mode only for
+ (vc-cvs-print-log, vc-cvs-diff): Use asynchronous mode only for
remote repositories.
-
+
* vc.el (vc-annotate): Changed handling of prefix arg; now asks
for both version and ratio in the minibuffer.
- * vc-cvs.el (vc-cvs-annotate-command): New optional arg VERSION.
+ * vc-cvs.el (vc-cvs-annotate-command): New optional arg VERSION.
Use vc-do-command to perform the annotation, not call-process.
2000-11-16 Kenichi Handa <handa@etl.go.jp>
2000-11-16 Gerd Moellmann <gerd@gnu.org>
- * net/ange-ftp.el (ange-ftp-file-writable-p)
+ * net/ange-ftp.el (ange-ftp-file-writable-p)
(ange-ftp-file-readable-p, ange-ftp-file-executable-p): Bind
ange-ftp-process-verbose to nil.
available, using :enable to (de)activate them.
(gud-minor-mode-map): New map. Add it to minor-mode-map-alist.
(gud-mode-map): New map.
- (gud-gdb-find-file, gud-sdb-find-file, gud-dbx-find-file)
+ (gud-gdb-find-file, gud-sdb-find-file, gud-dbx-find-file)
(gud-xdb-find-file, gud-perldb-find-file, gud-pdb-find-file):
Don't set up gud's menu (it's done by the minor-mode).
(gud-minibuffer-local-map): New.
(texinfo-update-menu-higher-regexps, texinfo-update-menu-lower-regexps)
(texinfo-update-the-node, texinfo-sequentially-update-the-node)
(texinfo-update-menu-same-level-regexps): Update.
- (texinfo-update-node, texinfo-every-node-update)
+ (texinfo-update-node, texinfo-every-node-update)
(texinfo-sequential-node-update): Remove autoload cookie.
* textmodes/texinfo.el (texinfo-section-list): Change majorheading.
(make-mode-line-mouse2-map): Rewritten.
(mode-line-modified, mode-line-format, minor-mode-alist): Use new
functions so that C-h k can show something with a doc string.
-
+
* startup.el (fancy-splash-delay): Set to 10 seconds.
(fancy-splash-max-time): New user-option.
(fancy-splash-stop-time): New variable.
* frame.el (after-setting-font-hook): Rename hooks -> hook.
(set-frame-font): Use the new name (and the old for compatibility).
- * toolbar/tool-bar.el (tool-bar-mode):
- * time.el (display-time-mode):
- * recentf.el (recentf-mode):
- * paren.el (show-paren-mode):
- * mwheel.el (mouse-wheel-mode):
- * msb.el (msb-mode):
- * jka-compr.el (auto-compression-mode):
- * image-file.el (auto-image-file-mode):
- * hl-line.el (hl-line-mode):
- * delsel.el (delete-selection-mode):
- * autoinsert.el (auto-insert-mode):
+ * toolbar/tool-bar.el (tool-bar-mode):
+ * time.el (display-time-mode):
+ * recentf.el (recentf-mode):
+ * paren.el (show-paren-mode):
+ * mwheel.el (mouse-wheel-mode):
+ * msb.el (msb-mode):
+ * jka-compr.el (auto-compression-mode):
+ * image-file.el (auto-image-file-mode):
+ * hl-line.el (hl-line-mode):
+ * delsel.el (delete-selection-mode):
+ * autoinsert.el (auto-insert-mode):
* complete.el (partial-completion-mode): Drop unneeded positional args.
- * info.el (Info-mode):
+ * info.el (Info-mode):
* comint.el (comint-mode): Don't both with make-local-hook.
* log-edit.el (log-edit-menu): New menu.
2000-11-02 Miles Bader <miles@gnu.org>
- * calendar/calendar.el (diary-face, calendar-today-face)
+ * calendar/calendar.el (diary-face, calendar-today-face)
(holiday-face): Remove dependency on `window-system'.
2000-11-02 Ken Raeburn <raeburn@gnu.org>
;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
;; Emmanuel Briot <briot@gnat.com>
;; Maintainer: Emmanuel Briot <briot@gnat.com>
-;; Ada Core Technologies's version: $Revision: 1.34 $
+;; Ada Core Technologies's version: $Revision: 1.35 $
;; Keywords: languages ada
;; This file is not part of GNU Emacs
(if ada-clean-buffer-before-saving
(progn
;; remove all spaces at the end of lines in the whole buffer.
- (add-hook 'local-write-file-hooks 'ada-remove-trailing-spaces)
+ (add-hook 'local-write-file-hooks 'delete-trailing-whitespace)
;; convert all tabs to the correct number of spaces.
(add-hook 'local-write-file-hooks
(lambda () (untabify (point-min) (point-max))))))
(current-column))
tmp-indent (cdr cur-indent))
(setq prev-indent 0 tmp-indent '()))
-
+
(while (not (null tmp-indent))
(cond
((numberp (car tmp-indent))
;;-----------------------------
;; in open parenthesis, but not in parameter-list
;;-----------------------------
-
+
((and ada-indent-to-open-paren
(not (ada-in-paramlist-p))
(setq column (ada-in-open-paren-p)))
-
+
;; check if we have something like this (Table_Component_Type =>
;; Source_File_Record)
(save-excursion
((not (char-after))
(ada-indent-on-previous-lines nil orgpoint orgpoint))
-
+
;;---------------------------
;; starting with e
;;---------------------------
-
+
((= (char-after) ?e)
(cond
;; ------- end ------
-
+
((looking-at "end\\>")
(let ((label 0)
limit)
(save-excursion
(ada-goto-matching-start 1)
-
+
;;
;; found 'loop' => skip back to 'while' or 'for'
;; if 'loop' is not on a separate line
(beginning-of-line)
(if (looking-at ada-named-block-re)
(setq label (- ada-label-indent))))))))
-
+
(list (+ (save-excursion (back-to-indentation) (point)) label) 0))))
;; ------ exception ----
-
+
((looking-at "exception\\>")
(save-excursion
(ada-goto-matching-start 1)
(list (save-excursion (back-to-indentation) (point)) 0)))
;; else
-
+
((looking-at "else\\>")
(if (save-excursion (ada-goto-previous-word)
(looking-at "\\<or\\>"))
(list (progn (back-to-indentation) (point)) 0))))
;; elsif
-
+
((looking-at "elsif\\>")
(save-excursion
(ada-goto-matching-start 1 nil t)
;;---------------------------
;; starting with w (when)
;;---------------------------
-
+
((and (= (char-after) ?w)
(looking-at "when\\>"))
(save-excursion
;;---------------------------
;; starting with l (loop)
;;---------------------------
-
+
((and (= (char-after) ?l)
(looking-at "loop\\>"))
(setq pos (point))
((and (= (char-after) ?i)
(looking-at "is\\>"))
-
+
(if (and ada-indent-is-separate
(save-excursion
(goto-char (match-end 0))
(cond
;; ----- record ------
-
+
((looking-at "record\\>")
(save-excursion
(ada-search-ignore-string-comment
(= (char-after (car pos)) ?r))
(goto-char (car pos)))
(setq var 'ada-indent-renames)))
-
+
(forward-comment -1000)
(if (= (char-before) ?\))
(forward-sexp -1)
(forward-word -1))
-
+
;; If there is a parameter list, and we have a function declaration
;; or a access to subprogram declaration
(let ((num-back 1))
(backward-word 1)
(setq num-back 2)
(looking-at "function\\>")))))
-
+
;; The indentation depends of the value of ada-indent-return
(if (<= (eval var) 0)
(list (point) (list '- var))
(list (progn (backward-word num-back) (point))
var))
-
+
;; Else there is no parameter list, but we have a function
;; Only do something special if the user want to indent
;; relative to the "function" keyword
(save-excursion (forward-word -1)
(looking-at "function\\>")))
(list (progn (forward-word -1) (point)) var)
-
+
;; Else...
(ada-indent-on-previous-lines nil orgpoint orgpoint)))))))
))
-
+
;;--------------------------------
;; starting with 'o' or 'p'
;; 'or' as statement-start
;; We must use a search-forward (even if the code is more complex),
;; since we want to find the beginning of the comment.
(let (pos)
-
+
(if (and ada-indent-align-comments
(save-excursion
(forward-line -1)
(setq pos (point))))
pos))
(list (- pos 2) 0)
-
+
;; Else always on previous line
(ada-indent-on-previous-lines nil orgpoint orgpoint)))
;;---------------------------------
;; new/abstract/separate
;;---------------------------------
-
+
((looking-at "\\(new\\|abstract\\|separate\\)\\>")
(ada-indent-on-previous-lines nil orgpoint orgpoint))
(while (and (not found)
(ada-search-ignore-string-comment
"\\<\\(generic\\|end\\|begin\\|package\\|procedure\\|function\\)\\>" t))
-
+
;; avoid "with procedure"... in generic parts
(save-excursion
(forward-word -1)
(setq found (not (looking-at "with"))))))
-
+
(if (looking-at "generic")
(list (progn (back-to-indentation) (point)) 0)
(ada-indent-on-previous-lines nil orgpoint orgpoint))))
-
+
;;---------------------------------
;; label
;;---------------------------------
-
+
((looking-at "\\(\\sw\\|_\\)+[ \t\n]*:[^=]")
(if (ada-in-decl-p)
(ada-indent-on-previous-lines nil orgpoint orgpoint)
(setq match-dat (ada-search-prev-end-stmt))
(if match-dat
-
+
;;
;; found a previous end-statement => check if anything follows
;;
(goto-char (cdr match-dat)))
(ada-goto-next-non-ws)
))
-
+
;;
;; no previous end-statement => we are at the beginning of the
;; accessible part of the buffer
(progn
(setq nest-count (1- nest-count))
(setq first nil)))))
-
+
;;
((looking-at "declare\\|generic")
(setq nest-count (1- nest-count))
;; Make sure this is the start of a private section (ie after
;; a semicolon or just after the package declaration, but not
;; after a 'type ... is private' or 'is new ... with private'
- (progn (forward-comment -1000)
+ (progn (forward-comment -1000)
(or (= (char-before) ?\;)
(and (forward-word -3)
(looking-at "\\<package\\>")))))))
;; -- Miscellaneous
;; ------------------------------------------------------------
-(defun ada-remove-trailing-spaces ()
- "Remove trailing spaces in the whole buffer."
- (interactive)
- (save-match-data
- (save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (re-search-forward "[ \t]+$" (point-max) t)
- (replace-match "" nil nil))))))
-
(defun ada-gnat-style ()
"Clean up comments, `(' and `,' for GNAT style checking switch."
(interactive)
(goto-char (+ from 2))
(while (re-search-forward "^-- *" to t)
(replace-match " "))
-
+
(goto-char (1- to))
(setq to (point-marker))
(setq is-body t
name (match-string 1 name)))
(setq suffixes (cdr suffixes)))))
-
+
;; If this wasn't in either list, return name itself
(if (not (or is-spec is-body))
name
-
+
;; Else find the other possible names
(if is-spec
(setq suffixes ada-body-suffixes)
Other major modes are defined by comparison with this one."
(interactive)
(kill-all-local-variables))
-\f
+
;; Making and deleting lines.
(defun newline (&optional arg)
(if (and (listp sticky) (not (memq 'hard sticky)))
(put-text-property from (point) 'rear-nonsticky
(cons 'hard sticky)))))
-\f
+
(defun open-line (arg)
"Insert a newline and leave point before it.
If there is a fill prefix and/or a left-margin, insert them on the new line
(fixup-whitespace))))
(defalias 'join-line #'delete-indentation) ; easier to find
-\f
+
(defun delete-blank-lines ()
"On blank line, delete all surrounding blank lines, leaving just one.
On isolated blank line, delete that one.
(if (looking-at "^[ \t]*\n\\'")
(delete-region (point) (point-max)))))
+(defun delete-trailing-whitespace ()
+ "Delete all the trailing whitespace across the current buffer.
+All whitespace after the last non-whitespace character in a line is deleted.
+This respects narrowing, created by \\[narrow-to-region] and friends."
+ (interactive "*")
+ (save-match-data
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward "\\s-+$" nil t)
+ (delete-region (match-beginning 0) (match-end 0))))))
+
(defun newline-and-indent ()
"Insert a newline, then indent according to major mode.
Indentation is done using the value of `indent-line-function'.
(indent-according-to-mode))
(newline)
(indent-according-to-mode))
-\f
+
(defun quoted-insert (arg)
"Read next input character and insert it.
This is useful for inserting control characters.
(while (> arg 0)
(insert-and-inherit char)
(setq arg (1- arg)))))
-\f
+
(defun forward-to-indentation (arg)
"Move forward ARG lines and position at first nonblank character."
(interactive "p")
(insert ? ))
(delete-region (point) (progn (skip-chars-forward " \t") (point))))
-\f
+
(defun beginning-of-buffer (&optional arg)
"Move point to the beginning of the buffer; leave mark at previous position.
With arg N, put point N/10 of the way from the beginning.
(push-mark (point-max) nil t)
(goto-char (point-min)))
-\f
+
;; Counting lines, one way or another.
(defun goto-line (arg)
(1+ done)
done)))
(- (buffer-size) (forward-line (buffer-size)))))))
-\f
+
(defun what-cursor-position (&optional detail)
"Print info on cursor position (on screen and within buffer).
Also describe the character after point, and give its character code
(single-key-description char)
(buffer-substring-no-properties (point) (1+ (point))))
encoding-msg pos total percent col hscroll))))))
-\f
+
(defvar read-expression-map
(let ((m (make-sparse-keymap)))
(define-key m "\M-\t" 'lisp-complete-symbol)
nil read-expression-map t
'read-expression-history)
current-prefix-arg))
-
+
(if (null eval-expression-debug-on-error)
(setq values (cons (eval eval-expression-arg) values))
(let ((old-value (make-symbol "t")) new-value)
;; propagate that change to the global binding.
(unless (eq old-value new-value)
(setq debug-on-error new-value))))
-
+
(let ((print-length eval-expression-print-length)
(print-level eval-expression-print-level))
(prin1 (car values)
(setq command-history (cons newcmd command-history)))
(eval newcmd))
(ding))))
-\f
+
(defvar minibuffer-history nil
"Default minibuffer history list.
This is used for all minibuffer input
Return 0 if current buffer is not a mini-buffer."
(field-beginning (point-max)))
-\f
+
;Put this on C-x u, so we can force that rather than C-_ into startup msg
(defalias 'advertised-undo 'undo)
(t
'(0 . 0)))
'(0 . 0)))
-\f
+
(defvar shell-command-history nil
"History list for some commands that read shell commands.")
))
(shell-command-on-region (point) (point) command
output-buffer nil error-buffer)))))))
-\f
+
(defun display-message-or-buffer (message
&optional buffer-name not-this-window frame)
"Display MESSAGE in the echo area if possible, otherwise in a pop-up buffer.
(with-current-buffer
standard-output
(call-process shell-file-name nil t nil shell-command-switch command))))
-\f
+
(defvar universal-argument-map
(let ((map (make-sparse-keymap)))
(define-key map [t] 'universal-argument-other-key)
unread-command-events)))
(reset-this-command-lengths)
(setq overriding-terminal-local-map nil))
-\f
+
;;;; Window system cut and paste hooks.
(defvar interprogram-cut-function nil
is equal (according to `string=') to the last text Emacs provided.")
-\f
+
;;;; The kill ring data structure.
(defvar kill-ring nil
(car ARGth-kill-element)))))
-\f
+
;;;; Commands for manipulating the kill ring.
(defcustom kill-read-only-ok nil
(setq this-command 'kill-region)
(message "If the next command is a kill, it will append"))
(setq last-command 'kill-region)))
-\f
+
;; Yanking.
(defun yank-pop (arg)
With argument, rotate that many kills forward (or backward, if negative)."
(interactive "p")
(current-kill arg))
-\f
+
;; Some kill commands.
;; Internal subroutine of delete-char
(search-forward (char-to-string char) nil nil arg)
; (goto-char (if (> arg 0) (1- (point)) (1+ (point))))
(point))))
-\f
+
;; kill-line and its subroutines.
(defcustom kill-whole-line nil
(goto-char (next-single-property-change (point) 'invisible))
(goto-char (next-overlay-change (point))))
(end-of-line)))
-\f
+
(defun insert-buffer (buffer)
"Insert after point the contents of BUFFER.
Puts mark after the inserted text.
(erase-buffer)
(save-excursion
(insert-buffer-substring oldbuf start end)))))
-\f
+
(put 'mark-inactive 'error-conditions '(mark-inactive error))
(put 'mark-inactive 'error-message "The mark is not active now")
(widen))
(goto-char position)
(switch-to-buffer buffer)))
-\f
+
(defcustom next-line-add-newlines t
"*If non-nil, `next-line' inserts newline to avoid `end of buffer' error."
:type 'boolean
((beginning-of-buffer end-of-buffer) (ding)))
(line-move (- arg)))
nil)
-\f
+
(defcustom track-eol nil
"*Non-nil means vertical motion starting at end of line keeps to ends of lines.
This means moving to the end of each line moved onto.
"Goal column %d (use \\[set-goal-column] with an arg to unset it)")
goal-column))
nil)
-\f
+
(defun scroll-other-window-down (lines)
"Scroll the \"other window\" down.
(end-of-buffer arg)
(recenter '(t)))
(select-window orig-window))))
-\f
+
(defun transpose-chars (arg)
"Interchange characters around point, moving forward one character.
With prefix arg ARG, effect is to take character before point
(+ transpose-subr-start1 (- len1 len2))))
(delete-region (point) (+ (point) len1))
(insert word2)))
-\f
+
(defun backward-word (arg)
"Move backward until encountering the end of a word.
With argument, do this that many times."
(setq start (point)))
(buffer-substring-no-properties start end)))
(buffer-substring-no-properties start end)))))
-\f
+
(defcustom fill-prefix nil
"*String for filling to insert at front of new line, or nil for none.
Setting this variable automatically makes it local to the current buffer."
(error "set-fill-column requires an explicit argument")
(message "Fill column set to %d (was %d)" arg fill-column)
(setq fill-column arg)))
-\f
+
(defun set-selective-display (arg)
"Set `selective-display' to ARG; clear it if no arg.
When the value of `selective-display' is a number > 0,
(> (prefix-numeric-value arg) 0))
'overwrite-mode-binary))
(force-mode-line-update))
-\f
+
(defcustom line-number-mode t
"*Non-nil means display line number in mode line."
:type 'boolean
:version "21.1"
:link '(custom-manual "Single-Byte European Support")
:group 'keyboard)
-\f
+
(defcustom read-mail-command 'rmail
"*Your preference for a mail reading package.
This is used by some keybindings which support reading mail.
(list nil nil nil current-prefix-arg))
(compose-mail to subject other-headers continue
'switch-to-buffer-other-frame yank-action send-actions))
-\f
+
(defvar set-variable-value-history nil
"History of values entered with `set-variable'.")
(error "Value `%S' does not match type %S of %S"
val (car type) var))))
(set var val))
-\f
+
;; Define the major mode for lists of completions.
(defvar completion-list-mode-map nil
(goto-char (point-min))
(search-forward "\n\n")
(forward-line 1))))
-\f
+
;; Support keyboard commands to turn on various modifiers.
;; These functions -- which are not commands -- each add one modifier
(define-key function-key-map [?\C-x ?@ ?a] 'event-apply-alt-modifier)
(define-key function-key-map [?\C-x ?@ ?S] 'event-apply-shift-modifier)
(define-key function-key-map [?\C-x ?@ ?c] 'event-apply-control-modifier)
-\f
+
;;;; Keypad support.
;;; Make the keypad keys act like ordinary typing keys. If people add
(define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window)
-\f
+
;;; Syntax stuff.
(defconst syntax-code-table
can be used as value of a `syntax-table' property.
DESCRIPTION is the descriptive string for the syntax.")
-\f
+
;;; Misc
(defun byte-compiling-files-p ()
"Return t if currently byte-compiling files."
(and (boundp 'byte-compile-current-file)
(stringp byte-compile-current-file)))
-
+
;;; simple.el ends here
;;; Commentary:
-;; This code provides the picture-mode commands documented in the Emacs
+;; This code provides the picture-mode commands documented in the Emacs
;; manual. The screen is treated as a semi-infinite quarter-plane with
;; support for rectangle operations and `etch-a-sketch' character
;; insertion in any of eight directions.
(interactive "P")
(if (not (eq major-mode 'picture-mode))
(error "You aren't editing a Picture.")
- (if (not nostrip) (picture-clean))
+ (if (not nostrip) (delete-trailing-whitespace))
(setq mode-name picture-mode-old-mode-name)
(use-local-map picture-mode-old-local-map)
(setq major-mode picture-mode-old-major-mode)
(setq truncate-lines picture-mode-old-truncate-lines)
(force-mode-line-update)))
-(defun picture-clean ()
- "Eliminate whitespace at ends of lines."
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward "[ \t][ \t]*$" nil t)
- (delete-region (match-beginning 0) (point)))))
-
(provide 'picture)
;;; picture.el ends here
(generate-new-buffer (concat "2C/" (buffer-name)))))
(or buffer
(run-hooks '2C-other-buffer-hook))))
-
+
(2C-mode (prog1 (point-marker)
(other-window -1)))))
If you want `2C-separator' on empty lines in the second column,
you should put just one space in them. In the final result, you can strip
-off trailing spaces with \\[beginning-of-buffer] \\[replace-regexp] [ SPC TAB ] + $ RET RET"
+off trailing spaces with \\[delete-trailing-whitespace]."
(interactive)
(and (> (car (window-edges)) 0) ; not touching left edge of screen
(eq (window-buffer (previous-window))