Commit ed9a2f68 authored by Robert J. Chassell's avatar Robert J. Chassell

10-09-13

parent 7ea2d383
This diff is collapsed.
......@@ -1986,8 +1986,7 @@ If it is @code{combined} then the region in buffer C will look like
this:
@comment Use @set to avoid triggering merge conflict detectors like CVS.
@set seven-left <<<<<<<
@set seven-right >>>>>>>
@set seven-left
@example
@value{seven-left} variant A
the difference region from buffer A
......
;; (defun auto-save-mode (arg)
;; "Toggle auto-saving of contents of current buffer.
;; With prefix argument ARG, turn auto-saving on if positive, else off."
;; (interactive)
;; (if (> arg 0) auto-save (null auto-save)))
;; (defun auto-fill-mode (arg)
;; "Toggle Auto Fill mode.
;; With ARG, turn Auto Fill mode on if and only if ARG is positive.
;; In Auto Fill mode, inserting a space at a column beyond `current-fill-column'
;; automatically breaks the line at a previous space."
;; (interactive)
;; (if (> arg 0) auto-fill (null auto-fill)))
;;; files.el --- file input and output commands for Emacs
;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994, 1995, 1996,
......
......@@ -10464,7 +10464,6 @@ Turn flymake mode off.
;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off
;;;;;; turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode)
;;;;;; "flyspell" "textmodes/flyspell.el" (19370 36541))
;;; Generated autoloads from textmodes/flyspell.el
(autoload 'flyspell-prog-mode "flyspell" "\
(setq tramp-version 24)
;;; tramp-cache.el --- file information caching for Tramp
;; Copyright (C) 2000, 2005, 2006, 2007, 2008, 2009,
......@@ -51,6 +53,8 @@
;;; Code:
(require 'tramp)
; bob, 2010 Sep 11
; (require 'trampver.el)
(autoload 'time-stamp-string "time-stamp")
;;; -- Cache --
......
......@@ -29,7 +29,9 @@
;;; Code:
(require 'tramp-loaddefs)
(eval-when-compile
(require 'tramp-loaddefs))
(eval-when-compile
......
(setq tramp-version 24)
;;; tramp.el --- Transparent Remote Access, Multiple Protocol
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
......
;; (push-mark (point) t) needed at the end of forward-page
;; The documentation in simple.el for set-mark says
;; To remember a location for internal use in the Lisp program,
;; store it in a Lisp variable. Example:
;; (let ((beg (point))) (forward-line 1) (delete-region beg (point)))."
;;; page.el --- page motion commands for Emacs
;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
;;; mime-w3m.el --- mime-view content filter for text
;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009
;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>
;; Author: TSUCHIYA Masatoshi <tsuchiya@namazu.org>,
;; Akihiro Arisawa <ari@mbf.sphere.ne.jp>
;; Keywords: HTML, MIME, multimedia, mail, news
;; This file is *NOT* yet part of SEMI (Suite of Emacs MIME Interfaces).
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or (at
;; your option) any later version.
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Install:
;; (1) Install SEMI.
;; (2) Put this file to appropriate directory.
;; (3) Write these following code to your ~/.emacs or ~/.gnus.
;;
;; (require 'mime-w3m)
;;; Code:
(eval-when-compile
(require 'cl)
;; mime-parse.el should be loaded before mime.el so as not to make
;; `mime-uri-parse-cid' an autoloaded function to which the byte
;; compiler might issue a nonsense warning.
(require 'mime-parse)
(require 'mime)
(require 'w3m)
(defvar mime-preview-condition)
(defvar mime-setup-enable-inline-html)
(defvar mime-view-mode-default-map))
(eval-and-compile
(when (featurep 'xemacs)
(require 'font)))
(defcustom mime-w3m-display-inline-images 'default
"*Non-nil means that inline images are displayed.
When this option is equal to `default',
`w3m-default-display-inline-images' is refered instead of this option,
to decide whether inline images are displayed."
:group 'w3m
:group 'mime-view
:type '(radio (const :format "%v " nil)
(sexp :format "non-nil "
:match
(lambda (widget value)
(and value (not (eq value 'default))))
:value-to-internal
(lambda (widget value)
(if (and value (not (equal value "default")))
(widget-sexp-value-to-internal widget value)
"t")))
(const default)))
(defcustom mime-w3m-safe-url-regexp "\\`cid:"
"*Regexp that matches safe url names.
Some HTML mails might have the trick of spammers using <img> tags. It
is likely to be intended to verify whether you have read the mail.
You can prevent your personal informations from leaking by setting
this to the regexp which matches the safe url names. The value of the
variable `w3m-safe-url-regexp' will be bound with this value. You may
set this value to nil if you consider all the urls to be safe."
:group 'mime-w3m
:type '(choice (regexp :format "%t: %v\n" :size 0)
(const :tag "All URLs are safe" nil)))
(defcustom mime-w3m-after-cursor-move-hook
'(w3m-print-this-url)
"*Hook run each time after the cursor moves in mime-w3m buffers.
This hook is called by the `mime-w3m-check-current-position' function
by way of `post-command-hook'."
:group 'mime-w3m
:type 'hook)
(defcustom mime-w3m-setup-hook nil
"*Hook run at the end of function `mime-w3m-setup'."
:group 'mime-w3m
:type 'hook)
(defvar mime-w3m-message-structure nil)
(make-variable-buffer-local 'mime-w3m-message-structure)
(defun mime-w3m-insinuate ()
"Insinuate `mime-w3m' module to SEMI."
(setq mime-setup-enable-inline-html nil)
(let (flag)
(when (boundp 'mime-preview-condition)
(labels ((overwrite (x)
(if (symbolp x)
(if (eq x 'mime-preview-text/html)
(setq flag 'mime-w3m-preview-text/html)
(when (eq x 'mime-w3m-preview-text/html)
(setq flag t))
x)
(if (consp x)
(cons (overwrite (car x)) (overwrite (cdr x)))
x))))
(setq mime-preview-condition
(overwrite mime-preview-condition))))
(unless flag
(eval-after-load "mime-view"
'(progn
(ctree-set-calist-strictly
'mime-preview-condition
'((type . text)
(subtype . html)
(body . visible)
(body-presentation-method . mime-w3m-preview-text/html)))
(set-alist 'mime-view-type-subtype-score-alist
'(text . html) 3))))))
(defun mime-w3m-setup ()
"Setup `mime-w3m' module."
(require 'w3m)
(when (eq mime-w3m-display-inline-images 'default)
(setq mime-w3m-display-inline-images w3m-default-display-inline-images))
(unless (assq 'mime-view-mode w3m-cid-retrieve-function-alist)
(push (cons 'mime-view-mode 'mime-w3m-cid-retrieve)
w3m-cid-retrieve-function-alist))
(run-hooks 'mime-w3m-setup-hook))
(def-edebug-spec mime-w3m-save-background-color t)
(defmacro mime-w3m-save-background-color (&rest body)
(if (featurep 'xemacs)
`(let ((color (color-name (face-background 'default))))
(prog1
(progn ,@body)
(font-set-face-background 'default color (current-buffer))))
(cons 'progn body)))
;;;###autoload
(defun mime-w3m-preview-text/html (entity situation)
(mime-w3m-setup)
(setq mime-w3m-message-structure (mime-find-root-entity entity))
(let ((p (point))
(xref
(or (mime-entity-fetch-field entity "xref")
(mime-entity-fetch-field mime-w3m-message-structure "xref"))))
(goto-char p)
(insert "\n")
(goto-char p)
(mime-w3m-save-background-color
(save-restriction
(narrow-to-region p p)
(mime-insert-text-content entity)
(run-hooks 'mime-text-decode-hook)
(condition-case err
(let ((w3m-safe-url-regexp mime-w3m-safe-url-regexp)
(w3m-display-inline-images mime-w3m-display-inline-images)
w3m-force-redisplay)
(w3m-region p (point-max)
(and (stringp xref)
(string-match "\\`http://" xref)
xref)
(mime-content-type-parameter
(mime-entity-content-type entity)
"charset"))
(add-text-properties p (point-max)
(list 'keymap w3m-minor-mode-map
'text-rendered-by-mime-w3m t)))
(error (message "%s" err)))))))
(let (current-load-list)
(defadvice mime-display-message
(after mime-w3m-add-local-hook activate compile)
"Advised by emacs-w3m.
Set hooks run arround each command is executed."
(when (featurep 'w3m)
(w3m-add-local-hook 'pre-command-hook
'w3m-store-current-position)
(w3m-add-local-hook 'post-command-hook
'mime-w3m-check-current-position))))
(defun mime-w3m-check-current-position ()
"Run `mime-w3m-after-cursor-move-hook' if the cursor has been moved."
(when (and (/= (point) (car w3m-current-position))
(ignore-errors
(or (get-text-property (point)
'text-rendered-by-mime-w3m)
(get-text-property (car w3m-current-position)
'text-rendered-by-mime-w3m))))
(run-hooks 'mime-w3m-after-cursor-move-hook)))
(defun mime-w3m-cid-retrieve (url &rest args)
(let ((entity (mime-find-entity-from-content-id
(mime-uri-parse-cid url)
(with-current-buffer w3m-current-buffer
mime-w3m-message-structure))))
(when entity
;; `mime-decode-string' should be performed in a unibyte buffer.
(w3m-insert-string (mime-entity-content entity))
(mime-entity-type/subtype entity))))
(let (current-load-list)
(defadvice kill-new (before strip-keymap-properties-from-kill activate)
"Advised by emacs-w3m.
Strip `keymap' or `local-map' properties from a killed string."
(if (text-property-any 0 (length (ad-get-arg 0))
'text-rendered-by-mime-w3m t (ad-get-arg 0))
(remove-text-properties 0 (length (ad-get-arg 0))
'(keymap nil local-map nil)
(ad-get-arg 0)))))
(mime-w3m-insinuate)
(provide 'mime-w3m)
;;; mime-w3m.el ends here
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
;;; w3m-bug.el --- command to report emacs-w3m bugs -*- coding: euc-japan -*-
;; Copyright (C) 2002, 2003, 2005, 2007, 2010
;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>
;; Author: Katsumi Yamaoka <yamaoka@jpl.org>
;; Keywords: w3m, WWW, hypermedia
;; This file is a part of emacs-w3m.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; `M-x report-emacs-w3m-bug' starts an email note to the emacs-w3m
;; developers describing a problem.
;;; Code:
(defvar report-emacs-w3m-bug-address "emacs-w3m@namazu.org"
"*Address of mailing list for emacs-w3m bugs.")
(defvar report-emacs-w3m-bug-no-explanations nil
"*If non-nil, suppress the explanations given for the sake of novice users.")
(defconst report-emacs-w3m-bug-system-informations
(eval
'`(emacs-w3m-version
emacs-version
,@(if (or (boundp 'mule-version)
(functionp 'mule-version))
'(mule-version))
,@(cond ((featurep 'xemacs)
'((featurep 'mule)
(featurep 'file-coding)))
((or (boundp 'Meadow-version)
(functionp 'Meadow-version))
'(Meadow-version)))
system-type
(featurep 'gtk)
w3m-version
w3m-type
w3m-compile-options
w3m-language
w3m-command-arguments
w3m-command-arguments-alist
w3m-command-environment
w3m-input-coding-system
w3m-output-coding-system
w3m-use-mule-ucs))
"List of the system informations. Users should NEVER modify the value."
;; For the developers:
;; It is possible that it would be a security hole. To prevent those
;; rogue attacks, this constant should be reloaded for each time to
;; send a bug report. Each element can be the symbol of a variable,
;; a Lisp function with no argument or any Lisp form to be evaluated.
)
(eval-when-compile
(require 'cl))
(defun report-emacs-w3m-bug (topic &optional buffer)
"Report a bug in emacs-w3m.
Prompts for bug subject. Leaves you in a mail buffer."
(interactive
(let* ((buffer (current-buffer))
(buffers (cons buffer (delq buffer (buffer-list))))
(inhibit-point-motion-hooks t)
keymap)
(save-current-buffer
(while buffers
(setq buffer (car buffers)
buffers (cdr buffers))
(set-buffer buffer)
(save-restriction
(widen)
(if (or (eq major-mode 'w3m-mode)
(and (keymapp (setq keymap
(or (get-text-property
(max (1- (point-max)) (point-min))
'keymap)
(get-text-property
(max (1- (point-max)) (point-min))
'local-map)))))
(where-is-internal 'w3m-print-current-url keymap))
(setq buffers nil)
(setq buffer nil)))))
(list (read-string "Bug Subject: ") buffer)))
(let (after-load-alist)
;; See the comment for `report-emacs-w3m-bug-system-informations'.
(load "w3m-bug"))
(compose-mail report-emacs-w3m-bug-address topic nil 'new)
(goto-char (point-min))
(re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
(forward-line 1)
(unless buffer
(insert
(if (and (boundp 'w3m-language)
(equal (symbol-value 'w3m-language) "Japanese"))
"もし可能なら emacs-w3m を起動してからやり直してください。\n"
"It is if possible, please redo after starting emacs-w3m.\n")
"\
================================================================\n"))
(unless report-emacs-w3m-bug-no-explanations
;; Insert warnings for the novice users.
(if (and (boundp 'w3m-language)
(equal (symbol-value 'w3m-language) "Japanese"))
(progn
(insert "このバグリポートは emacs-w3m 開発チームに送られます。\n")
(put-text-property (point)
(progn
(insert "\
あなたのローカルサイトの管理者宛てではありません!!")
(point))
'face 'underline)
(insert "\n\nできるだけ簡潔に述べてください:
\t- 何が起きましたか?
\t- 本当はどうなるべきだったと思いますか?
\t- そのとき何をしましたか? (正確に)
もし Lisp のバックトレースがあれば添付してください。\n"))
(insert "\
This bug report will be sent to the emacs-w3m development team,\n")
(put-text-property (point)
(progn
(insert " not to your local site managers!!")
(point))
'face 'italic)
(insert "\nPlease write in ")
(put-text-property (point) (progn
(insert "simple")
(point))
'face 'italic)
(insert " English, because the emacs-w3m developers
aren't good at English reading. ;-)
Please describe as succinctly as possible:
\t- What happened.
\t- What you thought should have happened.
\t- Precisely what you were doing at the time.
Please also include any Lisp back-traces that you may have.\n"))
(insert "\
================================================================\n"))
(insert "Dear Bug Team!\n\n")
(let ((user-point (point))
(print-escape-newlines t)
(print-quoted t)
infos print-length print-level)
(insert "\n
================================================================
System Info to help track down your bug:
---------------------------------------\n")
(with-current-buffer (or buffer (current-buffer))
(dolist (info report-emacs-w3m-bug-system-informations)
(push (prin1-to-string info) infos)
(push "\n => " infos)
(push (cond ((functionp info)
(prin1-to-string (condition-case code
(funcall info)
(error
code))))
((symbolp info)
(prin1-to-string (condition-case code
(symbol-value info)
(error
code))))
((consp info)
(prin1-to-string (condition-case code
(eval info)
(error
code)))))
infos)
(push "\n" infos)))
(apply 'insert (nreverse infos))
(goto-char user-point)))
;;; w3m-bug.el ends here
;;; w3m-ccl.el --- CCL programs to process Unicode and internal characters.
;; Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007
;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>
;; Authors: TSUCHIYA Masatoshi <tsuchiya@namazu.org>,
;; ARISAWA Akihiro <ari@mbf.sphere.ne.jp>
;; Keywords: w3m, WWW, hypermedia
;; This file is a part of emacs-w3m.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; This file contains CCL programs to process Unicode and internal
;; characters of w3m. For more detail about emacs-w3m, see:
;;
;; http://emacs-w3m.namazu.org/
;;; MEMO:
;; It is possible to support multi scripts without Mule-UCS. For more
;; detail, see [emacs-w3m:01950]
;;; Code:
(eval-and-compile
(cond
((featurep 'xemacs)
(require 'pccl))
(t
(require 'ccl))))
;;; CCL programs:
(eval-when-compile
(when (and (not (fboundp 'charset-id))
(fboundp 'charset-id-internal))
(defmacro charset-id (charset)
"Return charset identification number of CHARSET."
`(charset-id-internal ,charset))))
(eval-and-compile
(defconst w3m-internal-characters-alist
'((?\x90 . ? ) ; ANSP (use for empty anchor)
(?\x91 . ? ) ; IMSP (blank around image)
(?\xa0 . ? )) ; NBSP (non breakble space)
"Alist of internal characters v.s. ASCII characters.")
(defun w3m-ccl-write-repeat (charset &optional r0 r1)
(unless r0
(setq r0 'r0))
(unless r1
(setq r1 (if (eq r0 'r1) 'r0 'r1)))
(let ((unibyte (memq charset '(latin-iso8859-1 katakana-jisx0201))))
(if (fboundp 'ccl-compile-write-multibyte-character)
`((,r1 &= ?\x7f)
,@(unless unibyte
`((,r1 |= ((,r0 & ?\x7f) << 7))))
(,r0 = ,(charset-id charset))
(write-multibyte-character ,r0 ,r1)
(repeat))
`((write ,(charset-id charset))
,@(unless unibyte
`((write ,r0)))
(write-repeat ,r1)))))
(defconst w3m-ccl-write-euc-japan-character
(when (fboundp 'ccl-compile-read-multibyte-character)
`((read-multibyte-character r1 r0)
(if (r1 == ,(charset-id 'ascii))
;; (1) ASCII characters
(write-repeat r0))
(if (r1 == ,(charset-id 'latin-jisx0201))
;; (2) Latin Part of Japanese JISX0201.1976
;; Convert to ASCII
(write-repeat r0))
(r2 = (r1 == ,(charset-id 'japanese-jisx0208-1978)))
(if ((r1 == ,(charset-id 'japanese-jisx0208)) | r2)
;; (3) Characters of Japanese JISX0208.
((r1 = ((r0 & 127) | 128))
(r0 = ((r0 >> 7) | 128))
(write r0)
(write-repeat r1)))
(if (r1 == ,(charset-id 'katakana-jisx0201))
;; (4) Katakana Part of Japanese JISX0201.1976
((r0 |= 128)
(write ?\x8e)
(write-repeat r0)))))
"CCL program to write characters represented in `euc-japan'.")
(defconst w3m-ccl-write-iso-latin-1-character
(when (fboundp 'ccl-compile-read-multibyte-character)
`((read-multibyte-character r1 r0)
(if (r1 == ,(charset-id 'ascii))
;; (1) ASCII characters
(write-repeat r0))
(if (r1 == ,(charset-id 'latin-jisx0201))
;; (2) Latin Part of Japanese JISX0201.1976
;; Convert to ASCII
(write-repeat r0))
(if (r1 == ,(charset-id 'latin-iso8859-1))
;; (3) Latin-1 characters
((r0 |= ?\x80)