Skip to content

Commit

Permalink
Added ecb-string< and ecb-string= with a ignore-case arg and replaces…
Browse files Browse the repository at this point in the history
… each

string-equal(string= and string-lessp and string< with these new functions.
  • Loading branch information
berndl committed May 6, 2004
1 parent d579152 commit eb96352
Show file tree
Hide file tree
Showing 19 changed files with 361 additions and 190 deletions.
20 changes: 12 additions & 8 deletions Makefile
Expand Up @@ -40,27 +40,31 @@
# have set this variable to 'xemacs' if you want byte-compile with XEmacs!
EMACS=emacs

# In the following path-settings of this section use always FORWARD-SLASHES
# as directory-separator even with MS Windows systems.

# -------- Compiling ECB with the cedet-library 1.0 ----------------------

# cedet 1.0 (contains a.o. semantic 2.0, eieio 0.18 and speedbar 0.15). If
# you want compile ECB with the cedet library then set here the full path
# to the cedet-installation directory.
# to the cedet-installation directory. If you do not want using the
# cedet-suite but separate semantic-, eieio- and speedbar-pathes set this
# variable to empty.

#CEDET=
CEDET=C:/Programme/emacs-21/site-lisp/multi-file-packages/cedet-1.0beta2b

# -------- Compiling ECB with the semantic < 2.0 -------------------------

# If you want not compile ECB with the cedet1.0-library then do not set
# CEDET above!
# If you do not want compiling ECB with the cedet1.0-library then do not
# set CEDET above!

# If semantic, eieio and speedbar are added to load-path within some
# Elisp-statements in the Emacs initialization-files (e.g. .emacs or
# site-start.el) then set here again the load-path of the semantic-version,
# the eieio-version and the speedbar-version loaded into your Emacs (use
# always FORWARD-SLASHES as directory-separator even with MS Windows
# systems). Make sure you compile ECB with the semantic-, eieio- and
# speedbar-version you load into Emacs!
# the eieio-version and the speedbar-version loaded into your Emacs. Make
# sure you compile ECB with the semantic-, eieio- and speedbar-version you
# load into Emacs!

# If you are using XEmacs with already installed XEmacs-packages for
# semantic, eieio and speedbar or if you are using a file subdirs.el with
Expand Down Expand Up @@ -143,7 +147,7 @@ INSTALLINFO=/usr/bin/install-info

# For the ECB-maintainers: Change the version-number here and not
# elsewhere!
ecb_VERSION=2.24
ecb_VERSION=2.25

include ecb-makedef.mk

Expand Down
13 changes: 12 additions & 1 deletion NEWS
@@ -1,9 +1,20 @@
* Changes for ECB version 2.25

** More flexible sorting of the Sources- and the History-buffer

*** `ecb-sort-history-items' has been renamed to `ecb-history-sort-method'
and offers now the same choices as the already existing option
`ecb-sources-sort-method'.

*** Two new options `ecb-sources-sort-ignore-case' and
`ecb-history-sort-ignore-case' which allow to ignore case when sorting the
Sources- and/or the History-buffer. Thanks for suggestion to Markus
Gritsch <gritsch@iue.tuwien.ac.at>. Per default case is now ignored.

** Fixed Bugs

*** Fixed a bug in the mechanism which prescanes directories for emptyness.
Now a directory is checked if it is accible before it is prescanned -
Now a directory is checked if it is accessible before it is prescanned -
otherwise the prescan could fail with an error.


Expand Down
2 changes: 1 addition & 1 deletion ecb-autogen.el
Expand Up @@ -79,7 +79,7 @@
(defun ecb-autogen-update-header ()
"Update header of the auto-generated autoloads file.
Run as `write-contents-hooks'."
(when (string-equal generated-autoload-file (buffer-file-name))
(when (ecb-string= generated-autoload-file (buffer-file-name))
(let ((tag (format ";;; %s ---" (file-name-nondirectory
(buffer-file-name)))))
(message "Updating header...")
Expand Down
6 changes: 3 additions & 3 deletions ecb-compilation.el
Expand Up @@ -103,7 +103,7 @@ compile-window of ECB. This is a list combined of
(catch 'exit
(dolist (b (ecb-compilation-buffer-names))
(if (null (cdr b))
(if (string= name (car b))
(if (ecb-string= name (car b))
(throw 'exit name))
(save-match-data
(if (string-match (car b) name)
Expand Down Expand Up @@ -170,8 +170,8 @@ displayed in the compile-window. This is a list combined of
(index 0))

(setq buffer-list (sort buffer-list (lambda(first second)
(string-lessp (buffer-name first)
(buffer-name second)))))
(ecb-string< (buffer-name first)
(buffer-name second)))))
(dolist(buffer buffer-list)
(when (ecb-compilation-buffer-p buffer)
(setq buffer-names
Expand Down
16 changes: 8 additions & 8 deletions ecb-create-layout.el
Expand Up @@ -234,8 +234,8 @@
"Ensure calling `ecb-create-layout-cancel' during deleting the
layout-creation frame."
(let ((frame (or (ad-get-arg 0) (selected-frame))))
(when (string= (ecb-frame-parameter frame 'name)
ecb-create-layout-frame-name)
(when (ecb-string= (ecb-frame-parameter frame 'name)
ecb-create-layout-frame-name)
(ecb-create-layout-cancel))))

(defun ecb-create-layout-frame-ok ()
Expand Down Expand Up @@ -403,12 +403,12 @@ DELETE-FRAME is not nil then the new created frame will be deleted and the
(member type ecb-create-layout-all-buf-types))
(add-to-list 'ecb-create-layout-buf-types type)
(setq ecb-create-layout-buf-types
(sort ecb-create-layout-buf-types 'string-lessp))))
(sort ecb-create-layout-buf-types 'ecb-string<))))

(defun ecb-create-layout-remove-from-buf-type (type)
(when (stringp type)
(setq ecb-create-layout-buf-types
(sort (delete type ecb-create-layout-buf-types) 'string-lessp))))
(sort (delete type ecb-create-layout-buf-types) 'ecb-string<))))

(defun ecb-create-layout-buffer-type ()
(get-text-property (point-min) 'ecb-create-layout-type))
Expand Down Expand Up @@ -485,15 +485,15 @@ DELETE-FRAME is not nil then the new created frame will be deleted and the
(ecb-query-string "Split method:"
'("at-point" "half")
"Insert a fraction between 0.1 and 0.9"))
(fraction (cond ((string= split-method "at-point")
(fraction (cond ((ecb-string= split-method "at-point")
nil)
((string= split-method "half")
((ecb-string= split-method "half")
0.5)
((floatp (string-to-number split-method))
(string-to-number split-method))
(t 0.5)))
(real-split-factor
(if (string= split-type "horizontal")
(if (ecb-string= split-type "horizontal")
(ecb-create-layout-split-hor fraction)
(ecb-create-layout-split-ver fraction))))
;; creating new fitting buffers
Expand Down Expand Up @@ -814,7 +814,7 @@ unbound."
(mapcar (function (lambda (elem)
(car elem)))
ecb-buildin-layouts))
'string<))
'ecb-string<))
(layout-name nil))
(if (= (length new-layout-list) 0)
(ecb-error "There are no layouts to delete!")
Expand Down
4 changes: 2 additions & 2 deletions ecb-eshell.el
Expand Up @@ -243,8 +243,8 @@ ECB and if either this function is called interactively or
(when (and (bufferp my-eshell-buffer)
(stringp my-reference-directory)
(stringp my-eshell-directory)
(not (string-equal (ecb-fix-filename my-reference-directory)
(ecb-fix-filename my-eshell-directory))))
(not (ecb-string= (ecb-fix-filename my-reference-directory)
(ecb-fix-filename my-eshell-directory))))
(ecb-eshell-save-buffer-history
(save-excursion
(set-buffer my-eshell-buffer)
Expand Down
15 changes: 8 additions & 7 deletions ecb-examples.el
Expand Up @@ -135,9 +135,9 @@ it will be called autom. with `ecb-current-buffer-sync-hook'."
;; synchronizing for real filesource-buffers

;; Let us be smart: We synchronize only if sourcebuffer has changed
(when (not (string= (ecb-fix-filename filename)
(ecb-fix-filename
ecb-examples-bufferinfo-last-file)))
(when (not (ecb-string= (ecb-fix-filename filename)
(ecb-fix-filename
ecb-examples-bufferinfo-last-file)))
;; set new last-file-name so we can check next time if changed
(setq ecb-examples-bufferinfo-last-file filename)
;; we display the file-infos for current source-file
Expand Down Expand Up @@ -361,7 +361,7 @@ preactivation-state is saved and will be restored by
"ECB must be activated!")
(assert (equal (selected-frame) ecb-frame) nil
"The ECB-frame must be selected!")
(assert (not (string= ecb-layout-name "example-layout1")) nil
(assert (not (ecb-string= ecb-layout-name "example-layout1")) nil
"The examples-layout1 is already active!")

;; activating the synchronization of the bufferinfo-window
Expand All @@ -373,8 +373,9 @@ preactivation-state is saved and will be restored by

;; switch to our prefered layout
(setq ecb-windows-height 6)
(setq ecb-compile-window-height 5)
(ecb-layout-switch "example-layout1"))
(setq ecb-compile-window-height 8)
(let ((ecb-change-layout-preserves-compwin-state nil))
(ecb-layout-switch "example-layout1")))



Expand All @@ -392,7 +393,7 @@ restore the state as before activation."
"ECB must be activated!")
(assert (equal (selected-frame) ecb-frame) nil
"The ECB-frame must be selected!")
(assert (string= ecb-layout-name "example-layout1") nil
(assert (ecb-string= ecb-layout-name "example-layout1") nil
"The example-layout1 is not active!")

(remove-hook 'ecb-current-buffer-sync-hook
Expand Down

0 comments on commit eb96352

Please sign in to comment.