summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorSam Steingold <sds@gnu.org>2012-06-26 12:23:01 -0400
committerSam Steingold <sds@gnu.org>2012-06-26 12:23:01 -0400
commitd2c32364fd1873a6e9cfa52d2531dfbe500ad297 (patch)
treef567c36975e6d137b55ecca8ddf856cfe6e7de0d /lisp/textmodes
parent62efea5e881407a178c5c291575facc17dca8a3f (diff)
downloademacs-d2c32364fd1873a6e9cfa52d2531dfbe500ad297.tar.gz
* lisp/files.el (file-name-base): New convenience function.
* lisp/autoinsert.el, lisp/cus-dep.el, lisp/doc-view.el, lisp/image-dired.el, * lisp/woman.el, lisp/eshell/esh-cmd.el, lisp/progmodes/ada-xref.el, * lisp/progmodes/cc-defs.el, lisp/progmodes/cperl-mode.el, * lisp/progmodes/flymake.el, lisp/progmodes/gud.el, lisp/progmodes/idlwave.el, * lisp/textmodes/ispell.el, lisp/textmodes/reftex-ref.el, * lisp/textmodes/tex-mode.el: Use it. Did not touch cedet and org because they are maintained elsewhere.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/ispell.el3
-rw-r--r--lisp/textmodes/reftex-ref.el6
-rw-r--r--lisp/textmodes/tex-mode.el3
3 files changed, 4 insertions, 8 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index fc2155893a9..0c7966f22d3 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1064,8 +1064,7 @@ Return the new dictionary alist."
(insert-file-contents alias-file)
;; Look for a line "add FOO.multi", extract FOO
(when (search-forward-regexp "^add \\([^.]+\\)\\.multi" nil t)
- (let* ((aliasname (file-name-sans-extension
- (file-name-nondirectory alias-file)))
+ (let* ((aliasname (file-name-base alias-file))
(already-exists-p (assoc aliasname alist))
(realname (match-string 1))
(realdict (assoc realname alist)))
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el
index 03690f65281..1882e7dde56 100644
--- a/lisp/textmodes/reftex-ref.el
+++ b/lisp/textmodes/reftex-ref.el
@@ -313,8 +313,7 @@ also applies `reftex-translate-to-ascii-function' to the string."
(save-match-data
(cond
((equal letter "f")
- (file-name-sans-extension
- (file-name-nondirectory (buffer-file-name))))
+ (file-name-base))
((equal letter "F")
(let ((masterdir (file-name-directory (reftex-TeX-master-file)))
(file (file-name-sans-extension (buffer-file-name))))
@@ -323,8 +322,7 @@ also applies `reftex-translate-to-ascii-function' to the string."
(substring file (length masterdir))
file)))
((equal letter "m")
- (file-name-sans-extension
- (file-name-nondirectory (reftex-TeX-master-file))))
+ (file-name-base (reftex-TeX-master-file)))
((equal letter "M")
(file-name-nondirectory
(substring (file-name-directory (reftex-TeX-master-file))
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index a9a2113e7fc..43005a03415 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1984,8 +1984,7 @@ If NOT-ALL is non-nil, save the `.dvi' file."
(let* ((dir (file-name-directory tex-last-temp-file))
(list (and (file-directory-p dir)
(file-name-all-completions
- (file-name-sans-extension
- (file-name-nondirectory tex-last-temp-file))
+ (file-name-base tex-last-temp-file)
dir))))
(while list
(if not-all