summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog189
-rw-r--r--lisp/calc/calc-ext.el4
-rw-r--r--lisp/calc/calc-prog.el1
-rw-r--r--lisp/calc/calc-store.el141
-rw-r--r--lisp/calendar/solar.el84
-rw-r--r--lisp/dired-aux.el5
-rw-r--r--lisp/dired.el44
-rw-r--r--lisp/dnd.el1
-rw-r--r--lisp/emacs-lisp/bytecomp.el26
-rw-r--r--lisp/emacs-lisp/copyright.el10
-rw-r--r--lisp/emacs-lisp/derived.el4
-rw-r--r--lisp/emacs-lisp/easymenu.el6
-rw-r--r--lisp/emacs-lisp/eldoc.el1
-rw-r--r--lisp/emacs-lisp/lisp-mode.el3
-rw-r--r--lisp/eshell/esh-mode.el3
-rw-r--r--lisp/faces.el21
-rw-r--r--lisp/files.el32
-rw-r--r--lisp/font-lock.el17
-rw-r--r--lisp/help-mode.el12
-rw-r--r--lisp/ibuf-ext.el4
-rw-r--r--lisp/ibuffer.el4
-rw-r--r--lisp/ido.el77
-rw-r--r--lisp/international/latexenc.el1
-rw-r--r--lisp/international/ogonek.el4
-rw-r--r--lisp/language/china-util.el8
-rw-r--r--lisp/language/chinese.el6
-rw-r--r--lisp/language/cyril-util.el2
-rw-r--r--lisp/language/cyrillic.el7
-rw-r--r--lisp/language/devan-util.el6
-rw-r--r--lisp/language/devanagari.el2
-rw-r--r--lisp/language/english.el6
-rw-r--r--lisp/language/ethio-util.el7
-rw-r--r--lisp/language/ethiopic.el6
-rw-r--r--lisp/language/european.el8
-rw-r--r--lisp/language/greek.el5
-rw-r--r--lisp/language/hebrew.el7
-rw-r--r--lisp/language/indian.el5
-rw-r--r--lisp/language/japan-util.el7
-rw-r--r--lisp/language/japanese.el6
-rw-r--r--lisp/language/korea-util.el5
-rw-r--r--lisp/language/korean.el6
-rw-r--r--lisp/language/lao-util.el7
-rw-r--r--lisp/language/lao.el7
-rw-r--r--lisp/language/misc-lang.el5
-rw-r--r--lisp/language/tibet-util.el6
-rw-r--r--lisp/language/tibetan.el6
-rw-r--r--lisp/language/viet-util.el6
-rw-r--r--lisp/language/vietnamese.el6
-rw-r--r--lisp/mail/supercite.el8
-rw-r--r--lisp/net/net-utils.el3
-rw-r--r--lisp/net/tramp.el118
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--lisp/progmodes/cc-engine.el3
-rw-r--r--lisp/progmodes/compile.el26
-rw-r--r--lisp/progmodes/gud.el8
-rw-r--r--lisp/progmodes/sh-script.el60
-rw-r--r--lisp/subr.el69
-rw-r--r--lisp/tmm.el5
58 files changed, 805 insertions, 333 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3a960bc8067..bc460f52430 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,189 @@
+2005-05-16 Juanma Barranquero <lekktu@gmail.com>
+
+ * international/latexenc.el: Add page marker to force the "Local
+ Variables:" string out of the last page.
+
+2005-05-16 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gud.el (gud-tooltip-mode): Add gud prefix to
+ tooltip-change-major-mode.
+ (gud-tooltip-print-command): Remove case where gud-minor-mode
+ is gdb ("--fullname").
+ (gud-tooltip-tips): Turn GUD tooltips off for this case and
+ explain to user.
+
+2005-05-16 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc-store.el (calc-copy-special-constant): New function.
+
+ * calc/calc-ext.el (calc-init-extensions): Add binding for
+ `calc-copy-special-constant'.
+
+ * calc/calc-prog.el (calc-edit-format-macro-buffer): Add a case
+ for the `calc-copy-special-constant' command.
+
+2005-05-16 Nick Roberts <nickrob@snap.net.nz>
+
+ * subr.el (left-fringe-p): New function.
+
+ * progmodes/compile.el (compilation-setup): Set local value of
+ overlay-arrow-string to "" always.
+ (compilation-set-window): Left fringe then don't scroll. No left
+ fringe then no arrow and scroll message to top.
+ (compilation-context-lines): Adjust doc string accordingly.
+
+2005-05-16 Kim F. Storm <storm@cua.dk>
+
+ * ido.el (ido-magic-forward-char, ido-magic-backward-char)
+ (ido-magic-delete-char): New commands for C-f, C-b, C-d.
+ (ido-wide-find-dir-or-delete-dir): New command for M-d.
+ (ido-define-mode-map): Bind them. Add C-x prefix to fallback commands.
+ (ido-read-file-name): Handle commands with ido property value
+ equal to find-file as reading a file name, to allow C-d to enter dired.
+ (ibuffer-find-file): Add ido property with value find-file.
+
+2005-05-15 Kim F. Storm <storm@cua.dk>
+
+ * subr.el (open-network-stream-nowait): Remove.
+ (open-network-stream-server): Remove.
+
+2005-05-15 Richard M. Stallman <rms@gnu.org>
+
+ * faces.el (describe-face): Output a definition link button.
+
+ * help-mode.el (help-face-def): New button type.
+
+ * emacs-lisp/copyright.el (copyright-fix-years):
+ Match properly if the first year is 2-digit.
+ Don't mess up the whitespace after the years by filling.
+
+ * dired-aux.el (dired-mark-confirm):
+ Pass t to dired-get-marked-files for DISTINGUISH-ONE-MARKED.
+
+ * dired.el (dired-map-over-marks): New arg DISTINGUISH-ONE-MARKED.
+ (dired-get-marked-files): New arg DISTINGUISH-ONE-MARKED.
+ (dired-mark-pop-up): Handle FILES = (t FILE) specially.
+
+ * emacs-lisp/lisp-mode.el (lisp-mode-variables):
+ Set font-lock-comment-start-skip.
+
+ * font-lock.el (font-lock-comment-start-skip): New variable.
+ (font-lock-comment-end-skip): New variable.
+ (font-lock-fontify-syntactically-region): Use them if non-nil.
+
+2005-05-15 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc-store.el (calc-store-value): Return a string rather
+ than display it as a message.
+ Use calc-var-name for variable name.
+ (calc-store-into): Add the result of calc-store-value to message.
+ (calc-copy-variable): Add a message.
+ (calc-store-exchange): Improve error messages.
+ (calc-store-binary, calc-store-map): Don't reset the values of
+ special constants.
+
+2005-05-14 Luc Teirlinck <teirllm@auburn.edu>
+
+ * emacs-lisp/derived.el (define-derived-mode): Add link to Elisp
+ manual to docstring.
+
+ * files.el (hack-local-variables-confirm): Add STRING argument.
+ Make the function handle non file visiting buffers correctly.
+ (hack-local-variables-prop-line, hack-local-variables)
+ (hack-one-local-variable): Use STRING arg of
+ `hack-local-variables-confirm'.
+
+2005-05-14 Michael Albinus <michael.albinus@gmx.de>
+
+ Sync with Tramp 2.0.49.
+
+ * tramp.el (tramp-handle-dired-call-process)
+ (tramp-handle-insert-directory):`insert-buffer' cannot be used
+ because the contents of the Tramp buffer is changed before
+ insertion (`expand-file' and alike).
+ (tramp-handle-insert-directory): If `localname' has an empty
+ nondirectory name, it must not be quoted.
+ (tramp-pre-connection): Add parameter CHUNKSIZE. Make local
+ variable `tramp-chunksize'. Change callees.
+ (tramp-open-connection-setup-interactive-shell): Check remote host
+ for buggy `send-process-string' implementation. Set
+ `tramp-chunksize' if found. Reported by Michael Kifer
+ <kifer@cs.sunysb.edu> (and a lot of other people all the years).
+ (tramp-handle-shell-command): `insert-buffer' cannot be used
+ because the contents of the Tramp buffer is changed before
+ insertion (`expand-file' and alike). Reported by Fr,Ai(Bd,Ai(Bric Bothamy
+ <frederic.bothamy@free.fr>.
+ (tramp-set-auto-save): Actions should be done for Tramp file name
+ handler only. Ange-FTP has its own auto-save mechanism. Reported
+ by Richard G. Bielawski <Richard.G.Bielawski@wellsfargo.com>.
+ (tramp-set-auto-save-file-modes): Set file modes of
+ `buffer-auto-save-file-name' to ?\600 as fallback solution.
+ Reported by Ferenc Wagner <wferi@tba.elte.hu>.
+ (tramp-bug): Remove obsolete variable.
+ (tramp-append-tramp-buffers): Rewrite partly. More suitable check
+ for presence of `mml-mode'. Make it running for older Emacsen as
+ well.
+
+2005-05-14 John Paul Wallington <jpw@pobox.com>
+
+ * ibuf-ext.el (define-ibuffer-filter filename):
+ If `dired-directory' is a list, use its car.
+
+2005-05-14 Daniel Brockman <daniel@brockman.se> (tiny change)
+
+ * ibuffer.el (define-ibuffer-column filename):
+ If `dired-directory' is a list, use its car.
+
+2005-05-14 Richard M. Stallman <rms@gnu.org>
+
+ * subr.el (symbol-file): Doc fix.
+
+ * emacs-lisp/bytecomp.el (byte-compile-nogroup-warn): New function.
+ (byte-compile-form): Call byte-compile-nogroup-warn.
+ (byte-compile-warning-types): Doc fix.
+
+ * eshell/esh-mode.el (eshell-find-tag): Use with-no-warnings.
+
+ * progmodes/cc-engine.el (c-literal-faces):
+ Add font-lock-comment-delimiter-face.
+
+ * net/net-utils.el (dig): Use with-no-warnings.
+
+ * mail/supercite.el (sc-cite-frame-alist, sc-uncite-frame-alist)
+ (sc-recite-frame-alist, sc-default-cite-frame)
+ (sc-default-uncite-frame, sc-default-recite-frame)
+ (sc-attrib-selection-list, sc-rewrite-header-list):
+ Mark as risky-local-variable.
+
+ * international/ogonek.el (ogonek-jak, ogonek-how):
+ Don't use beginning-of-buffer.
+
+ * emacs-lisp/eldoc.el (eldoc-documentation-function): Add autoload.
+
+ * calendar/solar.el (solar-data-list): Move definition up.
+
+ * dnd.el (dnd-protocol-alist): Add autoload.
+
+ * progmodes/sh-script.el: Many doc usage fixes.
+ (sh-indent-after-do): Change default to match common styles.
+
+2005-05-13 Luc Teirlinck <teirllm@auburn.edu>
+
+ * files.el (interpreter-mode-alist)
+ (auto-mode-interpreter-regexp): Doc fixes.
+
+2005-05-13 Matt Hodges <MPHodges@member.fsf.org>
+
+ * tmm.el (tmm-get-keymap): Include only active menus and menu
+ items.
+
+ * emacs-lisp/easymenu.el (easy-menu-define): Doc fixes.
+
+2005-05-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * dired.el (dired-mode): make-variable-buffer-local =>
+ make-local-variable
+
2005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* term/mac-win.el (mac-select-convert-to-string): Try coding
@@ -141,6 +327,9 @@
* cus-edit.el (custom-file): Call file-chase-links.
* files.el (read-directory-name): Fix previous change.
+ (hack-local-variables-confirm): New function.
+ (hack-local-variables-prop-line, hack-local-variables)
+ (hack-one-local-variable): Use it.
2005-05-10 Lute Kamstra <lute@gnu.org>
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 5b23dabbbf5..7a604541944 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -416,6 +416,7 @@
(define-key calc-mode-map "sd" 'calc-declare-variable)
(define-key calc-mode-map "se" 'calc-edit-variable)
(define-key calc-mode-map "si" 'calc-insert-variables)
+ (define-key calc-mode-map "sk" 'calc-copy-special-constant)
(define-key calc-mode-map "sl" 'calc-let)
(define-key calc-mode-map "sm" 'calc-store-map)
(define-key calc-mode-map "sn" 'calc-store-neg)
@@ -1075,7 +1076,8 @@ calc-vector-pop-covariance calc-vector-pop-sdev
calc-vector-pop-variance calc-vector-product calc-vector-sdev
calc-vector-sum calc-vector-variance)
- ("calc-store" calc-assign calc-copy-variable calc-declare-variable
+ ("calc-store" calc-assign calc-copy-special-constant
+calc-copy-variable calc-declare-variable
calc-edit-AlgSimpRules calc-edit-Decls calc-edit-EvalRules
calc-edit-ExtSimpRules calc-edit-FitRules calc-edit-GenCount
calc-edit-Holidays calc-edit-IntegLimit calc-edit-LineStyles
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
index 01ca770ba27..230b0f6a6c5 100644
--- a/lisp/calc/calc-prog.el
+++ b/lisp/calc/calc-prog.el
@@ -902,6 +902,7 @@
(calc-edit-macro-combine-var-name))
((or
(string-equal type "calc-copy-variable")
+ (string-equal type "calc-copy-special-constant")
(string-equal type "calc-declare-variable"))
(forward-line 1)
(calc-edit-macro-combine-var-name)
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el
index f59cad99802..fa61acb0f5f 100644
--- a/lisp/calc/calc-store.el
+++ b/lisp/calc/calc-store.el
@@ -57,15 +57,20 @@
( | . calc-store-concat ) ))))
(if found
(funcall (cdr found))
- (calc-store-value var (or calc-given-value (calc-top 1))
- "" calc-given-value-flag)
- (message "Stored to variable \"%s\"" (calc-var-name var))))
+ (let ((msg
+ (calc-store-value var (or calc-given-value (calc-top 1))
+ "" calc-given-value-flag)))
+ (message (concat "Stored to variable \"%s\"" msg)
+ (calc-var-name var)))))
(setq var (calc-is-assignments (calc-top 1)))
(if var
(while var
- (calc-store-value (car (car var)) (cdr (car var))
- (if (not (cdr var)) "")
- (if (not (cdr var)) 1))
+ (let ((msg
+ (calc-store-value (car (car var)) (cdr (car var))
+ (if (not (cdr var)) "")
+ (if (not (cdr var)) 1))))
+ (message (concat "Stored to variable \"%s\"" msg)
+ (calc-var-name var)))
(setq var (cdr var))))))))
(defun calc-store-plus (&optional var)
@@ -109,22 +114,26 @@
(calc-store-binary var "n" '- n))
(defun calc-store-value (var value tag &optional pop)
- (if var
- (let ((old (calc-var-value var)))
- (set var value)
- (if pop (or calc-store-keep (calc-pop-stack pop)))
- (calc-record-undo (list 'store (symbol-name var) old))
- (if tag
- (let ((calc-full-trail-vectors nil))
- (calc-record value (format ">%s%s" tag (calc-var-name var)))))
- (and (memq var '(var-e var-i var-pi var-phi var-gamma))
- (eq (car-safe old) 'special-const)
- (message "(Note: Built-in definition of %s has been lost)" var))
- (and (memq var '(var-inf var-uinf var-nan))
- (null old)
- (message "(Note: %s has built-in meanings which may interfere)"
- var))
- (calc-refresh-evaltos var))))
+ (let ((msg ""))
+ (if var
+ (let ((old (calc-var-value var)))
+ (set var value)
+ (if pop (or calc-store-keep (calc-pop-stack pop)))
+ (calc-record-undo (list 'store (symbol-name var) old))
+ (if tag
+ (let ((calc-full-trail-vectors nil))
+ (calc-record value (format ">%s%s" tag (calc-var-name var)))))
+ (cond
+ ((and (memq var '(var-e var-i var-pi var-phi var-gamma))
+ (eq (car-safe old) 'special-const))
+ (setq msg (format " (Note: Built-in definition of %s has been lost)"
+ (calc-var-name var))))
+ ((and (memq var '(var-inf var-uinf var-nan))
+ (null old))
+ (setq msg (format " (Note: %s has built-in meanings which may interfere)"
+ (calc-var-name var)))))
+ (calc-refresh-evaltos var)))
+ msg))
(defun calc-var-name (var)
(if (symbolp var) (setq var (symbol-name var)))
@@ -140,8 +149,12 @@
(or var (setq var (calc-read-var-name (format "Store %s: " tag))))
(if var
(let ((old (calc-var-value var)))
- (or old
- (error "No such variable: \"%s\"" (calc-var-name var)))
+ (if (eq (car-safe old) 'special-const)
+ (error "\"%s\" is a special constant" (calc-var-name var)))
+ (if (not old)
+ (if (memq var '(var-inf var-uinf var-nan))
+ (error "\"%s\" is a special variable" (calc-var-name var))
+ (error "No such variable: \"%s\"" (calc-var-name var))))
(if (stringp old)
(setq old (math-read-expr old)))
(if (eq (car-safe old) 'error)
@@ -151,7 +164,7 @@
(list func value old)
(list func old value)))
tag (and (not val) 1))
- (message "Stored to variable \"%s\"" (calc-var-name var)))))))
+ (message "Variable \"%s\" changed" (calc-var-name var)))))))
(defvar calc-var-name-map nil "Keymap for reading Calc variable names.")
(if calc-var-name-map
@@ -228,26 +241,32 @@
(or var (setq var (calc-read-var-name (format "Store Mapping %s: "
(nth 2 oper)))))
(if var
- (let ((old (or (calc-var-value var)
- (error "No such variable: \"%s\""
- (calc-var-name var))))
- (calc-simplify-mode (if (eq calc-simplify-mode 'none)
- 'num calc-simplify-mode))
- (values (and (> nargs 1)
- (calc-top-list (1- nargs) (1+ calc-dollar-used)))))
- (message "Working...")
- (calc-set-command-flag 'clear-message)
- (if (stringp old)
- (setq old (math-read-expr old)))
- (if (eq (car-safe old) 'error)
- (error "Bad format in variable contents: %s" (nth 2 old)))
- (setq values (if (calc-is-inverse)
- (append values (list old))
- (append (list old) values)))
- (calc-store-value var
- (calc-normalize (cons (nth 1 oper) values))
- (nth 2 oper)
- (+ calc-dollar-used (1- nargs))))))))
+ (let ((old (calc-var-value var)))
+ (if (eq (car-safe old) 'special-const)
+ (error "\"%s\" is a special constant" (calc-var-name var)))
+ (if (not old)
+ (if (memq var '(var-inf var-uinf var-nan))
+ (error "\"%s\" is a special variable" (calc-var-name var))
+ (error "No such variable: \"%s\"" (calc-var-name var))))
+ (let ((calc-simplify-mode (if (eq calc-simplify-mode 'none)
+ 'num calc-simplify-mode))
+ (values (and (> nargs 1)
+ (calc-top-list (1- nargs) (1+ calc-dollar-used)))))
+ (message "Working...")
+ (calc-set-command-flag 'clear-message)
+ (if (stringp old)
+ (setq old (math-read-expr old)))
+ (if (eq (car-safe old) 'error)
+ (error "Bad format in variable contents: %s" (nth 2 old)))
+ (setq values (if (calc-is-inverse)
+ (append values (list old))
+ (append (list old) values)))
+ (calc-store-value var
+ (calc-normalize (cons (nth 1 oper) values))
+ (nth 2 oper)
+ (+ calc-dollar-used (1- nargs)))
+ (message "Variable \"%s\" changed" (calc-var-name var))))))))
+
(defun calc-store-exchange (&optional var)
(interactive)
@@ -258,10 +277,12 @@
(or var (setq var (calc-read-var-name "Exchange with: ")))
(if var
(let ((value (calc-var-value var)))
- (or value
- (error "No such variable: \"%s\"" (calc-var-name var)))
(if (eq (car-safe value) 'special-const)
- (error "%s is a special constant" var))
+ (error "\"%s\" is a special constant" (calc-var-name var)))
+ (if (not value)
+ (if (memq var '(var-inf var-uinf var-nan))
+ (error "\"%s\" is a special variable" (calc-var-name var))
+ (error "No such variable: \"%s\"" (calc-var-name var))))
(setq top (or calc-given-value (calc-top 1)))
(calc-store-value var top nil)
(calc-pop-push-record calc-given-value-flag
@@ -366,6 +387,26 @@
(interactive)
(calc-recall (intern (format "var-q%c" last-command-char))))
+(defun calc-copy-special-constant (&optional sconst var)
+ (interactive)
+ (let ((sc '(("")
+ ("e" . (special-const (math-e)))
+ ("pi" . (special-const (math-pi)))
+ ("i" . (special-const (math-imaginary 1)))
+ ("phi" . (special-const (math-phi)))
+ ("gamma" . (special-const (math-gamma-const))))))
+ (calc-wrapper
+ (or sconst (setq sconst (completing-read "Special constant: " sc nil t)))
+ (unless (string= sconst "")
+ (let ((value (cdr (assoc sconst sc))))
+ (or var (setq var (calc-read-var-name
+ (format "Copy special constant %s, to: "
+ sconst))))
+ (if var
+ (let ((msg (calc-store-value var value "")))
+ (message (concat "Special constant \"%s\" copied to \"%s\"" msg)
+ sconst (calc-var-name var)))))))))
+
(defun calc-copy-variable (&optional var1 var2)
(interactive)
(calc-wrapper
@@ -378,7 +419,9 @@
(format "Copy variable: %s, to: "
(calc-var-name var1)))))
(if var2
- (calc-store-value var2 value ""))))))
+ (let ((msg (calc-store-value var2 value "")))
+ (message (concat "Variable \"%s\" copied to \"%s\"" msg)
+ (calc-var-name var1) (calc-var-name var2))))))))
(defvar calc-last-edited-variable nil)
(defun calc-edit-variable (&optional var)
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 5eca356af59..e1c4950b24b 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -643,48 +643,6 @@ since January 1st, 2000, at 12 ET."
; equation of time, in hours
(list app i time-eq nut)))
-(defun solar-longitude (d)
- "Longitude of sun on astronomical (Julian) day number D.
-Accurary is about 0.0006 degree (about 365.25*24*60*0.0006/360 = 1 minutes).
-
-The values of calendar-daylight-savings-starts,
-calendar-daylight-savings-starts-time, calendar-daylight-savings-ends,
-calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and
-calendar-time-zone are used to interpret local time."
- (let* ((a-d (calendar-absolute-from-astro d))
- ;; get Universal Time
- (date (calendar-astro-from-absolute
- (- a-d
- (if (dst-in-effect a-d)
- (/ calendar-daylight-time-offset 24.0 60.0) 0)
- (/ calendar-time-zone 60.0 24.0))))
- ;; get Ephemeris Time
- (date (+ date (solar-ephemeris-correction
- (extract-calendar-year
- (calendar-gregorian-from-absolute
- (floor
- (calendar-absolute-from-astro
- date)))))))
- (U (/ (- date 2451545) 3652500))
- (longitude
- (+ 4.9353929
- (* 62833.1961680 U)
- (* 0.0000001
- (apply '+
- (mapcar '(lambda (x)
- (* (car x)
- (sin (mod
- (+ (car (cdr x))
- (* (car (cdr (cdr x))) U))
- (* 2 pi)))))
- solar-data-list)))))
- (aberration
- (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973)))
- (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi)))
- (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi)))
- (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2))))))
- (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0)))
-
(defconst solar-data-list
'((403406 4.721964 1.621043)
(195207 5.937458 62830.348067)
@@ -737,6 +695,48 @@ calendar-time-zone are used to interpret local time."
(10 1.50 21463.25)
(10 2.55 157208.40)))
+(defun solar-longitude (d)
+ "Longitude of sun on astronomical (Julian) day number D.
+Accurary is about 0.0006 degree (about 365.25*24*60*0.0006/360 = 1 minutes).
+
+The values of calendar-daylight-savings-starts,
+calendar-daylight-savings-starts-time, calendar-daylight-savings-ends,
+calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and
+calendar-time-zone are used to interpret local time."
+ (let* ((a-d (calendar-absolute-from-astro d))
+ ;; get Universal Time
+ (date (calendar-astro-from-absolute
+ (- a-d
+ (if (dst-in-effect a-d)
+ (/ calendar-daylight-time-offset 24.0 60.0) 0)
+ (/ calendar-time-zone 60.0 24.0))))
+ ;; get Ephemeris Time
+ (date (+ date (solar-ephemeris-correction
+ (extract-calendar-year
+ (calendar-gregorian-from-absolute
+ (floor
+ (calendar-absolute-from-astro
+ date)))))))
+ (U (/ (- date 2451545) 3652500))
+ (longitude
+ (+ 4.9353929
+ (* 62833.1961680 U)
+ (* 0.0000001
+ (apply '+
+ (mapcar '(lambda (x)
+ (* (car x)
+ (sin (mod
+ (+ (car (cdr x))
+ (* (car (cdr (cdr x))) U))
+ (* 2 pi)))))
+ solar-data-list)))))
+ (aberration
+ (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973)))
+ (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi)))
+ (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi)))
+ (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2))))))
+ (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0)))
+
(defun solar-ephemeris-correction (year)
"Ephemeris time minus Universal Time during Gregorian year.
Result is in days.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 9a1449823ca..0ce006af241 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -760,7 +760,10 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.")
;; The files used are determined by ARG (as in dired-get-marked-files).
(or (eq dired-no-confirm t)
(memq op-symbol dired-no-confirm)
- (let ((files (dired-get-marked-files t arg))
+ ;; Pass t for DISTINGUISH-ONE-MARKED so that a single file which
+ ;; is marked pops up a window. That will help the user see
+ ;; it isn't the current line file.
+ (let ((files (dired-get-marked-files t arg nil t))
(string (if (eq op-symbol 'compress) "Compress or uncompress"
(capitalize (symbol-name op-symbol)))))
(dired-mark-pop-up nil op-symbol files (function y-or-n-p)
diff --git a/lisp/dired.el b/lisp/dired.el
index afea6b173a6..60a9a7d35c1 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -450,7 +450,8 @@ Return value is the number of files marked, or nil if none were marked."
"flagged" "marked"))))
(and (> count 0) count)))
-(defmacro dired-map-over-marks (body arg &optional show-progress)
+(defmacro dired-map-over-marks (body arg &optional show-progress
+ distinguish-one-marked)
"Eval BODY with point on each marked line. Return a list of BODY's results.
If no marked file could be found, execute BODY on the current line.
If ARG is an integer, use the next ARG (or previous -ARG, if ARG<0)
@@ -465,7 +466,10 @@ No guarantee is made about the position on the marked line.
Search starts at the beginning of the buffer, thus the car of the list
corresponds to the line nearest to the buffer's bottom. This
is also true for (positive and negative) integer values of ARG.
-BODY should not be too long as it is expanded four times."
+BODY should not be too long as it is expanded four times.
+
+If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
+return (t FILENAME) instead of (FILENAME)."
;;
;;Warning: BODY must not add new lines before point - this may cause an
;;endless loop.
@@ -505,13 +509,15 @@ BODY should not be too long as it is expanded four times."
(set-marker next-position nil)
(setq next-position (and (re-search-forward regexp nil t)
(point-marker)))))
+ (if (and ,distinguish-one-marked (= (length results) 1))
+ (setq results (cons t results)))
(if found
results
(list ,body)))))
;; save-excursion loses, again
(dired-move-to-filename)))
-(defun dired-get-marked-files (&optional localp arg filter)
+(defun dired-get-marked-files (&optional localp arg filter distinguish-one-marked)
"Return the marked files' names as list of strings.
The list is in the same order as the buffer, that is, the car is the
first marked file.
@@ -522,13 +528,21 @@ Optional second argument ARG specifies files near point
If ARG is otherwise non-nil, use file. Usually ARG comes from
the command's prefix arg.
Optional third argument FILTER, if non-nil, is a function to select
- some of the files--those for which (funcall FILTER FILENAME) is non-nil."
- (let ((all-of-them
- (save-excursion
- (dired-map-over-marks (dired-get-filename localp) arg)))
- result)
+ some of the files--those for which (funcall FILTER FILENAME) is non-nil.
+
+If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
+return (t FILENAME) instead of (FILENAME).
+Don't use that together with FILTER."
+ (let* ((all-of-them
+ (save-excursion
+ (dired-map-over-marks
+ (dired-get-filename localp)
+ arg nil distinguish-one-marked)))
+ result)
(if (not filter)
- (nreverse all-of-them)
+ (if (and distinguish-one-marked (eq (car all-of-them) t))
+ all-of-them
+ (nreverse all-of-them))
(dolist (file all-of-them)
(if (funcall filter file)
(push file result)))
@@ -1535,7 +1549,7 @@ Keybindings:
(setq dired-switches-alist nil)
(dired-sort-other dired-actual-switches t)
(when (featurep 'dnd)
- (make-variable-buffer-local 'dnd-protocol-alist)
+ (make-local-variable 'dnd-protocol-alist)
(setq dnd-protocol-alist
(append dired-dnd-protocol-alist dnd-protocol-alist)))
(run-mode-hooks 'dired-mode-hook))
@@ -2537,15 +2551,21 @@ FUNCTION should not manipulate files, just read input
(an argument or confirmation).
The window is not shown if there is just one file or
OP-SYMBOL is a member of the list in `dired-no-confirm'.
-FILES is the list of marked files."
+FILES is the list of marked files. It can also be (t FILENAME)
+in the case of one marked file, to distinguish that from using
+just the current file."
(or bufname (setq bufname " *Marked Files*"))
(if (or (eq dired-no-confirm t)
(memq op-symbol dired-no-confirm)
+ ;; If FILES defaulted to the current line's file.
(= (length files) 1))
(apply function args)
(with-current-buffer (get-buffer-create bufname)
(erase-buffer)
- (dired-format-columns-of-files files)
+ ;; Handle (t FILE) just like (FILE), here.
+ ;; That value is used (only in some cases), to mean
+ ;; just one file that was marked, rather than the current line file.
+ (dired-format-columns-of-files (if (eq (car files) t) (cdr files) files))
(remove-text-properties (point-min) (point-max)
'(mouse-face nil help-echo nil)))
(save-window-excursion
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 927f2e3bdb6..96c9e18a3f1 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -36,6 +36,7 @@
;;; Customizable variables
+;;;###autoload
(defcustom dnd-protocol-alist
'(
("^file:///" . dnd-open-local-file) ; XDND format.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b93979de82c..970a64d062b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -338,8 +338,8 @@ Elements of the list may be be:
free-vars references to variables not in the current lexical scope.
unresolved calls to unknown functions.
- callargs lambda calls with args that don't match the definition.
- redefine function cell redefined from a macro to a lambda or vice
+ callargs function calls with args that don't match the definition.
+ redefine function name redefined from a macro to ordinary function or vice
versa, or redefined to take a different number of arguments.
obsolete obsolete variables and functions.
noruntime functions that may not be defined at runtime (typically
@@ -1244,6 +1244,20 @@ extra args."
(dolist (elt '(format message error))
(put elt 'byte-compile-format-like t))
+;; Warn if a custom definition fails to specify :group.
+(defun byte-compile-nogroup-warn (form)
+ (let ((keyword-args (cdr (cdr (cdr (cdr form)))))
+ (name (cadr form)))
+ (unless (plist-get keyword-args :group)
+ (byte-compile-warn
+ "%s for `%s' fails to specify containing group"
+ (cdr (assq (car form)
+ '((custom-declare-group . defgroup)
+ (custom-declare-face . defface)
+ (custom-declare-variable . defcustom))))
+ (if (and (consp name) (eq (car name) 'quote))
+ (cadr name) name)))))
+
;; Warn if the function or macro is being redefined with a different
;; number of arguments.
(defun byte-compile-arglist-warn (form macrop)
@@ -2729,7 +2743,7 @@ If FORM is a lambda or a macro, byte-compile it as a function."
(when (byte-compile-const-symbol-p fn)
(byte-compile-warn "`%s' called as a function" fn))
(and (memq 'interactive-only byte-compile-warnings)
- (memq (car form) byte-compile-interactive-only-functions)
+ (memq fn byte-compile-interactive-only-functions)
(byte-compile-warn "`%s' used from Lisp code\n\
That command is designed for interactive use only" fn))
(if (and handler
@@ -2739,8 +2753,10 @@ That command is designed for interactive use only" fn))
(progn
(byte-compile-set-symbol-position fn)
(funcall handler form))
- (if (memq 'callargs byte-compile-warnings)
- (byte-compile-callargs-warn form))
+ (when (memq 'callargs byte-compile-warnings)
+ (if (memq fn '(custom-declare-group custom-declare-variable custom-declare-face))
+ (byte-compile-nogroup-warn form))
+ (byte-compile-callargs-warn form))
(byte-compile-normal-call form))
(if (memq 'cl-functions byte-compile-warnings)
(byte-compile-cl-warn form))))
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index c2d3303c825..30c76b8769a 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -189,6 +189,8 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
last)
(set-marker e (1+ (match-end 2)))
(goto-char s)
+ ;; Back up one character so that our search can match the first year.
+ (backward-char 1)
(while (and (< (point) (marker-position e))
(re-search-forward "\\([^0-9]\\)\\([0-9]+\\)[^0-9]"
(marker-position e) t))
@@ -204,8 +206,12 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
(setq last p)))
(when last
(goto-char last)
- (let ((fill-prefix " "))
- (fill-region s last))
+ ;; Don't mess up whitespace after the years.
+ (skip-chars-backward " \t")
+ (save-restriction
+ (narrow-to-region (point-min) (point))
+ (let ((fill-prefix " "))
+ (fill-region s last)))
)
(set-marker e nil)
(copyright-update nil t))
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index a10b8546d03..c00028ad218 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -158,7 +158,9 @@ Note that if the documentation string had been left out, it would have
been generated automatically, with a reference to the keymap.
The new mode runs the hook constructed by the function
-`derived-mode-hook-name'."
+`derived-mode-hook-name'.
+
+See Info node `(elisp)Derived Modes' for more details."
(declare (debug (&define name symbolp sexp [&optional stringp]
[&rest keywordp sexp] def-body)))
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 78ba1fe27bf..c9f1769ae14 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -65,7 +65,7 @@ It returns the remaining items of the displayed menu.
:visible INCLUDE
INCLUDE is an expression; this menu is only visible if this
-expression has a non-nil value. `:include' is an alias for `:visible'.
+expression has a non-nil value. `:included' is an alias for `:visible'.
:active ENABLE
@@ -110,10 +110,10 @@ keyboard equivalent.
ENABLE is an expression; the item is enabled for selection
whenever this expression's value is non-nil.
- :included INCLUDE
+ :visible INCLUDE
INCLUDE is an expression; this item is only visible if this
-expression has a non-nil value.
+expression has a non-nil value. `:included' is an alias for `:visible'.
:suffix FORM
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index b23217151e3..1546d078aea 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -229,6 +229,7 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
(not (eq (selected-window) (minibuffer-window)))))
+;;;###autoload
(defvar eldoc-documentation-function nil
"If non-nil, function to call to return doc string.
The function of no args should return a one-line string for displaying
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 8f4245cb9a1..bb815481bf0 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -192,6 +192,9 @@
;; Look within the line for a ; following an even number of backslashes
;; after either a non-backslash or the line beginning.
(setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
+ (make-local-variable 'font-lock-comment-start-skip)
+ ;; Font lock mode uses this only when it KNOWS a comment is starting.
+ (setq font-lock-comment-start-skip ";+ *")
(make-local-variable 'comment-add)
(setq comment-add 1) ;default to `;;' in comment-region
(make-local-variable 'comment-column)
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 7b07b84563a..54d4c4acb9e 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -517,7 +517,8 @@ This is used by `eshell-watch-for-password-prompt'."
(let ((inhibit-read-only t)
(no-default (eobp))
(find-tag-default-function 'ignore))
- (setq tagname (car (find-tag-interactive "Find tag: ")))
+ (with-no-warnings
+ (setq tagname (car (find-tag-interactive "Find tag: "))))
(find-tag tagname next-p regexp-p)))
(defun eshell-move-argument (limit func property arg)
diff --git a/lisp/faces.el b/lisp/faces.el
index 03b3a769955..b6bc8e88f64 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1257,17 +1257,32 @@ If FRAME is omitted or nil, use the selected frame."
(insert "Face: " (symbol-name f))
(if (not (facep f))
(insert " undefined face.\n")
- (let ((customize-label "customize this face"))
+ (let ((customize-label "customize this face")
+ file-name)
(princ (concat " (" customize-label ")\n"))
(insert "Documentation: "
(or (face-documentation f)
"Not documented as a face.")
- "\n\n")
+ "\n")
(with-current-buffer standard-output
(save-excursion
(re-search-backward
(concat "\\(" customize-label "\\)") nil t)
(help-xref-button 1 'help-customize-face f)))
+ ;; The next 4 sexps are copied from describe-function-1
+ ;; and simplified.
+ (setq file-name (symbol-file f 'defface))
+ (when file-name
+ (princ "Defined in `")
+ (princ file-name)
+ (princ "'")
+ ;; Make a hyperlink to the library.
+ (save-excursion
+ (re-search-backward "`\\([^`']+\\)'" nil t)
+ (help-xref-button 1 'help-face-def f file-name))
+ (princ ".")
+ (terpri)
+ (terpri))
(dolist (a attrs)
(let ((attr (face-attribute f (car a) frame)))
(insert (make-string (- max-width (length (cdr a))) ?\ )
@@ -2078,7 +2093,7 @@ Note: Other faces cannot inherit from the cursor face."
(t :inverse-video t))
"Basic face for highlighting trailing whitespace."
:version "21.1"
- :group 'font-lock ; like `show-trailing-whitespace'
+ :group 'whitespace ; like `show-trailing-whitespace'
:group 'basic-faces)
(defface escape-glyph '((((background dark)) :foreground "cyan")
diff --git a/lisp/files.el b/lisp/files.el
index cdd4405d0cc..da2090d7752 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -541,7 +541,7 @@ DIR should be an absolute directory name. It defaults to
the value of `default-directory'."
(unless dir
(setq dir default-directory))
- (read-file-name prompt dir (or default-dirname
+ (read-file-name prompt dir (or default-dirname
(if initial (expand-file-name initial dir)
dir))
mustmatch initial
@@ -1944,7 +1944,7 @@ and `magic-mode-alist', which determines modes based on file contents.")
"Alist mapping interpreter names to major modes.
This is used for files whose first lines match `auto-mode-interpreter-regexp'.
Each element looks like (INTERPRETER . MODE).
-The car of each element is compared with
+The car of each element, a regular expression, is compared with
the name of the interpreter specified in the first line.
If it matches, mode MODE is selected.
@@ -1961,13 +1961,12 @@ from the end of the file name anything that matches one of these regexps.")
(defvar auto-mode-interpreter-regexp
"#![ \t]?\\([^ \t\n]*\
/bin/env[ \t]\\)?\\([^ \t\n]+\\)"
- "Regular expression matching interpreters, for file mode determination.
+ "Regexp matching interpreters, for file mode determination.
This regular expression is matched against the first line of a file
-to determine the file's mode in `set-auto-mode' when Emacs can't deduce
-a mode from the file's name. If it matches, the file is assumed to
-be interpreted by the interpreter matched by the second group of the
-regular expression. The mode is then determined as the mode associated
-with that interpreter in `interpreter-mode-alist'.")
+to determine the file's mode in `set-auto-mode'. If it matches, the file
+is assumed to be interpreted by the interpreter matched by the second group
+of the regular expression. The mode is then determined as the mode
+associated with that interpreter in `interpreter-mode-alist'.")
(defvar magic-mode-alist
`(;; The < comes before the groups (but the first) to reduce backtracking.
@@ -2153,7 +2152,7 @@ Otherwise, return nil; point may be changed."
(goto-char beg)
end))))
-(defun hack-local-variables-confirm ()
+(defun hack-local-variables-confirm (string)
(or (eq enable-local-variables t)
(and enable-local-variables
(save-window-excursion
@@ -2170,8 +2169,10 @@ Otherwise, return nil; point may be changed."
(save-excursion
(beginning-of-line)
(set-window-start (selected-window) (point)))
- (y-or-n-p (format "Set local variables as specified in -*- line of %s? "
- (file-name-nondirectory buffer-file-name)))))))
+ (y-or-n-p (format string
+ (if buffer-file-name
+ (file-name-nondirectory buffer-file-name)
+ (concat "buffer " (buffer-name)))))))))
(defun hack-local-variables-prop-line (&optional mode-only)
"Set local variables specified in the -*- line.
@@ -2227,7 +2228,8 @@ is specified, returning t if it is specified."
(if mode-only mode-specified
(if (and result
(or mode-only
- (hack-local-variables-confirm)))
+ (hack-local-variables-confirm
+ "Set local variables as specified in -*- line of %s? ")))
(let ((enable-local-eval enable-local-eval))
(while result
(hack-one-local-variable (car (car result)) (cdr (car result)))
@@ -2257,7 +2259,8 @@ is specified, returning t if it is specified."
(when (let ((case-fold-search t))
(and (search-forward "Local Variables:" nil t)
(or mode-only
- (hack-local-variables-confirm))))
+ (hack-local-variables-confirm
+ "Set local variables as specified at end of %s? "))))
(skip-chars-forward " \t")
(let ((enable-local-eval enable-local-eval)
;; suffix is what comes after "local variables:" in its line.
@@ -2478,7 +2481,8 @@ is considered risky."
(hack-one-local-variable-eval-safep val))
;; Permit eval if not root and user says ok.
(and (not (zerop (user-uid)))
- (hack-local-variables-confirm)))
+ (hack-local-variables-confirm
+ "Process `eval' or hook local variables in %s? ")))
(if (eq var 'eval)
(save-excursion (eval val))
(make-local-variable var)
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index fdc0ebf255d..444ca80f94c 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1311,12 +1311,19 @@ START should be at the beginning of a line."
;;; Syntactic fontification functions.
+(defvar font-lock-comment-start-skip nil
+ "If non-nil, Font Lock mode uses this instead of `comment-start-skip'.")
+
+(defvar font-lock-comment-end-skip nil
+ "If non-nil, Font Lock mode uses this instead of `comment-end'.")
+
(defun font-lock-fontify-syntactically-region (start end &optional loudly ppss)
"Put proper face on each string and comment between START and END.
START should be at the beginning of a line."
(let ((comment-end-regexp
- (regexp-quote
- (replace-regexp-in-string "^ *" "" comment-end)))
+ (or font-lock-comment-end-skip
+ (regexp-quote
+ (replace-regexp-in-string "^ *" "" comment-end))))
state face beg)
(if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
(goto-char start)
@@ -1334,12 +1341,14 @@ START should be at the beginning of a line."
'syntax-table))
(when face (put-text-property beg (point) 'face face))
(when (and (eq face 'font-lock-comment-face)
- comment-start-skip)
+ (or font-lock-comment-start-skip
+ comment-start-skip))
;; Find the comment delimiters
;; and use font-lock-comment-delimiter-face for them.
(save-excursion
(goto-char beg)
- (if (looking-at comment-start-skip)
+ (if (looking-at (or font-lock-comment-start-skip
+ comment-start-skip))
(put-text-property beg (match-end 0) 'face
font-lock-comment-delimiter-face)))
(if (looking-back comment-end-regexp (point-at-bol))
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 8b0284089fc..d94f03200dc 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -169,6 +169,18 @@ The format is (FUNCTION ARGS...).")
(goto-char (cdr location))))
'help-echo (purecopy"mouse-2, RET: find variable's definition"))
+(define-button-type 'help-face-def
+ :supertype 'help-xref
+ 'help-function (lambda (fun file)
+ (require 'find-func)
+ ;; Don't use find-function-noselect because it follows
+ ;; aliases (which fails for built-in functions).
+ (let ((location
+ (find-function-search-for-symbol fun 'defface file)))
+ (pop-to-buffer (car location))
+ (goto-char (cdr location))))
+ 'help-echo (purecopy "mouse-2, RET: find face's definition"))
+
;;;###autoload
(defun help-mode ()
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index e2e5d251371..87d9eb707eb 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1024,7 +1024,9 @@ currently used by buffers."
(ibuffer-awhen (with-current-buffer buf
(or buffer-file-name
(and (boundp 'dired-directory)
- dired-directory
+ (if (stringp dired-directory)
+ dired-directory
+ (car dired-directory))
(expand-file-name dired-directory))))
(string-match qualifier it)))
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index f2ebb5db324..213160b6f37 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1688,7 +1688,9 @@ If point is on a group name, this function operates on that group."
(abbreviate-file-name
(or buffer-file-name
(and (boundp 'dired-directory)
- dired-directory)
+ (if (stringp dired-directory)
+ dired-directory
+ (car dired-directory)))
""))))
(define-ibuffer-column filename-and-process
diff --git a/lisp/ido.el b/lisp/ido.el
index 519d57cbb88..d7c0c8aa9ea 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1392,10 +1392,15 @@ This function also adds a hook to the minibuffer."
(define-key map [left] 'ido-prev-match)
(define-key map "?" 'ido-completion-help)
+ ;; Magic commands.
+ (define-key map "\C-b" 'ido-magic-backward-char)
+ (define-key map "\C-f" 'ido-magic-forward-char)
+ (define-key map "\C-d" 'ido-magic-delete-char)
+
(when (memq ido-cur-item '(file dir))
- (define-key map "\C-b" (or ido-context-switch-command 'ido-enter-switch-buffer))
- (define-key map "\C-d" (or (and ido-context-switch-command 'ignore) 'ido-enter-dired))
- (define-key map "\C-f" 'ido-fallback-command)
+ (define-key map "\C-x\C-b" (or ido-context-switch-command 'ido-enter-switch-buffer))
+ (define-key map "\C-x\C-f" 'ido-fallback-command)
+ (define-key map "\C-x\C-d" (or (and ido-context-switch-command 'ignore) 'ido-enter-dired))
(define-key map [down] 'ido-next-match-dir)
(define-key map [up] 'ido-prev-match-dir)
(define-key map [(meta up)] 'ido-prev-work-directory)
@@ -1405,7 +1410,7 @@ This function also adds a hook to the minibuffer."
(define-key map [(meta backspace)] 'ido-delete-backward-word-updir)
(define-key map [(control backspace)] 'ido-up-directory)
(define-key map "\C-l" 'ido-reread-directory)
- (define-key map [(meta ?d)] 'ido-wide-find-dir)
+ (define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir)
(define-key map [(meta ?b)] 'ido-push-dir)
(define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir)
(define-key map [(meta ?k)] 'ido-forget-work-directory)
@@ -1426,8 +1431,8 @@ This function also adds a hook to the minibuffer."
)
(when (eq ido-cur-item 'buffer)
- (define-key map "\C-f" (or ido-context-switch-command 'ido-enter-find-file))
- (define-key map "\C-b" 'ido-fallback-command)
+ (define-key map "\C-x\C-f" (or ido-context-switch-command 'ido-enter-find-file))
+ (define-key map "\C-x\C-b" 'ido-fallback-command)
(define-key map "\C-k" 'ido-kill-buffer-at-head)
)
@@ -2258,6 +2263,52 @@ If no merge has yet taken place, toggle automatic merging option."
((not ido-use-merged-list)
(ido-merge-work-directories))))
+;;; Magic C-f
+
+(defun ido-magic-forward-char ()
+ "Move forward in user input or perform magic action.
+If no user input is present, perform magic actions:
+C-x C-f C-f fallback to non-ido find-file.
+C-x C-d C-f fallback to non-ido brief dired.
+C-x d C-f fallback to non-ido dired."
+ (interactive)
+ (cond
+ ((not (eobp))
+ (forward-char 1))
+ ((and (= (length ido-text) 0)
+ (memq ido-cur-item '(file dir)))
+ (ido-fallback-command))))
+
+;;; Magic C-b
+
+(defun ido-magic-backward-char ()
+ "Move backward in user input or perform magic action.
+If no user input is present, perform magic actions:
+C-x C-b C-b fallback to non-ido switch-to-buffer."
+ (interactive)
+ (cond
+ ((> (length ido-text) 0)
+ (if (> (point) (minibuffer-prompt-end))
+ (forward-char -1)))
+ ((eq ido-cur-item 'buffer)
+ (ido-fallback-command))))
+
+;;; Magic C-d
+
+(defun ido-magic-delete-char ()
+ "Delete following char in user input or perform magic action.
+If at end of user input, perform magic actions:
+C-x C-f ... C-d enter dired on current directory."
+ (interactive)
+ (cond
+ ((not (eobp))
+ (delete-char 1))
+ (ido-context-switch-command
+ nil)
+ ((memq ido-cur-item '(file dir))
+ (ido-enter-dired))))
+
+
;;; TOGGLE FUNCTIONS
(defun ido-toggle-case ()
@@ -2505,6 +2556,14 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
(setq ido-rotate-temp t)
(exit-minibuffer)))
+(defun ido-wide-find-dir-or-delete-dir (&optional dir)
+ "Prompt for DIR to search for using find, starting from current directory.
+If input stack is non-empty, delete current directory component."
+ (interactive)
+ (if ido-input-stack
+ (ido-delete-backward-word-updir 1)
+ (ido-wide-find-dir)))
+
(defun ido-push-dir ()
"Move to previous directory in file name, push current input on stack."
(interactive)
@@ -4077,6 +4136,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
;;; Helper functions for other programs
(put 'dired-do-rename 'ido 'ignore)
+(put 'ibuffer-find-file 'ido 'find-file)
;;;###autoload
(defun ido-read-buffer (prompt &optional default require-match)
@@ -4111,7 +4171,8 @@ See `read-file-name' for additional parameters."
(not (memq this-command ido-read-file-name-non-ido))
(or (null predicate) (eq predicate 'file-exists-p)))
(let* (ido-saved-vc-hb
- (ido-context-switch-command 'ignore)
+ (ido-context-switch-command
+ (if (eq (get this-command 'ido) 'find-file) nil 'ignore))
(vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))
(ido-current-directory (ido-expand-directory dir))
(ido-directory-nonreadable (not (file-readable-p ido-current-directory)))
@@ -4126,6 +4187,8 @@ See `read-file-name' for additional parameters."
(cond
((eq ido-exit 'fallback)
(setq filename 'fallback))
+ ((eq ido-exit 'dired)
+ (setq filename ido-current-directory))
(filename
(setq filename
(concat ido-current-directory filename))))))
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index 39acbb33dfd..88da8ffed79 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -173,6 +173,7 @@ coding system names is determined from `latex-inputenc-coding-alist'."
'undecided))))
'undecided))
+
(provide 'latexenc)
;; arch-tag: f971bc3e-1fec-4609-8f2f-73dd41ab22e1
diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el
index c3fe365d8a5..112bc22cfc6 100644
--- a/lisp/international/ogonek.el
+++ b/lisp/international/ogonek.el
@@ -166,7 +166,7 @@ znak/ow diakrytycznych. Funkcje te mo/zna pogrupowa/c nast/epuj/aco.
(set-buffer (get-buffer-create " *ogonek-jak*"))
(insert ogonek-informacja)
(switch-to-buffer " *ogonek-jak*")
- (beginning-of-buffer))
+ (goto-char (point-min)))
;; ------ A Little Info in English --------
@@ -264,7 +264,7 @@ The functions come in the following groups.
(set-buffer (get-buffer-create " *ogonek-how*"))
(insert ogonek-information)
(switch-to-buffer " *ogonek-how*")
- (beginning-of-buffer))
+ (goto-char (point-min)))
;; ---- Variables keeping the suggested answers to dialogue questions -----
(defvar ogonek-encoding-choices
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index cc7aaa65c67..1a833832379 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -1,8 +1,10 @@
;;; china-util.el --- utilities for Chinese -*- coding: iso-2022-7bit -*-
-;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-;; Copyright (C) 1995, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001, 2003
+;; Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: mule, multilingual, Chinese
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el
index e3a1938b790..70b35bf62fb 100644
--- a/lisp/language/chinese.el
+++ b/lisp/language/chinese.el
@@ -1,7 +1,9 @@
;;; chinese.el --- support for Chinese -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 1998
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Chinese
diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el
index 1ccc97a2754..3bccb2561e4 100644
--- a/lisp/language/cyril-util.el
+++ b/lisp/language/cyril-util.el
@@ -1,6 +1,6 @@
;;; cyril-util.el --- utilities for Cyrillic scripts
-;; Copyright (C) 1997, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
;; Keywords: mule, multilingual, Cyrillic
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index 32ad01602e2..44a9ccc66a1 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -1,8 +1,9 @@
;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Author: Kenichi Handa <handa@etl.go.jp>
;; Keywords: multilingual, Cyrillic, i18n
diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el
index 24b9d40eec0..3b7ea905206 100644
--- a/lisp/language/devan-util.el
+++ b/lisp/language/devan-util.el
@@ -1,6 +1,10 @@
;;; devan-util.el --- Support for composing Devanagari characters
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2001, 2002, 2003
+;; Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2000
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
;; Keywords: multilingual, Devanagari
diff --git a/lisp/language/devanagari.el b/lisp/language/devanagari.el
index bf590d0a00a..ab0faae441b 100644
--- a/lisp/language/devanagari.el
+++ b/lisp/language/devanagari.el
@@ -1,6 +1,6 @@
;;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*-
-;; Copyright (C) 1996, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
;; Keywords: multilingual, Indian, Devanagari
diff --git a/lisp/language/english.el b/lisp/language/english.el
index bff51f89644..1c536612244 100644
--- a/lisp/language/english.el
+++ b/lisp/language/english.el
@@ -1,7 +1,9 @@
;;; english.el --- support for English -*- no-byte-compile: t -*-
-;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1997
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multibyte character, character set, syntax, category
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index aec352a5f75..cf893ffa48b 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -1,7 +1,10 @@
;;; ethio-util.el --- utilities for Ethiopic -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1997, 2001 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1997, 1998, 2002
+;; Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2001, 2004, 2005
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: mule, multilingual, Ethiopic
diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el
index a0140b585fb..b5e4299e907 100644
--- a/lisp/language/ethiopic.el
+++ b/lisp/language/ethiopic.el
@@ -1,7 +1,9 @@
;;; ethiopic.el --- support for Ethiopic -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1995, 2001 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Ethiopic
diff --git a/lisp/language/european.el b/lisp/language/european.el
index 7c51ec4d556..78f7900ffba 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -1,8 +1,10 @@
;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004
+;; Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, European
diff --git a/lisp/language/greek.el b/lisp/language/greek.el
index 0283f0fbfde..bd67b878ee6 100644
--- a/lisp/language/greek.el
+++ b/lisp/language/greek.el
@@ -1,7 +1,8 @@
;;; greek.el --- support for Greek -*- no-byte-compile: t -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1995
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Greek
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el
index 07407c8848d..fbb343d0c90 100644
--- a/lisp/language/hebrew.el
+++ b/lisp/language/hebrew.el
@@ -1,8 +1,9 @@
;;; hebrew.el --- support for Hebrew -*- coding: iso-2022-7bit; no-byte-compile: t -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1995
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Hebrew
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 4b9e08045db..91c7ecb5f28 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -1,6 +1,9 @@
;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
;; Keywords: multilingual, i18n, Indian
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index e9a80fc99a7..81a40a9c450 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -1,8 +1,9 @@
;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2001 Free SOftware Foundation, Inc.
+;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998, 2000, 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: mule, multilingual, Japanese
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index 84efe70e4bb..92020acc685 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -1,7 +1,9 @@
;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 1998
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Japanese
diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el
index 222832022ac..de940f5317f 100644
--- a/lisp/language/korea-util.el
+++ b/lisp/language/korea-util.el
@@ -1,6 +1,9 @@
;;; korea-util.el --- utilities for Korean
-;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: mule, multilingual, Korean
diff --git a/lisp/language/korean.el b/lisp/language/korean.el
index d03424ff093..6a7479cf151 100644
--- a/lisp/language/korean.el
+++ b/lisp/language/korean.el
@@ -1,7 +1,9 @@
;;; korean.el --- support for Korean -*- coding: iso-2022-7bit; no-byte-compile: t -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Korean
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index 8a0c89dc048..7ac1599c2cd 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -1,8 +1,9 @@
;;; lao-util.el --- utilities for Lao -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2000
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Lao
diff --git a/lisp/language/lao.el b/lisp/language/lao.el
index b26a8f389ed..ab33dfa25e6 100644
--- a/lisp/language/lao.el
+++ b/lisp/language/lao.el
@@ -1,8 +1,9 @@
;;; lao.el --- support for Lao -*- coding: iso-2022-7bit; no-byte-compile: t -*-
-;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2002
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Lao
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index 537267ce9ba..47993e16ea5 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -1,7 +1,8 @@
;;; misc-lang.el --- support for miscellaneous languages (characters) -*- no-byte-compile: t -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1995, 1997
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, character set, coding system
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index 3b9e6afbce7..0ab9413a483 100644
--- a/lisp/language/tibet-util.el
+++ b/lisp/language/tibet-util.el
@@ -1,7 +1,9 @@
;;; tibet-util.el --- utilities for Tibetan -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1997, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 1998, 2000
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Tibetan
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el
index c9e67bd0b01..72267c96479 100644
--- a/lisp/language/tibetan.el
+++ b/lisp/language/tibetan.el
@@ -1,7 +1,9 @@
;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1997, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2000
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Tibetan
diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el
index 5a92bf203a0..f492e504568 100644
--- a/lisp/language/viet-util.el
+++ b/lisp/language/viet-util.el
@@ -1,7 +1,9 @@
;;; viet-util.el --- utilities for Vietnamese -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: mule, multilingual, Vietnamese
diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el
index 1c1e3bd6094..95302b64b67 100644
--- a/lisp/language/vietnamese.el
+++ b/lisp/language/vietnamese.el
@@ -1,7 +1,9 @@
;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 1998, 2000
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Keywords: multilingual, Vietnamese
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index 6b769f53801..d9a9d78d0b9 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -153,6 +153,7 @@ a variable whose value is a citation frame."
(choice (repeat (repeat sexp))
symbol)))))
:group 'supercite-frames)
+(put 'sc-cite-frame-alist 'risky-local-variable t)
(defcustom sc-uncite-frame-alist '()
"*Alist for frame selection during unciting.
@@ -161,6 +162,7 @@ See the variable `sc-cite-frame-alist' for details."
(choice (repeat (repeat sexp))
symbol)))))
:group 'supercite-frames)
+(put 'sc-uncite-frame-alist 'risky-local-variable t)
(defcustom sc-recite-frame-alist '()
"*Alist for frame selection during reciting.
@@ -169,6 +171,7 @@ See the variable `sc-cite-frame-alist' for details."
(choice (repeat (repeat sexp))
symbol)))))
:group 'supercite-frames)
+(put 'sc-recite-frame-alist 'risky-local-variable t)
(defcustom sc-default-cite-frame
'(;; initialize fill state and temporary variables when entering
@@ -214,6 +217,7 @@ See the variable `sc-cite-frame-alist' for details."
"*Default REGI frame for citing a region."
:type '(repeat (repeat sexp))
:group 'supercite-frames)
+(put 'sc-default-cite-frame 'risky-local-variable t)
(defcustom sc-default-uncite-frame
'(;; do nothing on a blank line
@@ -224,6 +228,7 @@ See the variable `sc-cite-frame-alist' for details."
"*Default REGI frame for unciting a region."
:type '(repeat (repeat sexp))
:group 'supercite-frames)
+(put 'sc-default-uncite-frame 'risky-local-variable t)
(defcustom sc-default-recite-frame
'(;; initialize fill state when entering frame
@@ -240,6 +245,7 @@ See the variable `sc-cite-frame-alist' for details."
"*Default REGI frame for reciting a region."
:type '(repeat (repeat sexp))
:group 'supercite-frames)
+(put 'sc-default-recite-frame 'risky-local-variable t)
(defcustom sc-cite-region-limit t
"*This variable controls automatic citation of yanked text.
@@ -427,6 +433,7 @@ to be consulted during attribution selection."
(choice (sexp :tag "List to eval")
string)))))
:group 'supercite-attr)
+(put 'sc-attrib-selection-list 'risky-local-variable t)
(defcustom sc-attribs-preselect-hook nil
"*Hook to run before selecting an attribution."
@@ -482,6 +489,7 @@ this list is chosen for automatic reference header insertions.
Electric reference mode will cycle through this list of functions."
:type '(repeat sexp)
:group 'supercite)
+(put 'sc-rewrite-header-list 'risky-local-variable t)
(defcustom sc-titlecue-regexp "\\s +-+\\s +"
"*Regular expression describing the separator between names and titles.
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index 4a54702643a..203d19ce14e 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -468,7 +468,8 @@ If your system's ping continues until interrupted, you can try setting
(require 'ffap)
(read-from-minibuffer
"Lookup host: "
- (or (ffap-string-at-point 'machine) "")))))
+ (with-no-warnings
+ (or (ffap-string-at-point 'machine) ""))))))
(net-utils-run-program
"Dig"
(concat "** "
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index bfdf7ed067a..c602a12aaa1 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1352,7 +1352,9 @@ autocorrect\" to the remote host."
;; Chunked sending kluge. We set this to 500 for black-listed constellations
;; known to have a bug in `process-send-string'; some ssh connections appear
-;; to drop bytes when data is sent too quickly.
+;; to drop bytes when data is sent too quickly. There is also a connection
+;; buffer local variable, which is computed depending on remote host properties
+;; when `tramp-chunksize' is zero or nil.
(defcustom tramp-chunksize
(when (and (not (featurep 'xemacs))
(memq system-type '(hpux)))
@@ -3231,7 +3233,13 @@ This is like `dired-recursive-delete-directory' for tramp files."
(mapconcat #'tramp-shell-quote-argument (cons program arguments) " "))
(tramp-wait-for-output))
(unless discard
- (insert-buffer (tramp-get-buffer multi-method method user host)))
+ ;; We cannot use `insert-buffer' because the tramp buffer
+ ;; changes its contents before insertion due to calling
+ ;; `expand-file' and alike.
+ (insert
+ (with-current-buffer
+ (tramp-get-buffer multi-method method user host)
+ (buffer-string))))
(save-excursion
(prog1
(tramp-send-command-and-check multi-method method user host nil)
@@ -3360,8 +3368,10 @@ This is like `dired-recursive-delete-directory' for tramp files."
switches
(if wildcard
localname
- (tramp-shell-quote-argument
- (file-name-nondirectory localname))))))
+ (if (zerop (length (file-name-nondirectory localname)))
+ ""
+ (tramp-shell-quote-argument
+ (file-name-nondirectory localname)))))))
(sit-for 1) ;needed for rsh but not ssh?
(tramp-wait-for-output))
;; The following let-binding is used by code that's commented
@@ -3369,8 +3379,13 @@ This is like `dired-recursive-delete-directory' for tramp files."
;; that the commented-out code is really not needed. Commenting-out
;; happened on 2003-03-13.
(let ((old-pos (point)))
- (insert-buffer-substring
- (tramp-get-buffer multi-method method user host))
+ ;; We cannot use `insert-buffer' because the tramp buffer
+ ;; changes its contents before insertion due to calling
+ ;; `expand-file' and alike.
+ (insert
+ (with-current-buffer
+ (tramp-get-buffer multi-method method user host)
+ (buffer-string)))
;; On XEmacs, we want to call (exchange-point-and-mark t), but
;; that doesn't exist on Emacs, so we use this workaround instead.
;; Since zmacs-region-stays doesn't exist in Emacs, this ought to
@@ -3561,7 +3576,13 @@ This will break if COMMAND prints a newline, followed by the value of
(unless asynchronous
(tramp-wait-for-output)))
(unless asynchronous
- (insert-buffer (tramp-get-buffer multi-method method user host)))
+ ;; We cannot use `insert-buffer' because the tramp buffer
+ ;; changes its contents before insertion due to calling
+ ;; `expand-file' and alike.
+ (insert
+ (with-current-buffer
+ (tramp-get-buffer multi-method method user host)
+ (buffer-string))))
(when error-buffer
(save-excursion
(unless (bufferp error-buffer)
@@ -3571,7 +3592,11 @@ This will break if COMMAND prints a newline, followed by the value of
"cat /tmp/tramp.$$.err")
(tramp-wait-for-output)
(set-buffer error-buffer)
- (insert-buffer (tramp-get-buffer multi-method method user host))
+ ;; Same comment as above
+ (insert
+ (with-current-buffer
+ (tramp-get-buffer multi-method method user host)
+ (buffer-string)))
(tramp-send-command-and-check
multi-method method user host "rm -f /tmp/tramp.$$.err")))
(save-excursion
@@ -4834,6 +4859,9 @@ Function may have 0-3 parameters."
(defun tramp-set-auto-save ()
(when (and (buffer-file-name)
(tramp-tramp-file-p (buffer-file-name))
+ ;; ange-ftp has its own auto-save mechanism
+ (eq (tramp-find-foreign-file-name-handler (buffer-file-name))
+ 'tramp-sh-file-name-handler)
auto-save-default)
(auto-save-mode 1)))
(add-hook 'find-file-hooks 'tramp-set-auto-save t)
@@ -5417,7 +5445,7 @@ Maybe the different regular expressions need to be tuned.
method))
(when multi-method
(error "Cannot multi-connect using telnet connection method"))
- (tramp-pre-connection multi-method method user host)
+ (tramp-pre-connection multi-method method user host tramp-chunksize)
(tramp-message 7 "Opening connection for %s@%s using %s..."
(or user (user-login-name)) host method)
(let ((process-environment (copy-sequence process-environment)))
@@ -5475,7 +5503,7 @@ arguments, and xx will be used as the host name to connect to.
(save-match-data
(when multi-method
(error "Cannot multi-connect using rsh connection method"))
- (tramp-pre-connection multi-method method user host)
+ (tramp-pre-connection multi-method method user host tramp-chunksize)
(if (and user (not (string= user "")))
(tramp-message 7 "Opening connection for %s@%s using %s..."
user host method)
@@ -5544,7 +5572,7 @@ prompt than you do, so it is not at all unlikely that the variable
(error
"Cannot connect to different host `%s' with `su' connection method"
host))
- (tramp-pre-connection multi-method method user host)
+ (tramp-pre-connection multi-method method user host tramp-chunksize)
(tramp-message 7 "Opening connection for `%s' using `%s'..."
(or user "<root>") method)
(let ((process-environment (copy-sequence process-environment)))
@@ -5609,7 +5637,7 @@ log in as u2 to h2."
(unless (and (= (length method) (length user))
(= (length method) (length host)))
(error "Arrays METHOD, USER, HOST must have equal length"))
- (tramp-pre-connection multi-method method user host)
+ (tramp-pre-connection multi-method method user host tramp-chunksize)
(tramp-message 7 "Opening `%s' connection..." multi-method)
(let ((process-environment (copy-sequence process-environment)))
(setenv "TERM" tramp-terminal-type)
@@ -5810,7 +5838,7 @@ Uses PROMPT as a prompt and sends the password to process P."
;; HHH: Not Changed. This might handle the case where USER is not
;; given in the "File name" very poorly. Then, the local
;; variable tramp-current-user will be set to nil.
-(defun tramp-pre-connection (multi-method method user host)
+(defun tramp-pre-connection (multi-method method user host chunksize)
"Do some setup before actually logging in.
METHOD, USER and HOST specify the connection."
(set-buffer (tramp-get-buffer multi-method method user host))
@@ -5818,6 +5846,7 @@ METHOD, USER and HOST specify the connection."
(set (make-local-variable 'tramp-current-method) method)
(set (make-local-variable 'tramp-current-user) user)
(set (make-local-variable 'tramp-current-host) host)
+ (set (make-local-variable 'tramp-chunksize) chunksize)
(set (make-local-variable 'inhibit-eol-conversion) nil)
(erase-buffer))
@@ -5869,6 +5898,20 @@ to set up. METHOD, USER and HOST specify the connection."
(erase-buffer)
(tramp-send-command-internal multi-method method user host
"TERM=dumb; export TERM")
+ (erase-buffer)
+ ;; Check whether the remote host suffers from buggy `send-process-string'.
+ ;; This is known for FreeBSD (see comment in `send_process', file process.c).
+ ;; I've tested sending 624 bytes successfully, sending 625 bytes failed.
+ ;; Emacs makes a hack when this host type is detected locally. It cannot
+ ;; handle remote hosts, though.
+ (when (or (not tramp-chunksize) (zerop tramp-chunksize))
+ (tramp-message 9 "Checking remote host type for `send-process-string' bug")
+ (tramp-send-command-internal multi-method method user host
+ "(uname -sr) 2>/dev/null")
+ (goto-char (point-min))
+ (when (looking-at "FreeBSD")
+ (setq tramp-chunksize 500)))
+
;; Try to set up the coding system correctly.
;; CCC this can't be the right way to do it. Hm.
(save-excursion
@@ -6948,7 +6991,8 @@ as default."
;; Permissions should be set always, because there might be an old
;; auto-saved file belonging to another original file. This could
;; be a security threat.
- (set-file-modes buffer-auto-save-file-name (file-modes bfn)))))
+ (set-file-modes buffer-auto-save-file-name
+ (or (file-modes bfn) ?\600)))))
(unless (or (> emacs-major-version 21)
(and (featurep 'xemacs)
@@ -7226,7 +7270,6 @@ Only works for Bourne-like shells."
tramp-yesno-prompt-regexp
tramp-yn-prompt-regexp
tramp-terminal-prompt-regexp
- tramp-out-of-band-prompt-regexp
tramp-temp-name-prefix
tramp-file-name-structure
tramp-file-name-regexp
@@ -7286,31 +7329,44 @@ report.
(defun tramp-append-tramp-buffers ()
"Append Tramp buffers into the bug report."
- ;; We load mml.el from Gnus.
+ ;; We load message.el and mml.el from Gnus.
(if (featurep 'xemacs)
- (load "mml" 'noerror)
+ (progn
+ (load "message" 'noerror)
+ (load "mml" 'noerror))
+ (require 'message nil 'noerror)
(require 'mml nil 'noerror))
+ (when (functionp 'message-mode)
+ (funcall 'message-mode))
+ (when (functionp 'mml-mode)
+ (funcall 'mml-mode t))
(when (and
- ;; We don't want to add another dependency.
- (functionp 'mml-insert-empty-tag)
- ;; 2nd parameter since Emacs 22.
- (condition-case nil
- (list-buffers-noselect nil nil)
- (t nil)))
- (let ((buffer-list
- (delq nil
- (mapcar '(lambda (b)
- (when (string-match "^\\*\\(debug \\)?tramp/" (buffer-name b)) b))
- (buffer-list))))
- (curbuf (current-buffer)))
+ (eq major-mode 'message-mode)
+ (boundp 'mml-mode)
+ (symbol-value 'mml-mode))
+
+ (let* ((tramp-buf-regexp "\\*\\(debug \\)?tramp/")
+ (buffer-list
+ (delq nil
+ (mapcar '(lambda (b)
+ (when (string-match tramp-buf-regexp (buffer-name b)) b))
+ (buffer-list))))
+ (curbuf (current-buffer)))
;; There is at least one Tramp buffer.
(when buffer-list
- (switch-to-buffer (list-buffers-noselect nil buffer-list))
+ (switch-to-buffer (list-buffers-noselect nil))
(delete-other-windows)
(setq buffer-read-only nil)
- (goto-char (point-max))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (if (re-search-forward tramp-buf-regexp (tramp-point-at-eol) t)
+ (forward-line 1)
+ (forward-line 0)
+ (let ((start (point)))
+ (forward-line 1)
+ (kill-region start (point)))))
(insert "
The buffer(s) above will be appended to this message. If you don't want
to append a buffer because it contains sensible data, or because the buffer
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 12e56600f00..fac6e2aed65 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -30,7 +30,7 @@
;; are auto-frobbed from configure.ac, so you should edit that file and run
;; "autoconf && ./configure" to change them.
-(defconst tramp-version "2.0.48"
+(defconst tramp-version "2.0.49"
"This version of Tramp.")
(defconst tramp-bug-report-address "tramp-devel@gnu.org"
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index ea36064412f..0a4cb6c8cd6 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -335,7 +335,8 @@ This function does not do any hidden buffer changes."
;; locking is in use. This variable is extended with the face in
;; `c-doc-face-name' when fontification is activated in cc-fonts.el.
(defvar c-literal-faces
- '(font-lock-comment-face font-lock-string-face))
+ '(font-lock-comment-face font-lock-string-face
+ font-lock-comment-delimiter-face))
(defun c-shift-line-indentation (shift-amt)
;; This function does not do any hidden buffer changes.
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f5180b1fb48..d08766f5a35 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1247,8 +1247,7 @@ Optional argument MINOR indicates this is called from
(make-local-variable 'compilation-messages-start)
(make-local-variable 'compilation-error-screen-columns)
(make-local-variable 'overlay-arrow-position)
- (set (make-local-variable 'overlay-arrow-string)
- (if (display-graphic-p) "=>" ""))
+ (set (make-local-variable 'overlay-arrow-string) "")
(setq next-error-overlay-arrow-position nil)
(add-hook 'kill-buffer-hook
(lambda () (setq next-error-overlay-arrow-position nil)) nil t)
@@ -1575,9 +1574,12 @@ region and the first line of the next region."
(setcdr loc (list line file marker)))
loc))
-(defcustom compilation-context-lines 0
- "*Display this many lines of leading context before message.
-If nil, don't scroll the compilation output window."
+(defcustom compilation-context-lines nil
+ "Display this many lines of leading context before the current message.
+If nil and the left fringe is displayed, don't scroll the
+compilation output window; an arrow in the left fringe points to
+the current message. If nil and there is no left fringe, the message
+displays at the top of the window; there is no arrow."
:type '(choice integer (const :tag "No window scrolling" nil))
:group 'compilation
:version "22.1")
@@ -1586,10 +1588,16 @@ If nil, don't scroll the compilation output window."
"Align the compilation output window W with marker MK near top."
(if (integerp compilation-context-lines)
(set-window-start w (save-excursion
- (goto-char mk)
- (beginning-of-line (- 1 compilation-context-lines))
- (point))))
- (set-window-point w mk))
+ (goto-char mk)
+ (beginning-of-line
+ (- 1 compilation-context-lines))
+ (point)))
+ (if (left-fringe-p)
+ (set-window-start w (save-excursion
+ (goto-char mk)
+ (beginning-of-line 1)
+ (point)))))
+ (set-window-point w mk))
(defvar next-error-highlight-timer)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 5c81ba7f6f9..4c95fc65d58 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3215,7 +3215,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
(add-hook 'tooltip-hook 'gud-tooltip-tips)
(define-key global-map [mouse-movement] 'gud-tooltip-mouse-motion))
(unless tooltip-mode (remove-hook 'pre-command-hook 'tooltip-hide)
- (remove-hook 'change-major-mode-hook 'tooltip-change-major-mode)
+ (remove-hook 'change-major-mode-hook 'gud-tooltip-change-major-mode)
(remove-hook 'tooltip-hook 'gud-tooltip-tips)
(define-key global-map [mouse-movement] 'ignore)))
(gud-tooltip-activate-mouse-motions-if-enabled)
@@ -3253,7 +3253,7 @@ If GUD-TOOLTIP-DEREFERENCE is t, also prepend a `*' to EXPR."
(when gud-tooltip-dereference
(setq expr (concat "*" expr)))
(case gud-minor-mode
- ((gdb gdba) (concat "server print " expr))
+ (gdba (concat "server print " expr))
((dbx gdbmi) (concat "print " expr))
(xdb (concat "p " expr))
(sdb (concat expr "/"))
@@ -3293,6 +3293,10 @@ This function must return nil if it doesn't handle EVENT."
(tooltip-show (cdr define-elt))
expr))))
(let ((cmd (gud-tooltip-print-command expr)))
+ (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb))
+ (gud-tooltip-mode -1)
+ (message-box "Using GUD tooltips in this mode is unsafe\n\
+so they have been disabled."))
(unless (null cmd) ; CMD can be nil if unknown debugger
(if (memq gud-minor-mode '(gdba gdbmi))
(if gdb-macro-info
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index ae024e8111e..7a647f97775 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1015,7 +1015,7 @@ Anything else means: whenever we have a \"good guess\" as to the value."
:group 'sh-indentation)
(defcustom sh-popup-occur-buffer nil
- "*Controls when `sh-learn-buffer-indent' pops the *indent* buffer.
+ "*Controls when `sh-learn-buffer-indent' pops the `*indent*' buffer.
If t it is always shown. If nil, it is shown only when there
are conflicts."
:type '(choice
@@ -1044,7 +1044,7 @@ Can be set to a number, or to nil which means leave it as is."
(defcustom sh-basic-offset 4
"*The default indentation increment.
-This value is used for the + and - symbols in an indentation variable."
+This value is used for the `+' and `-' symbols in an indentation variable."
:type 'integer
:group 'sh-indentation)
@@ -1088,7 +1088,7 @@ a number means align to that column, e.g. 0 means fist column."
:menu-tag "/ Indent left half sh-basic-offset")))
(defcustom sh-indent-for-else 0
- "*How much to indent an else relative to an if. Usually 0."
+ "*How much to indent an `else' relative to its `if'. Usually 0."
:type `(choice
(integer :menu-tag "A number (positive=>indent right)"
:tag "A number")
@@ -1104,75 +1104,75 @@ a number means align to that column, e.g. 0 means fist column."
sh-symbol-list))
(defcustom sh-indent-for-fi 0
- "*How much to indent a fi relative to an if. Usually 0."
+ "*How much to indent a `fi' relative to its `if'. Usually 0."
:type `(choice ,@ sh-number-or-symbol-list )
:group 'sh-indentation)
-(defcustom sh-indent-for-done '0
- "*How much to indent a done relative to its matching stmt. Usually 0."
+(defcustom sh-indent-for-done 0
+ "*How much to indent a `done' relative to its matching stmt. Usually 0."
:type `(choice ,@ sh-number-or-symbol-list )
:group 'sh-indentation)
(defcustom sh-indent-after-else '+
- "*How much to indent a statement after an else statement."
+ "*How much to indent a statement after an `else' statement."
:type `(choice ,@ sh-number-or-symbol-list )
:group 'sh-indentation)
(defcustom sh-indent-after-if '+
- "*How much to indent a statement after an if statement.
-This includes lines after else and elif statements, too, but
-does not affect then else elif or fi statements themselves."
+ "*How much to indent a statement after an `if' statement.
+This includes lines after `else' and `elif' statements, too, but
+does not affect the `else', `elif' or `fi' statements themselves."
:type `(choice ,@ sh-number-or-symbol-list )
:group 'sh-indentation)
(defcustom sh-indent-for-then 0
- "*How much to indent a then relative to an if."
+ "*How much to indent a `then' relative to its `if'."
:type `(choice ,@ sh-number-or-symbol-list )
:group 'sh-indentation)
(defcustom sh-indent-for-do 0
- "*How much to indent a do statement.
-This is relative to the statement before the do, i.e. the
-while until or for statement."
+ "*How much to indent a `do' statement.
+This is relative to the statement before the `do', typically a
+`while', `until', `for', `repeat' or `select' statement."
:type `(choice ,@ sh-number-or-symbol-list)
:group 'sh-indentation)
-(defcustom sh-indent-after-do '*
- "*How much to indent a line after a do statement.
-This is used when the do is the first word of the line.
-This is relative to the statement before the do, e.g. a
-while for repeat or select statement."
+(defcustom sh-indent-after-do '+
+ "*How much to indent a line after a `do' statement.
+This is used when the `do' is the first word of the line.
+This is relative to the statement before the `do', typically a
+`while', `until', `for', `repeat' or `select' statement."
:type `(choice ,@ sh-number-or-symbol-list)
:group 'sh-indentation)
(defcustom sh-indent-after-loop-construct '+
"*How much to indent a statement after a loop construct.
-This variable is used when the keyword \"do\" is on the same line as the
-loop statement (e.g. \"until\", \"while\" or \"for\").
-If the do is on a line by itself, then `sh-indent-after-do' is used instead."
+This variable is used when the keyword `do' is on the same line as the
+loop statement (e.g., `until', `while' or `for').
+If the `do' is on a line by itself, then `sh-indent-after-do' is used instead."
:type `(choice ,@ sh-number-or-symbol-list)
:group 'sh-indentation)
(defcustom sh-indent-after-done 0
- "*How much to indent a statement after a \"done\" keyword.
-Normally this is 0, which aligns the \"done\" to the matching
+ "*How much to indent a statement after a `done' keyword.
+Normally this is 0, which aligns the `done' to the matching
looping construct line.
-Setting it non-zero allows you to have the \"do\" statement on a line
+Setting it non-zero allows you to have the `do' statement on a line
by itself and align the done under to do."
:type `(choice ,@ sh-number-or-symbol-list)
:group 'sh-indentation)
(defcustom sh-indent-for-case-label '+
"*How much to indent a case label statement.
-This is relative to the line containing the case statement."
+This is relative to the line containing the `case' statement."
:type `(choice ,@ sh-number-or-symbol-list)
:group 'sh-indentation)
(defcustom sh-indent-for-case-alt '++
"*How much to indent statements after the case label.
-This is relative to the line containing the case statement."
+This is relative to the line containing the `case' statement."
:type `(choice ,@ sh-number-or-symbol-list)
:group 'sh-indentation)
@@ -1184,7 +1184,7 @@ This is relative to the line containing the case statement."
(defcustom sh-indent-after-open '+
"*How much to indent after a line with an opening parenthesis or brace.
-For an open paren after a function `sh-indent-after-function' is used."
+For an open paren after a function, `sh-indent-after-function' is used."
:type `(choice ,@ sh-number-or-symbol-list)
:group 'sh-indentation)
@@ -1196,13 +1196,13 @@ For an open paren after a function `sh-indent-after-function' is used."
;; These 2 are for the rc shell:
(defcustom sh-indent-after-switch '+
- "*How much to indent a case statement relative to the switch statement.
+ "*How much to indent a `case' statement relative to the `switch' statement.
This is for the rc shell."
:type `(choice ,@ sh-number-or-symbol-list)
:group 'sh-indentation)
(defcustom sh-indent-after-case '+
- "*How much to indent a statement relative to the case statement.
+ "*How much to indent a statement relative to the `case' statement.
This is for the rc shell."
:type `(choice ,@ sh-number-or-symbol-list)
:group 'sh-indentation)
diff --git a/lisp/subr.el b/lisp/subr.el
index 50fa2ea2ddd..d3b6cfe9f76 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -983,7 +983,8 @@ It can also be nil, if the definition is not associated with any file.
If TYPE is nil, then any kind of definition is acceptable.
If TYPE is `defun' or `defvar', that specifies function
-definition only or variable definition only."
+definition only or variable definition only.
+`defface' specifies a face definition only."
(if (and (or (null type) (eq type 'defun))
(symbolp symbol) (fboundp symbol)
(eq 'autoload (car-safe (symbol-function symbol))))
@@ -1040,12 +1041,10 @@ This makes or adds to an entry on `after-load-alist'.
FILE should be the name of a library, with no directory name."
(eval-after-load file (read)))
-;;; make-network-process wrappers
+;;; open-network-stream is a wrapper around make-network-process.
-(if (featurep 'make-network-process)
- (progn
-
-(defun open-network-stream (name buffer host service)
+(when (featurep 'make-network-process)
+ (defun open-network-stream (name buffer host service)
"Open a TCP connection for a service to a host.
Returns a subprocess-object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.
@@ -1061,56 +1060,7 @@ HOST is name of the host to connect to, or its IP address.
SERVICE is name of the service desired, or an integer specifying
a port number to connect to."
(make-network-process :name name :buffer buffer
- :host host :service service))
-
-(defun open-network-stream-nowait (name buffer host service &optional sentinel filter)
- "Initiate connection to a TCP connection for a service to a host.
-It returns nil if non-blocking connects are not supported; otherwise,
-it returns a subprocess-object to represent the connection.
-
-This function is similar to `open-network-stream', except that it
-returns before the connection is established. When the connection
-is completed, the sentinel function will be called with second arg
-matching `open' (if successful) or `failed' (on error).
-
-Args are NAME BUFFER HOST SERVICE SENTINEL FILTER.
-NAME, BUFFER, HOST, and SERVICE are as for `open-network-stream'.
-Optional args SENTINEL and FILTER specify the sentinel and filter
-functions to be used for this network stream."
- (if (featurep 'make-network-process '(:nowait t))
- (make-network-process :name name :buffer buffer :nowait t
- :host host :service service
- :filter filter :sentinel sentinel)))
-
-(defun open-network-stream-server (name buffer service &optional sentinel filter)
- "Create a network server process for a TCP service.
-It returns nil if server processes are not supported; otherwise,
-it returns a subprocess-object to represent the server.
-
-When a client connects to the specified service, a new subprocess
-is created to handle the new connection, and the sentinel function
-is called for the new process.
-
-Args are NAME BUFFER SERVICE SENTINEL FILTER.
-NAME is name for the server process. Client processes are named by
- appending the ip-address and port number of the client to NAME.
-BUFFER is the buffer (or buffer name) to associate with the server
- process. Client processes will not get a buffer if a process filter
- is specified or BUFFER is nil; otherwise, a new buffer is created for
- the client process. The name is similar to the process name.
-Third arg SERVICE is name of the service desired, or an integer
- specifying a port number to connect to. It may also be t to select
- an unused port number for the server.
-Optional args SENTINEL and FILTER specify the sentinel and filter
- functions to be used for the client processes; the server process
- does not use these function."
- (if (featurep 'make-network-process '(:server t))
- (make-network-process :name name :buffer buffer
- :service service :server t :noquery t
- :sentinel sentinel :filter filter)))
-
-)) ;; (featurep 'make-network-process)
-
+ :host host :service service)))
;; compatibility
@@ -2356,6 +2306,9 @@ configuration."
(and (consp object)
(eq (car object) 'frame-configuration)))
+(defsubst left-fringe-p ()
+ (equal (car (window-fringes)) 0))
+
(defun functionp (object)
"Non-nil if OBJECT is any kind of function or a special form.
Also non-nil if OBJECT is a symbol and its function definition is
@@ -2374,7 +2327,7 @@ macros."
"Delete from ALIST all elements whose car is `eq' to KEY.
Return the modified alist.
Elements of ALIST that are not conses are ignored."
- (while (and (consp (car alist))
+ (while (and (consp (car alist))
(eq (car (car alist)) key))
(setq alist (cdr alist)))
(let ((tail alist) tail-cdr)
@@ -2389,7 +2342,7 @@ Elements of ALIST that are not conses are ignored."
"Delete from ALIST all elements whose cdr is `eq' to VALUE.
Return the modified alist.
Elements of ALIST that are not conses are ignored."
- (while (and (consp (car alist))
+ (while (and (consp (car alist))
(eq (cdr (car alist)) value))
(setq alist (cdr alist)))
(let ((tail alist) tail-cdr)
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 99931867792..3e0a8e95701 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -395,7 +395,7 @@ element of keymap, an `x-popup-menu' argument, or an element of
`x-popup-menu' argument (when IN-X-MENU is not-nil).
This function adds the element only if it is not already present.
It uses the free variable `tmm-table-undef' to keep undefined keys."
- (let (km str cache plist filter visible (event (car elt)))
+ (let (km str cache plist filter visible enable (event (car elt)))
(setq elt (cdr elt))
(if (eq elt 'undefined)
(setq tmm-table-undef (cons (cons event nil) tmm-table-undef))
@@ -436,6 +436,9 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
(setq visible (plist-get plist :visible))
(if visible
(setq km (and (eval visible) km)))
+ (setq enable (plist-get plist :enable))
+ (if enable
+ (setq km (and (eval enable) km)))
(and str
(consp (nth 3 elt))
(stringp (cdr (nth 3 elt))) ; keyseq cache